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

Side by Side Diff: mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.cc

Issue 1118843003: Remove some InterfacePtr<> methods which directly deal with message pipe handles. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 "view_manager/public/cpp/lib/view_manager_client_impl.h" 5 #include "view_manager/public/cpp/lib/view_manager_client_impl.h"
6 6
7 #include "mojo/public/cpp/application/application_impl.h" 7 #include "mojo/public/cpp/application/application_impl.h"
8 #include "mojo/public/cpp/application/connect.h" 8 #include "mojo/public/cpp/application/connect.h"
9 #include "mojo/public/cpp/application/service_provider_impl.h" 9 #include "mojo/public/cpp/application/service_provider_impl.h"
10 #include "mojo/public/interfaces/application/service_provider.mojom.h" 10 #include "mojo/public/interfaces/application/service_provider.mojom.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 DCHECK(!service_); 284 DCHECK(!service_);
285 service_ = view_manager_service.Pass(); 285 service_ = view_manager_service.Pass();
286 } 286 }
287 connection_id_ = connection_id; 287 connection_id_ = connection_id;
288 creator_url_ = String::From(creator_url); 288 creator_url_ = String::From(creator_url);
289 289
290 DCHECK(!root_); 290 DCHECK(!root_);
291 root_ = AddViewToViewManager(this, nullptr, root_data); 291 root_ = AddViewToViewManager(this, nullptr, root_data);
292 root_->AddObserver(new RootObserver(root_)); 292 root_->AddObserver(new RootObserver(root_));
293 293
294 window_manager_.Bind(window_manager_pipe.Pass()); 294 window_manager_.Bind(
295 InterfacePtrInfo<WindowManager>(window_manager_pipe.Pass(), 0u));
295 WindowManagerObserverPtr observer; 296 WindowManagerObserverPtr observer;
296 wm_observer_binding_.Bind(GetProxy(&observer)); 297 wm_observer_binding_.Bind(GetProxy(&observer));
297 // binding to |this| is safe here as |window_manager_| is bound to our 298 // binding to |this| is safe here as |window_manager_| is bound to our
298 // lifetime. 299 // lifetime.
299 window_manager_->GetFocusedAndActiveViews( 300 window_manager_->GetFocusedAndActiveViews(
300 observer.Pass(), 301 observer.Pass(),
301 [this](uint32_t capture_view_id, uint32_t focused_view_id, 302 [this](uint32_t capture_view_id, uint32_t focused_view_id,
302 uint32_t active_view_id) { 303 uint32_t active_view_id) {
303 if (GetViewById(capture_view_id) != capture_view_) 304 if (GetViewById(capture_view_id) != capture_view_)
304 OnCaptureChanged(capture_view_id); 305 OnCaptureChanged(capture_view_id);
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 void ViewManagerClientImpl::OnActionCompleted(bool success) { 503 void ViewManagerClientImpl::OnActionCompleted(bool success) {
503 if (!change_acked_callback_.is_null()) 504 if (!change_acked_callback_.is_null())
504 change_acked_callback_.Run(); 505 change_acked_callback_.Run();
505 } 506 }
506 507
507 Callback<void(bool)> ViewManagerClientImpl::ActionCompletedCallback() { 508 Callback<void(bool)> ViewManagerClientImpl::ActionCompletedCallback() {
508 return [this](bool success) { OnActionCompleted(success); }; 509 return [this](bool success) { OnActionCompleted(success); };
509 } 510 }
510 511
511 } // namespace mojo 512 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/validation_unittest.cc ('k') | services/dart/content_handler_app_service_connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698