| 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/window_tree_host_win.h" | 5 #include "ui/aura/window_tree_host_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "ui/aura/client/cursor_client.h" | 12 #include "ui/aura/client/cursor_client.h" |
| 13 #include "ui/aura/window_event_dispatcher.h" | 13 #include "ui/aura/window_event_dispatcher.h" |
| 14 #include "ui/base/cursor/cursor_loader_win.h" | 14 #include "ui/base/cursor/cursor_loader_win.h" |
| 15 #include "ui/base/view_prop.h" | 15 #include "ui/base/view_prop.h" |
| 16 #include "ui/compositor/compositor.h" | 16 #include "ui/compositor/compositor.h" |
| 17 #include "ui/events/event.h" | 17 #include "ui/events/event.h" |
| 18 #include "ui/gfx/display.h" | 18 #include "ui/gfx/display.h" |
| 19 #include "ui/gfx/geometry/insets.h" | 19 #include "ui/gfx/geometry/insets.h" |
| 20 #include "ui/gfx/native_widget_types.h" | 20 #include "ui/gfx/native_widget_types.h" |
| 21 #include "ui/gfx/screen.h" | 21 #include "ui/gfx/screen.h" |
| 22 #include "ui/platform_window/win/win_window.h" | 22 #include "ui/platform_window/win/win_window.h" |
| 23 | 23 |
| 24 using std::max; | 24 using std::max; |
| 25 using std::min; | 25 using std::min; |
| 26 | 26 |
| 27 namespace aura { | 27 namespace aura { |
| 28 namespace { | |
| 29 | |
| 30 bool use_popup_as_root_window_for_test = false; | |
| 31 | |
| 32 } // namespace | |
| 33 | 28 |
| 34 // static | 29 // static |
| 35 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) { | 30 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) { |
| 36 return new WindowTreeHostWin(bounds); | 31 return new WindowTreeHostWin(bounds); |
| 37 } | 32 } |
| 38 | 33 |
| 39 // static | 34 // static |
| 40 gfx::Size WindowTreeHost::GetNativeScreenSize() { | 35 gfx::Size WindowTreeHost::GetNativeScreenSize() { |
| 41 return gfx::Size(GetSystemMetrics(SM_CXSCREEN), | 36 return gfx::Size(GetSystemMetrics(SM_CXSCREEN), |
| 42 GetSystemMetrics(SM_CYSCREEN)); | 37 GetSystemMetrics(SM_CYSCREEN)); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 widget_ = widget; | 151 widget_ = widget; |
| 157 CreateCompositor(widget); | 152 CreateCompositor(widget); |
| 158 } | 153 } |
| 159 | 154 |
| 160 void WindowTreeHostWin::OnActivationChanged(bool active) { | 155 void WindowTreeHostWin::OnActivationChanged(bool active) { |
| 161 if (active) | 156 if (active) |
| 162 OnHostActivated(); | 157 OnHostActivated(); |
| 163 } | 158 } |
| 164 | 159 |
| 165 } // namespace aura | 160 } // namespace aura |
| OLD | NEW |