| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |