OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CHROME_BROWSER_METRO_VIEWER_CHROME_METRO_VIEWER_PROCESS_HOST_AURAWIN_H_ | 5 #ifndef CHROME_BROWSER_METRO_VIEWER_CHROME_METRO_VIEWER_PROCESS_HOST_AURAWIN_H_ |
6 #define CHROME_BROWSER_METRO_VIEWER_CHROME_METRO_VIEWER_PROCESS_HOST_AURAWIN_H_ | 6 #define CHROME_BROWSER_METRO_VIEWER_CHROME_METRO_VIEWER_PROCESS_HOST_AURAWIN_H_ |
7 | 7 |
8 #include "win8/viewer/metro_viewer_process_host.h" | 8 #include "win8/viewer/metro_viewer_process_host.h" |
9 | 9 |
| 10 namespace base { |
| 11 class FilePath; |
| 12 } |
| 13 |
| 14 // Handles the activate desktop command for Metro Chrome Ash. The |ash_exit| |
| 15 // parameter indicates whether the Ash process would be shutdown after |
| 16 // activating the desktop. |
| 17 void HandleActivateDesktop(const base::FilePath& shortcut, bool ash_exit); |
| 18 |
10 class ChromeMetroViewerProcessHost : public win8::MetroViewerProcessHost { | 19 class ChromeMetroViewerProcessHost : public win8::MetroViewerProcessHost { |
11 public: | 20 public: |
12 ChromeMetroViewerProcessHost(); | 21 ChromeMetroViewerProcessHost(); |
| 22 virtual ~ChromeMetroViewerProcessHost(); |
| 23 |
| 24 // Returns the singleton ChromeMetroViewerProcessHost instance. This may |
| 25 // return NULL. |
| 26 static ChromeMetroViewerProcessHost* instance() { |
| 27 return instance_; |
| 28 } |
13 | 29 |
14 private: | 30 private: |
15 // win8::MetroViewerProcessHost implementation | 31 // win8::MetroViewerProcessHost implementation |
16 virtual void OnChannelError() OVERRIDE; | 32 virtual void OnChannelError() OVERRIDE; |
17 // IPC::Listener implementation | 33 // IPC::Listener implementation |
18 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 34 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
19 virtual void OnSetTargetSurface(gfx::NativeViewId target_surface, | 35 virtual void OnSetTargetSurface(gfx::NativeViewId target_surface, |
20 float device_scale) OVERRIDE; | 36 float device_scale) OVERRIDE; |
21 virtual void OnOpenURL(const base::string16& url) OVERRIDE; | 37 virtual void OnOpenURL(const base::string16& url) OVERRIDE; |
22 virtual void OnHandleSearchRequest( | 38 virtual void OnHandleSearchRequest( |
23 const base::string16& search_string) OVERRIDE; | 39 const base::string16& search_string) OVERRIDE; |
24 virtual void OnWindowSizeChanged(uint32 width, uint32 height) OVERRIDE; | 40 virtual void OnWindowSizeChanged(uint32 width, uint32 height) OVERRIDE; |
25 | 41 |
| 42 static ChromeMetroViewerProcessHost* instance_; |
| 43 |
26 DISALLOW_COPY_AND_ASSIGN(ChromeMetroViewerProcessHost); | 44 DISALLOW_COPY_AND_ASSIGN(ChromeMetroViewerProcessHost); |
27 }; | 45 }; |
28 | 46 |
29 #endif // CHROME_BROWSER_METRO_VIEWER_CHROME_METRO_VIEWER_PROCESS_HOST_AURAWIN_
H_ | 47 #endif // CHROME_BROWSER_METRO_VIEWER_CHROME_METRO_VIEWER_PROCESS_HOST_AURAWIN_
H_ |
OLD | NEW |