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

Side by Side Diff: mojo/views/native_widget_view_manager.cc

Issue 383123006: Preliminary interactive layout of window manager's demo_launcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resize KeyboardManager, sync Created 6 years, 5 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 | Annotate | Revision Log
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/views/native_widget_view_manager.h" 5 #include "mojo/views/native_widget_view_manager.h"
6 6
7 #include "mojo/aura/window_tree_host_mojo.h" 7 #include "mojo/aura/window_tree_host_mojo.h"
8 #include "mojo/services/public/cpp/input_events/input_events_type_converters.h" 8 #include "mojo/services/public/cpp/input_events/input_events_type_converters.h"
9 #include "mojo/services/public/cpp/view_manager/view.h" 9 #include "mojo/services/public/cpp/view_manager/view.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 new_view->AddObserver(this); 146 new_view->AddObserver(this);
147 } 147 }
148 148
149 void NativeWidgetViewManager::OnViewInputEvent(view_manager::View* view, 149 void NativeWidgetViewManager::OnViewInputEvent(view_manager::View* view,
150 const EventPtr& event) { 150 const EventPtr& event) {
151 scoped_ptr<ui::Event> ui_event(event.To<scoped_ptr<ui::Event> >()); 151 scoped_ptr<ui::Event> ui_event(event.To<scoped_ptr<ui::Event> >());
152 if (ui_event.get()) 152 if (ui_event.get())
153 window_tree_host_->SendEventToProcessor(ui_event.get()); 153 window_tree_host_->SendEventToProcessor(ui_event.get());
154 } 154 }
155 155
156 void NativeWidgetViewManager::OnNodeBoundsChanged(view_manager::Node* node,
157 const gfx::Rect&,
158 const gfx::Rect&) {
159 GetWidget()->SetBounds(gfx::Rect(node->bounds().size()));
160 }
161
156 } // namespace mojo 162 } // namespace mojo
OLDNEW
« mojo/views/native_widget_view_manager.h ('K') | « mojo/views/native_widget_view_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698