代码拉取完成,页面将自动刷新
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IPC_IPC_MOJO_BOOTSTRAP_H_
#define IPC_IPC_MOJO_BOOTSTRAP_H_
#include <stdint.h>
#include <memory>
#include "base/component_export.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/single_thread_task_runner.h"
#include "build/build_config.h"
#include "ipc/ipc.mojom.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_listener.h"
#include "mojo/public/cpp/bindings/associated_group.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "mojo/public/cpp/bindings/lib/message_quota_checker.h"
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
#include "mojo/public/cpp/system/message_pipe.h"
namespace IPC {
// MojoBootstrap establishes a pair of associated interfaces between two
// processes in Chrome.
//
// Clients should implement MojoBootstrap::Delegate to get the associated pipes
// from MojoBootstrap object.
//
// This lives on IO thread other than Create(), which can be called from
// UI thread as Channel::Create() can be.
class COMPONENT_EXPORT(IPC) MojoBootstrap {
public:
virtual ~MojoBootstrap() {}
// Create the MojoBootstrap instance, using |handle| as the message pipe, in
// mode as specified by |mode|. The result is passed to |delegate|.
static std::unique_ptr<MojoBootstrap> Create(
mojo::ScopedMessagePipeHandle handle,
Channel::Mode mode,
const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner,
const scoped_refptr<base::SingleThreadTaskRunner>& proxy_task_runner,
const scoped_refptr<mojo::internal::MessageQuotaChecker>& quota_checker);
// Start the handshake over the underlying message pipe.
virtual void Connect(
mojo::AssociatedRemote<mojom::Channel>* sender,
mojo::PendingAssociatedReceiver<mojom::Channel>* receiver) = 0;
// Stop transmitting messages and start queueing them instead.
virtual void Pause() = 0;
// Stop queuing new messages and start transmitting them instead.
virtual void Unpause() = 0;
// Flush outgoing messages which were queued before Start().
virtual void Flush() = 0;
virtual mojo::AssociatedGroup* GetAssociatedGroup() = 0;
};
} // namespace IPC
#endif // IPC_IPC_MOJO_BOOTSTRAP_H_
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。