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 <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 10 matching lines...) Expand all Loading... | |
21 namespace ash { | 21 namespace ash { |
22 namespace test { | 22 namespace test { |
23 | 23 |
24 class TestMetroViewerProcessHost : public IPC::Listener, | 24 class TestMetroViewerProcessHost : public IPC::Listener, |
25 public IPC::Sender, | 25 public IPC::Sender, |
26 public base::NonThreadSafe { | 26 public base::NonThreadSafe { |
27 public: | 27 public: |
28 explicit TestMetroViewerProcessHost(const std::string& ipc_channel_name); | 28 explicit TestMetroViewerProcessHost(const std::string& ipc_channel_name); |
29 virtual ~TestMetroViewerProcessHost(); | 29 virtual ~TestMetroViewerProcessHost(); |
30 | 30 |
31 // Launches the Chrome viewer process and blocks until that viewer process | 31 // Launches the viewer process associated with the given |app_user_model_id| |
32 // connects or until a timeout is reached. Returns true if the viewer process | 32 // and blocks until that viewer process connects or until a timeout is |
33 // connects before the timeout is reached. | 33 // reached. Returns true if the viewer process connects before the timeout is |
34 // reached. | |
34 // TODO(robertshield): This creates a run-time dependency on chrome.exe as the | 35 // TODO(robertshield): This creates a run-time dependency on chrome.exe as the |
grt (UTC plus 2)
2013/02/12 15:37:43
The dependency is created in the registration rath
robertshield
2013/02/12 16:57:08
Done (moved to test_registrar.cc).
| |
35 // viewer process and, indirectly, setup.exe as the only thing that can | 36 // viewer process. Investigate extracting the registration code and the metro |
36 // correctly register a program as the default browser on metro. Investigate | 37 // init code and building them into a standalone viewer process. |
37 // extracting the registration code and the metro init code and building them | 38 bool LaunchImmersiveChromeAndWaitForConnection( |
grt (UTC plus 2)
2013/02/12 15:37:43
Chrome -> Viewer?
robertshield
2013/02/12 16:57:08
Done.
| |
38 // into a standalone viewer process. | 39 const string16& app_user_model_id); |
39 bool LaunchImmersiveChromeAndWaitForConnection(); | |
40 | 40 |
41 // IPC::Sender implementation: | 41 // IPC::Sender implementation: |
42 virtual bool Send(IPC::Message* msg) OVERRIDE; | 42 virtual bool Send(IPC::Message* msg) OVERRIDE; |
43 | 43 |
44 // IPC::Listener implementation: | 44 // IPC::Listener implementation: |
45 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 45 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
46 virtual void OnChannelError() OVERRIDE; | 46 virtual void OnChannelError() OVERRIDE; |
47 | 47 |
48 bool closed_unexpectedly() { return closed_unexpectedly_; } | 48 bool closed_unexpectedly() { return closed_unexpectedly_; } |
49 | 49 |
(...skipping 29 matching lines...) Expand all Loading... | |
79 bool closed_unexpectedly_; | 79 bool closed_unexpectedly_; |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(TestMetroViewerProcessHost); | 81 DISALLOW_COPY_AND_ASSIGN(TestMetroViewerProcessHost); |
82 }; | 82 }; |
83 | 83 |
84 | 84 |
85 } // namespace test | 85 } // namespace test |
86 } // namespace ash | 86 } // namespace ash |
87 | 87 |
88 #endif // ASH_TEST_TEST_METRO_VIEWER_PROCESS_HOST_H_ | 88 #endif // ASH_TEST_TEST_METRO_VIEWER_PROCESS_HOST_H_ |
OLD | NEW |