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

Side by Side Diff: mojo/services/view_manager/public/cpp/tests/view_manager_unittest.cc

Issue 868463008: Remove Client relationship between mojo.Shell/mojo.Application (Closed) Base URL: git@github.com:domokit/mojo.git@app_impl_init
Patch Set: Created 5 years, 10 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 "mojo/services/view_manager/public/cpp/view_manager.h" 5 #include "mojo/services/view_manager/public/cpp/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/public/cpp/application/application_connection.h" 10 #include "mojo/public/cpp/application/application_connection.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 private: 56 private:
57 // Overridden from ApplicationDelegate: 57 // Overridden from ApplicationDelegate:
58 void Initialize(ApplicationImpl* app) override { 58 void Initialize(ApplicationImpl* app) override {
59 view_manager_client_factory_.reset( 59 view_manager_client_factory_.reset(
60 new ViewManagerClientFactory(app->shell(), this)); 60 new ViewManagerClientFactory(app->shell(), this));
61 } 61 }
62 62
63 // Overridden from ApplicationLoader: 63 // Overridden from ApplicationLoader:
64 void Load(ApplicationManager* manager, 64 void Load(ApplicationManager* manager,
65 const GURL& url, 65 const GURL& url,
66 ShellPtr shell, 66 InterfaceRequest<Application> application_request,
67 LoadCallback callback) override { 67 LoadCallback callback) override {
68 ASSERT_TRUE(shell); 68 ASSERT_TRUE(application_request.is_pending());
69 scoped_ptr<ApplicationImpl> app(new ApplicationImpl(this, shell.Pass())); 69 scoped_ptr<ApplicationImpl> app(
70 new ApplicationImpl(this, application_request.Pass()));
70 apps_.push_back(app.release()); 71 apps_.push_back(app.release());
71 } 72 }
72 73
73 void OnApplicationError(ApplicationManager* manager, 74 void OnApplicationError(ApplicationManager* manager,
74 const GURL& url) override {} 75 const GURL& url) override {}
75 76
76 bool ConfigureIncomingConnection(ApplicationConnection* connection) override { 77 bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
77 connection->AddService(view_manager_client_factory_.get()); 78 connection->AddService(view_manager_client_factory_.get());
78 return true; 79 return true;
79 } 80 }
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 643
643 // TODO(beng): tests for focus: 644 // TODO(beng): tests for focus:
644 // - focus between two views known to a connection 645 // - focus between two views known to a connection
645 // - focus between views unknown to one of the connections. 646 // - focus between views unknown to one of the connections.
646 // - focus between views unknown to either connection. 647 // - focus between views unknown to either connection.
647 648
648 // TODO(sky): need test of root being destroyed with existing views. See 649 // TODO(sky): need test of root being destroyed with existing views. See
649 // 434555 for specific case. 650 // 434555 for specific case.
650 651
651 } // namespace mojo 652 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698