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/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 const FileSelectionCanceled& on_failure); | 118 const FileSelectionCanceled& on_failure); |
119 | 119 |
120 protected: | 120 protected: |
121 // IPC::Sender implementation: | 121 // IPC::Sender implementation: |
122 virtual bool Send(IPC::Message* msg) OVERRIDE; | 122 virtual bool Send(IPC::Message* msg) OVERRIDE; |
123 | 123 |
124 // IPC::Listener implementation: | 124 // IPC::Listener implementation: |
125 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 125 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
126 virtual void OnChannelError() OVERRIDE = 0; | 126 virtual void OnChannelError() OVERRIDE = 0; |
127 | 127 |
| 128 void DisposeViewer(base::ProcessId viewer_process_id, bool force_immediately); |
| 129 |
128 private: | 130 private: |
129 // The following are the implementation for the corresponding static methods | 131 // The following are the implementation for the corresponding static methods |
130 // above, see them for descriptions. | 132 // above, see them for descriptions. |
131 void HandleOpenFileImpl(const base::string16& title, | 133 void HandleOpenFileImpl(const base::string16& title, |
132 const base::FilePath& default_path, | 134 const base::FilePath& default_path, |
133 const base::string16& filter, | 135 const base::string16& filter, |
134 const OpenFileCompletion& on_success, | 136 const OpenFileCompletion& on_success, |
135 const FileSelectionCanceled& on_failure); | 137 const FileSelectionCanceled& on_failure); |
136 void HandleOpenMultipleFilesImpl( | 138 void HandleOpenMultipleFilesImpl( |
137 const base::string16& title, | 139 const base::string16& title, |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 SaveFileCompletion file_saveas_completion_callback_; | 209 SaveFileCompletion file_saveas_completion_callback_; |
208 SelectFolderCompletion select_folder_completion_callback_; | 210 SelectFolderCompletion select_folder_completion_callback_; |
209 FileSelectionCanceled failure_callback_; | 211 FileSelectionCanceled failure_callback_; |
210 | 212 |
211 DISALLOW_COPY_AND_ASSIGN(MetroViewerProcessHost); | 213 DISALLOW_COPY_AND_ASSIGN(MetroViewerProcessHost); |
212 }; | 214 }; |
213 | 215 |
214 } // namespace win8 | 216 } // namespace win8 |
215 | 217 |
216 #endif // WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_ | 218 #endif // WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_ |
OLD | NEW |