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

Side by Side Diff: services/window_manager/window_manager_api_unittest.cc

Issue 815003002: Nukes ViewManager arg from ViewManagerDelegate::OnEmbed (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: format Created 6 years 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
« no previous file with comments | « services/window_manager/main.cc ('k') | services/window_manager/window_manager_app.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/command_line.h" 6 #include "base/command_line.h"
7 #include "base/memory/scoped_vector.h" 7 #include "base/memory/scoped_vector.h"
8 #include "mojo/application_manager/application_manager.h" 8 #include "mojo/application_manager/application_manager.h"
9 #include "mojo/public/cpp/application/application_delegate.h" 9 #include "mojo/public/cpp/application/application_delegate.h"
10 #include "mojo/public/cpp/application/application_impl.h" 10 #include "mojo/public/cpp/application/application_impl.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 new mojo::ViewManagerClientFactory(app->shell(), this)); 98 new mojo::ViewManagerClientFactory(app->shell(), this));
99 } 99 }
100 100
101 bool ConfigureIncomingConnection( 101 bool ConfigureIncomingConnection(
102 mojo::ApplicationConnection* connection) override { 102 mojo::ApplicationConnection* connection) override {
103 connection->AddService(view_manager_client_factory_.get()); 103 connection->AddService(view_manager_client_factory_.get());
104 return true; 104 return true;
105 } 105 }
106 106
107 // Overridden from mojo::ViewManagerDelegate: 107 // Overridden from mojo::ViewManagerDelegate:
108 void OnEmbed(mojo::ViewManager* view_manager, 108 void OnEmbed(View* root,
109 View* root,
110 mojo::ServiceProviderImpl* exported_services, 109 mojo::ServiceProviderImpl* exported_services,
111 scoped_ptr<mojo::ServiceProvider> imported_services) override { 110 scoped_ptr<mojo::ServiceProvider> imported_services) override {
112 root_added_callback_.Run(root); 111 root_added_callback_.Run(root);
113 } 112 }
114 void OnViewManagerDisconnected(mojo::ViewManager* view_manager) override {} 113 void OnViewManagerDisconnected(mojo::ViewManager* view_manager) override {}
115 114
116 RootAddedCallback root_added_callback_; 115 RootAddedCallback root_added_callback_;
117 116
118 ScopedVector<ApplicationImpl> apps_; 117 ScopedVector<ApplicationImpl> apps_;
119 scoped_ptr<mojo::ViewManagerClientFactory> view_manager_client_factory_; 118 scoped_ptr<mojo::ViewManagerClientFactory> view_manager_client_factory_;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 260
262 Id second_window = OpenWindow(); 261 Id second_window = OpenWindow();
263 window_manager_->ActivateWindow(second_window, 262 window_manager_->ActivateWindow(second_window,
264 base::Bind(&EmptyResultCallback)); 263 base::Bind(&EmptyResultCallback));
265 ids = WaitForActiveWindowChange(); 264 ids = WaitForActiveWindowChange();
266 EXPECT_EQ(ids.first, first_window); 265 EXPECT_EQ(ids.first, first_window);
267 EXPECT_EQ(ids.second, second_window); 266 EXPECT_EQ(ids.second, second_window);
268 } 267 }
269 268
270 } // namespace window_manager 269 } // namespace window_manager
OLDNEW
« no previous file with comments | « services/window_manager/main.cc ('k') | services/window_manager/window_manager_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698