| 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 <string> | 8 #include "base/memory/scoped_ptr.h" |
| 9 | |
| 10 #include "win8/viewer/metro_viewer_process_host.h" | 9 #include "win8/viewer/metro_viewer_process_host.h" |
| 11 | 10 |
| 12 class AcceleratedSurface; | 11 class AcceleratedSurface; |
| 13 | 12 |
| 14 namespace ash { | 13 namespace ash { |
| 15 namespace test { | 14 namespace test { |
| 16 | 15 |
| 17 class TestMetroViewerProcessHost : public win8::MetroViewerProcessHost { | 16 class TestMetroViewerProcessHost : public win8::MetroViewerProcessHost { |
| 18 public: | 17 public: |
| 19 TestMetroViewerProcessHost(const std::string& ipc_channel_name, | 18 TestMetroViewerProcessHost(base::SingleThreadTaskRunner* ipc_task_runner); |
| 20 base::SingleThreadTaskRunner* ipc_task_runner); | |
| 21 virtual ~TestMetroViewerProcessHost(); | 19 virtual ~TestMetroViewerProcessHost(); |
| 22 | 20 |
| 23 bool closed_unexpectedly() { return closed_unexpectedly_; } | 21 bool closed_unexpectedly() { return closed_unexpectedly_; } |
| 24 | 22 |
| 25 private: | 23 private: |
| 26 // win8::MetroViewerProcessHost implementation | 24 // win8::MetroViewerProcessHost implementation |
| 27 virtual void OnChannelError() OVERRIDE; | 25 virtual void OnChannelError() OVERRIDE; |
| 28 virtual void OnSetTargetSurface(gfx::NativeViewId target_surface) OVERRIDE; | 26 virtual void OnSetTargetSurface(gfx::NativeViewId target_surface) OVERRIDE; |
| 29 virtual void OnOpenURL(const string16& url) OVERRIDE; | 27 virtual void OnOpenURL(const string16& url) OVERRIDE; |
| 30 virtual void OnHandleSearchRequest(const string16& search_string) OVERRIDE; | 28 virtual void OnHandleSearchRequest(const string16& search_string) OVERRIDE; |
| 31 | 29 |
| 32 scoped_ptr<AcceleratedSurface> backing_surface; | 30 scoped_ptr<AcceleratedSurface> backing_surface_; |
| 33 | 31 |
| 34 bool closed_unexpectedly_; | 32 bool closed_unexpectedly_; |
| 35 | 33 |
| 36 DISALLOW_COPY_AND_ASSIGN(TestMetroViewerProcessHost); | 34 DISALLOW_COPY_AND_ASSIGN(TestMetroViewerProcessHost); |
| 37 }; | 35 }; |
| 38 | 36 |
| 39 | 37 |
| 40 } // namespace test | 38 } // namespace test |
| 41 } // namespace ash | 39 } // namespace ash |
| 42 | 40 |
| 43 #endif // ASH_TEST_TEST_METRO_VIEWER_PROCESS_HOST_H_ | 41 #endif // ASH_TEST_TEST_METRO_VIEWER_PROCESS_HOST_H_ |
| OLD | NEW |