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

Unified Diff: third_party/mojo_services/src/view_manager/public/cpp/lib/view_manager_client_impl.cc

Issue 975973002: Update mojo sdk to rev f68e697e389943cd9bf9652397312280e96b127a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: shake fist at msvc 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 side-by-side diff with in-line comments
Download patch
Index: third_party/mojo_services/src/view_manager/public/cpp/lib/view_manager_client_impl.cc
diff --git a/third_party/mojo_services/src/view_manager/public/cpp/lib/view_manager_client_impl.cc b/third_party/mojo_services/src/view_manager/public/cpp/lib/view_manager_client_impl.cc
index 9a3c022d86a3a104b2d6ad42a0095a743d17a0bf..b0d4b33b09e3040aa2142b2f02bca58335f68d26 100644
--- a/third_party/mojo_services/src/view_manager/public/cpp/lib/view_manager_client_impl.cc
+++ b/third_party/mojo_services/src/view_manager/public/cpp/lib/view_manager_client_impl.cc
@@ -172,8 +172,8 @@ void ViewManagerClientImpl::SetSurfaceId(Id view_id, SurfaceIdPtr surface_id) {
void ViewManagerClientImpl::SetFocus(Id view_id) {
// In order for us to get here we had to have exposed a view, which implies we
// got a connection.
- DCHECK(window_manager_.get());
- window_manager_->FocusWindow(view_id, ActionCompletedCallback());
+ DCHECK(service_);
+ service_->PerformAction(view_id, "focus", ActionCompletedCallback());
}
void ViewManagerClientImpl::SetVisible(Id view_id, bool visible) {
@@ -418,6 +418,14 @@ void ViewManagerClientImpl::OnViewInputEvent(
ack_callback.Run();
}
+void ViewManagerClientImpl::OnPerformAction(
+ Id view_id,
+ const String& name,
+ const Callback<void(bool)>& callback) {
+ View* view = GetViewById(view_id);
+ callback.Run(delegate_->OnPerformAction(view, name));
+}
+
////////////////////////////////////////////////////////////////////////////////
// ViewManagerClientImpl, WindowManagerObserver implementation:

Powered by Google App Engine
This is Rietveld 408576698