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 "mojo/services/public/cpp/view_manager/view_manager.h" | 5 #include "mojo/services/public/cpp/view_manager/view_manager.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "mojo/application_manager/application_manager.h" | 10 #include "mojo/application_manager/application_manager.h" |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 test_helper_.SetLoaderForURL( | 309 test_helper_.SetLoaderForURL( |
310 scoped_ptr<ApplicationLoader>( | 310 scoped_ptr<ApplicationLoader>( |
311 new ConnectApplicationLoader(ready_callback)), | 311 new ConnectApplicationLoader(ready_callback)), |
312 GURL(kWindowManagerURL)); | 312 GURL(kWindowManagerURL)); |
313 test_helper_.SetLoaderForURL( | 313 test_helper_.SetLoaderForURL( |
314 scoped_ptr<ApplicationLoader>( | 314 scoped_ptr<ApplicationLoader>( |
315 new ConnectApplicationLoader(ready_callback)), | 315 new ConnectApplicationLoader(ready_callback)), |
316 GURL(kEmbeddedApp1URL)); | 316 GURL(kEmbeddedApp1URL)); |
317 | 317 |
318 test_helper_.application_manager()->ConnectToService( | 318 test_helper_.application_manager()->ConnectToService( |
319 GURL("mojo:mojo_view_manager"), &view_manager_init_); | 319 GURL("mojo:view_manager"), &view_manager_init_); |
320 ASSERT_TRUE(EmbedRoot(view_manager_init_.get(), kWindowManagerURL)); | 320 ASSERT_TRUE(EmbedRoot(view_manager_init_.get(), kWindowManagerURL)); |
321 } | 321 } |
322 | 322 |
323 void EmbedRootCallback(bool* result_cache, bool result) { | 323 void EmbedRootCallback(bool* result_cache, bool result) { |
324 *result_cache = result; | 324 *result_cache = result; |
325 } | 325 } |
326 | 326 |
327 bool EmbedRoot(ViewManagerInitService* view_manager_init, | 327 bool EmbedRoot(ViewManagerInitService* view_manager_init, |
328 const std::string& url) { | 328 const std::string& url) { |
329 bool result = false; | 329 bool result = false; |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 | 641 |
642 // TODO(beng): tests for view event dispatcher. | 642 // TODO(beng): tests for view event dispatcher. |
643 // - verify that we see events for all views. | 643 // - verify that we see events for all views. |
644 | 644 |
645 // TODO(beng): tests for focus: | 645 // TODO(beng): tests for focus: |
646 // - focus between two views known to a connection | 646 // - focus between two views known to a connection |
647 // - focus between views unknown to one of the connections. | 647 // - focus between views unknown to one of the connections. |
648 // - focus between views unknown to either connection. | 648 // - focus between views unknown to either connection. |
649 | 649 |
650 } // namespace mojo | 650 } // namespace mojo |
OLD | NEW |