Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: services/view_manager/view_manager_service_apptest.cc

Issue 943053003: Simple multi-url support for mojo apps (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: hate Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "mojo/public/cpp/application/application_delegate.h" 8 #include "mojo/public/cpp/application/application_delegate.h"
9 #include "mojo/public/cpp/application/application_impl.h" 9 #include "mojo/public/cpp/application/application_impl.h"
10 #include "mojo/public/cpp/application/application_test_base.h" 10 #include "mojo/public/cpp/application/application_test_base.h"
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 ASSERT_EQ(1u, changes1()->size()); 481 ASSERT_EQ(1u, changes1()->size());
482 EXPECT_EQ(CHANGE_TYPE_EMBED, (*changes1())[0].type); 482 EXPECT_EQ(CHANGE_TYPE_EMBED, (*changes1())[0].type);
483 // All these tests assume 1 for the client id. The only real assertion here 483 // All these tests assume 1 for the client id. The only real assertion here
484 // is the client id is not zero, but adding this as rest of code here 484 // is the client id is not zero, but adding this as rest of code here
485 // assumes 1. 485 // assumes 1.
486 ASSERT_EQ(1, (*changes1())[0].connection_id); 486 ASSERT_EQ(1, (*changes1())[0].connection_id);
487 changes1()->clear(); 487 changes1()->clear();
488 } 488 }
489 489
490 // ApplicationDelegate implementation. 490 // ApplicationDelegate implementation.
491 bool ConfigureIncomingConnection(ApplicationConnection* connection) override { 491 bool ConfigureIncomingConnection(ApplicationConnection* connection, const std: :string& url) override {
492 connection->AddService(&client_factory_); 492 connection->AddService(&client_factory_);
493 return true; 493 return true;
494 } 494 }
495 495
496 // mojo::InterfaceFactory<mojo::WindowManagerInternal> implementation. 496 // mojo::InterfaceFactory<mojo::WindowManagerInternal> implementation.
497 void Create( 497 void Create(
498 ApplicationConnection* connection, 498 ApplicationConnection* connection,
499 mojo::InterfaceRequest<mojo::WindowManagerInternal> request) override { 499 mojo::InterfaceRequest<mojo::WindowManagerInternal> request) override {
500 DCHECK(!wm_internal_binding_.is_bound()); 500 DCHECK(!wm_internal_binding_.is_bound());
501 wm_internal_binding_.Bind(request.Pass()); 501 wm_internal_binding_.Bind(request.Pass());
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 // TODO(sky): need to better track changes to initial connection. For example, 1490 // TODO(sky): need to better track changes to initial connection. For example,
1491 // that SetBounsdViews/AddView and the like don't result in messages to the 1491 // that SetBounsdViews/AddView and the like don't result in messages to the
1492 // originating connection. 1492 // originating connection.
1493 1493
1494 // TODO(sky): make sure coverage of what was 1494 // TODO(sky): make sure coverage of what was
1495 // ViewManagerTest.SecondEmbedRoot_InitService and 1495 // ViewManagerTest.SecondEmbedRoot_InitService and
1496 // ViewManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window manager 1496 // ViewManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window manager
1497 // tests. 1497 // tests.
1498 1498
1499 } // namespace view_manager 1499 } // namespace view_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698