Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 184 // MetroViewerProcessHost from having to pump messages on their own message | 184 // MetroViewerProcessHost from having to pump messages on their own message |
| 185 // loop. | 185 // loop. |
| 186 class InternalMessageFilter : public IPC::MessageFilter { | 186 class InternalMessageFilter : public IPC::MessageFilter { |
| 187 public: | 187 public: |
| 188 InternalMessageFilter(MetroViewerProcessHost* owner); | 188 InternalMessageFilter(MetroViewerProcessHost* owner); |
| 189 | 189 |
| 190 // IPC::MessageFilter implementation. | 190 // IPC::MessageFilter implementation. |
| 191 void OnChannelConnected(int32 peer_pid) override; | 191 void OnChannelConnected(int32 peer_pid) override; |
| 192 | 192 |
| 193 private: | 193 private: |
| 194 ~InternalMessageFilter(); | |
|
Ryan Sleevi
2015/05/02 01:28:26
no override?
| |
| 195 | |
| 194 MetroViewerProcessHost* owner_; | 196 MetroViewerProcessHost* owner_; |
| 195 DISALLOW_COPY_AND_ASSIGN(InternalMessageFilter); | 197 DISALLOW_COPY_AND_ASSIGN(InternalMessageFilter); |
| 196 }; | 198 }; |
| 197 | 199 |
| 198 scoped_ptr<IPC::ChannelProxy> channel_; | 200 scoped_ptr<IPC::ChannelProxy> channel_; |
| 199 scoped_ptr<base::WaitableEvent> channel_connected_event_; | 201 scoped_ptr<base::WaitableEvent> channel_connected_event_; |
| 200 scoped_refptr<InternalMessageFilter> message_filter_; | 202 scoped_refptr<InternalMessageFilter> message_filter_; |
| 201 | 203 |
| 202 static MetroViewerProcessHost* instance_; | 204 static MetroViewerProcessHost* instance_; |
| 203 | 205 |
| 204 // Saved callbacks which inform the caller about the result of the open file/ | 206 // Saved callbacks which inform the caller about the result of the open file/ |
| 205 // save file/select operations. | 207 // save file/select operations. |
| 206 OpenFileCompletion file_open_completion_callback_; | 208 OpenFileCompletion file_open_completion_callback_; |
| 207 OpenMultipleFilesCompletion multi_file_open_completion_callback_; | 209 OpenMultipleFilesCompletion multi_file_open_completion_callback_; |
| 208 SaveFileCompletion file_saveas_completion_callback_; | 210 SaveFileCompletion file_saveas_completion_callback_; |
| 209 SelectFolderCompletion select_folder_completion_callback_; | 211 SelectFolderCompletion select_folder_completion_callback_; |
| 210 FileSelectionCanceled failure_callback_; | 212 FileSelectionCanceled failure_callback_; |
| 211 | 213 |
| 212 DISALLOW_COPY_AND_ASSIGN(MetroViewerProcessHost); | 214 DISALLOW_COPY_AND_ASSIGN(MetroViewerProcessHost); |
| 213 }; | 215 }; |
| 214 | 216 |
| 215 } // namespace win8 | 217 } // namespace win8 |
| 216 | 218 |
| 217 #endif // WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_ | 219 #endif // WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_ |
| OLD | NEW |