OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SYNC_MESSAGE_FILTER_H_ | 5 #ifndef IPC_IPC_SYNC_MESSAGE_FILTER_H_ |
6 #define IPC_IPC_SYNC_MESSAGE_FILTER_H_ | 6 #define IPC_IPC_SYNC_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // Binds an associated interface proxy to an interface in the browser process. | 49 // Binds an associated interface proxy to an interface in the browser process. |
50 // Interfaces acquired through this method are associated with the IPC Channel | 50 // Interfaces acquired through this method are associated with the IPC Channel |
51 // and as such retain FIFO with legacy IPC messages. | 51 // and as such retain FIFO with legacy IPC messages. |
52 // | 52 // |
53 // NOTE: This must ONLY be called on the Channel's thread, after | 53 // NOTE: This must ONLY be called on the Channel's thread, after |
54 // OnFilterAdded. | 54 // OnFilterAdded. |
55 template <typename Interface> | 55 template <typename Interface> |
56 void GetRemoteAssociatedInterface( | 56 void GetRemoteAssociatedInterface( |
57 mojo::AssociatedInterfacePtr<Interface>* proxy) { | 57 mojo::AssociatedInterfacePtr<Interface>* proxy) { |
58 mojo::AssociatedInterfaceRequest<Interface> request = | 58 mojo::AssociatedInterfaceRequest<Interface> request = |
59 mojo::GetProxy(proxy, &channel_associated_group_); | 59 mojo::MakeRequest(proxy, &channel_associated_group_); |
60 GetGenericRemoteAssociatedInterface(Interface::Name_, request.PassHandle()); | 60 GetGenericRemoteAssociatedInterface(Interface::Name_, request.PassHandle()); |
61 } | 61 } |
62 | 62 |
63 protected: | 63 protected: |
64 explicit SyncMessageFilter(base::WaitableEvent* shutdown_event); | 64 explicit SyncMessageFilter(base::WaitableEvent* shutdown_event); |
65 ~SyncMessageFilter() override; | 65 ~SyncMessageFilter() override; |
66 | 66 |
67 private: | 67 private: |
68 class IOMessageLoopObserver; | 68 class IOMessageLoopObserver; |
69 | 69 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 mojo::AssociatedGroup channel_associated_group_; | 117 mojo::AssociatedGroup channel_associated_group_; |
118 | 118 |
119 base::WeakPtrFactory<SyncMessageFilter> weak_factory_; | 119 base::WeakPtrFactory<SyncMessageFilter> weak_factory_; |
120 | 120 |
121 DISALLOW_COPY_AND_ASSIGN(SyncMessageFilter); | 121 DISALLOW_COPY_AND_ASSIGN(SyncMessageFilter); |
122 }; | 122 }; |
123 | 123 |
124 } // namespace IPC | 124 } // namespace IPC |
125 | 125 |
126 #endif // IPC_IPC_SYNC_MESSAGE_FILTER_H_ | 126 #endif // IPC_IPC_SYNC_MESSAGE_FILTER_H_ |
OLD | NEW |