Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: ipc/mojo/ipc_channel_mojo.h

Issue 665993002: ChannelMojo: Add ChannelMojo::CanBeUsed() to enable it incrementally (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | ipc/mojo/ipc_channel_mojo.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IPC_IPC_CHANNEL_MOJO_H_ 5 #ifndef IPC_IPC_CHANNEL_MOJO_H_
6 #define IPC_IPC_CHANNEL_MOJO_H_ 6 #define IPC_IPC_CHANNEL_MOJO_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 public MojoBootstrap::Delegate { 60 public MojoBootstrap::Delegate {
61 public: 61 public:
62 class Delegate { 62 class Delegate {
63 public: 63 public:
64 virtual ~Delegate() {} 64 virtual ~Delegate() {}
65 virtual base::WeakPtr<Delegate> ToWeakPtr() = 0; 65 virtual base::WeakPtr<Delegate> ToWeakPtr() = 0;
66 virtual scoped_refptr<base::TaskRunner> GetIOTaskRunner() = 0; 66 virtual scoped_refptr<base::TaskRunner> GetIOTaskRunner() = 0;
67 virtual void OnChannelCreated(base::WeakPtr<ChannelMojo> channel) = 0; 67 virtual void OnChannelCreated(base::WeakPtr<ChannelMojo> channel) = 0;
68 }; 68 };
69 69
70 // True if ChannelMojo should be used regardless of the flag.
71 static bool ShouldBeUsed();
72
70 // Create ChannelMojo. A bootstrap channel is created as well. 73 // Create ChannelMojo. A bootstrap channel is created as well.
71 // |host| must not be null for server channels. 74 // |host| must not be null for server channels.
72 static scoped_ptr<ChannelMojo> Create(Delegate* delegate, 75 static scoped_ptr<ChannelMojo> Create(Delegate* delegate,
73 const ChannelHandle& channel_handle, 76 const ChannelHandle& channel_handle,
74 Mode mode, 77 Mode mode,
75 Listener* listener); 78 Listener* listener);
76 79
77 // Create a factory object for ChannelMojo. 80 // Create a factory object for ChannelMojo.
78 // The factory is used to create Mojo-based ChannelProxy family. 81 // The factory is used to create Mojo-based ChannelProxy family.
79 // |host| must not be null. 82 // |host| must not be null.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 ScopedVector<Message> pending_messages_; 157 ScopedVector<Message> pending_messages_;
155 158
156 base::WeakPtrFactory<ChannelMojo> weak_factory_; 159 base::WeakPtrFactory<ChannelMojo> weak_factory_;
157 160
158 DISALLOW_COPY_AND_ASSIGN(ChannelMojo); 161 DISALLOW_COPY_AND_ASSIGN(ChannelMojo);
159 }; 162 };
160 163
161 } // namespace IPC 164 } // namespace IPC
162 165
163 #endif // IPC_IPC_CHANNEL_MOJO_H_ 166 #endif // IPC_IPC_CHANNEL_MOJO_H_
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | ipc/mojo/ipc_channel_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698