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

Side by Side Diff: win8/viewer/metro_viewer_process_host.h

Issue 324143002: Decouple IPC::MessageFilter from IPC::Channel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing compilation errors Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_ 5 #ifndef WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_
6 #define WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_ 6 #define WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 // Inner message filter used to handle connection event on the IPC channel 181 // Inner message filter used to handle connection event on the IPC channel
182 // proxy's background thread. This prevents consumers of 182 // proxy's background thread. This prevents consumers of
183 // MetroViewerProcessHost from having to pump messages on their own message 183 // MetroViewerProcessHost from having to pump messages on their own message
184 // loop. 184 // loop.
185 class InternalMessageFilter : public IPC::MessageFilter { 185 class InternalMessageFilter : public IPC::MessageFilter {
186 public: 186 public:
187 InternalMessageFilter(MetroViewerProcessHost* owner); 187 InternalMessageFilter(MetroViewerProcessHost* owner);
188 188
189 // IPC::MessageFilter implementation. 189 // IPC::MessageFilter implementation.
190 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; 190 virtual void OnSenderConnected() OVERRIDE;
191 191
192 private: 192 private:
193 MetroViewerProcessHost* owner_; 193 MetroViewerProcessHost* owner_;
194 DISALLOW_COPY_AND_ASSIGN(InternalMessageFilter); 194 DISALLOW_COPY_AND_ASSIGN(InternalMessageFilter);
195 }; 195 };
196 196
197 scoped_ptr<IPC::ChannelProxy> channel_; 197 scoped_ptr<IPC::ChannelProxy> channel_;
198 scoped_ptr<base::WaitableEvent> channel_connected_event_; 198 scoped_ptr<base::WaitableEvent> channel_connected_event_;
199 scoped_refptr<InternalMessageFilter> message_filter_; 199 scoped_refptr<InternalMessageFilter> message_filter_;
200 200
201 static MetroViewerProcessHost* instance_; 201 static MetroViewerProcessHost* instance_;
202 202
203 // Saved callbacks which inform the caller about the result of the open file/ 203 // Saved callbacks which inform the caller about the result of the open file/
204 // save file/select operations. 204 // save file/select operations.
205 OpenFileCompletion file_open_completion_callback_; 205 OpenFileCompletion file_open_completion_callback_;
206 OpenMultipleFilesCompletion multi_file_open_completion_callback_; 206 OpenMultipleFilesCompletion multi_file_open_completion_callback_;
207 SaveFileCompletion file_saveas_completion_callback_; 207 SaveFileCompletion file_saveas_completion_callback_;
208 SelectFolderCompletion select_folder_completion_callback_; 208 SelectFolderCompletion select_folder_completion_callback_;
209 FileSelectionCanceled failure_callback_; 209 FileSelectionCanceled failure_callback_;
210 210
211 DISALLOW_COPY_AND_ASSIGN(MetroViewerProcessHost); 211 DISALLOW_COPY_AND_ASSIGN(MetroViewerProcessHost);
212 }; 212 };
213 213
214 } // namespace win8 214 } // namespace win8
215 215
216 #endif // WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_ 216 #endif // WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698