OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
7 #include "mojo/public/cpp/application/application_delegate.h" | 7 #include "mojo/public/cpp/application/application_delegate.h" |
8 #include "mojo/public/cpp/application/application_impl.h" | 8 #include "mojo/public/cpp/application/application_impl.h" |
9 #include "mojo/public/cpp/application/application_test_base.h" | 9 #include "mojo/public/cpp/application/application_test_base.h" |
10 #include "mojo/public/cpp/application/service_provider_impl.h" | 10 #include "mojo/public/cpp/application/service_provider_impl.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 ~TestApplication() override {} | 24 ~TestApplication() override {} |
25 | 25 |
26 View* root() const { return root_; } | 26 View* root() const { return root_; } |
27 | 27 |
28 void set_embed_callback(const base::Closure& callback) { | 28 void set_embed_callback(const base::Closure& callback) { |
29 embed_callback_ = callback; | 29 embed_callback_ = callback; |
30 } | 30 } |
31 | 31 |
32 private: | 32 private: |
33 // ApplicationDelegate: | 33 // ApplicationDelegate: |
34 virtual void Initialize(ApplicationImpl* app) override { | 34 void Initialize(ApplicationImpl* app) override { |
35 view_manager_client_factory_.reset( | 35 view_manager_client_factory_.reset( |
36 new ViewManagerClientFactory(app->shell(), this)); | 36 new ViewManagerClientFactory(app->shell(), this)); |
37 } | 37 } |
38 | 38 |
39 bool ConfigureIncomingConnection(ApplicationConnection* connection) override { | 39 bool ConfigureIncomingConnection(ApplicationConnection* connection) override { |
40 connection->AddService(view_manager_client_factory_.get()); | 40 connection->AddService(view_manager_client_factory_.get()); |
41 return true; | 41 return true; |
42 } | 42 } |
43 | 43 |
44 // ViewManagerDelegate: | 44 // ViewManagerDelegate: |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 // This call fails if the WindowManager does not have a FocusController. | 203 // This call fails if the WindowManager does not have a FocusController. |
204 EXPECT_EQ(0u, capture_view_id); | 204 EXPECT_EQ(0u, capture_view_id); |
205 EXPECT_EQ(0u, focused_view_id); | 205 EXPECT_EQ(0u, focused_view_id); |
206 EXPECT_EQ(0u, active_view_id); | 206 EXPECT_EQ(0u, active_view_id); |
207 } | 207 } |
208 | 208 |
209 // TODO(msw): Write tests exercising other WindowManager functionality. | 209 // TODO(msw): Write tests exercising other WindowManager functionality. |
210 | 210 |
211 } // namespace | 211 } // namespace |
212 } // namespace mojo | 212 } // namespace mojo |
OLD | NEW |