| 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 ASH_TEST_TEST_METRO_VIEWER_PROCESS_HOST_H_ | 5 #ifndef ASH_TEST_TEST_METRO_VIEWER_PROCESS_HOST_H_ |
| 6 #define ASH_TEST_TEST_METRO_VIEWER_PROCESS_HOST_H_ | 6 #define ASH_TEST_TEST_METRO_VIEWER_PROCESS_HOST_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "win8/viewer/metro_viewer_process_host.h" | 9 #include "win8/viewer/metro_viewer_process_host.h" |
| 10 | 10 |
| 11 class AcceleratedSurface; | 11 class AcceleratedSurface; |
| 12 | 12 |
| 13 namespace ash { | 13 namespace ash { |
| 14 namespace test { | 14 namespace test { |
| 15 | 15 |
| 16 class TestMetroViewerProcessHost : public win8::MetroViewerProcessHost { | 16 class TestMetroViewerProcessHost : public win8::MetroViewerProcessHost { |
| 17 public: | 17 public: |
| 18 TestMetroViewerProcessHost( | 18 TestMetroViewerProcessHost( |
| 19 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner); | 19 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner); |
| 20 virtual ~TestMetroViewerProcessHost(); | 20 ~TestMetroViewerProcessHost() override; |
| 21 | 21 |
| 22 bool closed_unexpectedly() { return closed_unexpectedly_; } | 22 bool closed_unexpectedly() { return closed_unexpectedly_; } |
| 23 | 23 |
| 24 // Forcibly terminate the viewer. Used on completion of tests to ensure that | 24 // Forcibly terminate the viewer. Used on completion of tests to ensure that |
| 25 // it's gone (quickly) so that we can start the next test immediately. | 25 // it's gone (quickly) so that we can start the next test immediately. |
| 26 void TerminateViewer(); | 26 void TerminateViewer(); |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 // win8::MetroViewerProcessHost implementation | 29 // win8::MetroViewerProcessHost implementation |
| 30 virtual void OnChannelError() override; | 30 void OnChannelError() override; |
| 31 virtual void OnSetTargetSurface(gfx::NativeViewId target_surface, | 31 void OnSetTargetSurface(gfx::NativeViewId target_surface, |
| 32 float device_scale) override; | 32 float device_scale) override; |
| 33 virtual void OnOpenURL(const base::string16& url) override; | 33 void OnOpenURL(const base::string16& url) override; |
| 34 virtual void OnHandleSearchRequest( | 34 void OnHandleSearchRequest(const base::string16& search_string) override; |
| 35 const base::string16& search_string) override; | 35 void OnWindowSizeChanged(uint32 width, uint32 height) override; |
| 36 virtual void OnWindowSizeChanged(uint32 width, uint32 height) override; | |
| 37 | 36 |
| 38 bool closed_unexpectedly_; | 37 bool closed_unexpectedly_; |
| 39 | 38 |
| 40 DISALLOW_COPY_AND_ASSIGN(TestMetroViewerProcessHost); | 39 DISALLOW_COPY_AND_ASSIGN(TestMetroViewerProcessHost); |
| 41 }; | 40 }; |
| 42 | 41 |
| 43 | 42 |
| 44 } // namespace test | 43 } // namespace test |
| 45 } // namespace ash | 44 } // namespace ash |
| 46 | 45 |
| 47 #endif // ASH_TEST_TEST_METRO_VIEWER_PROCESS_HOST_H_ | 46 #endif // ASH_TEST_TEST_METRO_VIEWER_PROCESS_HOST_H_ |
| OLD | NEW |