OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/aura/root_window.h" | 5 #include "ui/aura/root_window.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 if (target->event_filter()) | 72 if (target->event_filter()) |
73 filters->push_back(target->event_filter()); | 73 filters->push_back(target->event_filter()); |
74 target = target->parent(); | 74 target = target->parent(); |
75 } | 75 } |
76 if (Env::GetInstance()->event_filter()) | 76 if (Env::GetInstance()->event_filter()) |
77 filters->push_back(Env::GetInstance()->event_filter()); | 77 filters->push_back(Env::GetInstance()->event_filter()); |
78 } | 78 } |
79 | 79 |
80 float GetDeviceScaleFactorFromMonitor(const aura::Window* window) { | 80 float GetDeviceScaleFactorFromMonitor(const aura::Window* window) { |
81 MonitorManager* monitor_manager = Env::GetInstance()->monitor_manager(); | 81 MonitorManager* monitor_manager = Env::GetInstance()->monitor_manager(); |
82 return monitor_manager->GetMonitorNearestWindow(window).device_scale_factor(); | 82 return monitor_manager->GetDisplayNearestWindow(window).device_scale_factor(); |
83 } | 83 } |
84 | 84 |
85 Window* ConsumerToWindow(ui::GestureConsumer* consumer) { | 85 Window* ConsumerToWindow(ui::GestureConsumer* consumer) { |
86 return consumer && !consumer->ignores_events() ? | 86 return consumer && !consumer->ignores_events() ? |
87 static_cast<Window*>(consumer) : NULL; | 87 static_cast<Window*>(consumer) : NULL; |
88 } | 88 } |
89 | 89 |
90 } // namespace | 90 } // namespace |
91 | 91 |
92 CompositorLock::CompositorLock(RootWindow* root_window) | 92 CompositorLock::CompositorLock(RootWindow* root_window) |
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 void RootWindow::UnlockCompositor() { | 1039 void RootWindow::UnlockCompositor() { |
1040 DCHECK(compositor_lock_); | 1040 DCHECK(compositor_lock_); |
1041 compositor_lock_ = NULL; | 1041 compositor_lock_ = NULL; |
1042 if (draw_on_compositor_unlock_) { | 1042 if (draw_on_compositor_unlock_) { |
1043 draw_on_compositor_unlock_ = false; | 1043 draw_on_compositor_unlock_ = false; |
1044 ScheduleDraw(); | 1044 ScheduleDraw(); |
1045 } | 1045 } |
1046 } | 1046 } |
1047 | 1047 |
1048 } // namespace aura | 1048 } // namespace aura |
OLD | NEW |