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

Side by Side Diff: components/mus/view_tree_host_impl.cc

Issue 1328953003: Mandoline: Support transforms and clipping of OOPIFs and events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase works! Created 5 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/mus/view_tree_host_impl.h" 5 #include "components/mus/view_tree_host_impl.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "components/mus/connection_manager.h" 8 #include "components/mus/connection_manager.h"
9 #include "components/mus/display_manager.h" 9 #include "components/mus/display_manager.h"
10 #include "components/mus/focus_controller.h" 10 #include "components/mus/focus_controller.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // can destroy the corresponding ViewTreeHostConnection, and |this|. So 143 // can destroy the corresponding ViewTreeHostConnection, and |this|. So
144 // setting it to nullptr afterwards in reset() ends up writing on free'd 144 // setting it to nullptr afterwards in reset() ends up writing on free'd
145 // memory. So transfer over to a local scoped_ptr<> before destroying it. 145 // memory. So transfer over to a local scoped_ptr<> before destroying it.
146 scoped_ptr<DisplayManager> temp = display_manager_.Pass(); 146 scoped_ptr<DisplayManager> temp = display_manager_.Pass();
147 } 147 }
148 148
149 ServerView* ViewTreeHostImpl::GetRootView() { 149 ServerView* ViewTreeHostImpl::GetRootView() {
150 return root_.get(); 150 return root_.get();
151 } 151 }
152 152
153 void ViewTreeHostImpl::OnEvent(mojo::EventPtr event) { 153 void ViewTreeHostImpl::OnEvent(ViewId id, mojo::EventPtr event) {
154 ServerView* view = connection_manager_->GetView(id);
155 if (view) {
156 DispatchInputEventToView(view, event.Pass());
157 return;
158 }
154 event_dispatcher_.OnEvent(event.Pass()); 159 event_dispatcher_.OnEvent(event.Pass());
155 } 160 }
156 161
157 void ViewTreeHostImpl::OnDisplayClosed() { 162 void ViewTreeHostImpl::OnDisplayClosed() {
158 if (delegate_) 163 if (delegate_)
159 delegate_->OnDisplayClosed(); 164 delegate_->OnDisplayClosed();
160 } 165 }
161 166
162 void ViewTreeHostImpl::OnViewportMetricsChanged( 167 void ViewTreeHostImpl::OnViewportMetricsChanged(
163 const mojo::ViewportMetrics& old_metrics, 168 const mojo::ViewportMetrics& old_metrics,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 root_tree != embedded_connection_old && 237 root_tree != embedded_connection_old &&
233 root_tree != owning_connection_new && 238 root_tree != owning_connection_new &&
234 root_tree != embedded_connection_new) { 239 root_tree != embedded_connection_new) {
235 root_tree->ProcessFocusChanged(old_focused_view, new_focused_view); 240 root_tree->ProcessFocusChanged(old_focused_view, new_focused_view);
236 } 241 }
237 242
238 UpdateTextInputState(new_focused_view, new_focused_view->text_input_state()); 243 UpdateTextInputState(new_focused_view, new_focused_view->text_input_state());
239 } 244 }
240 245
241 } // namespace view_manager 246 } // namespace view_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698