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.h" | 5 #include "ui/aura/window.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <utility> | 10 #include <utility> |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 ~ScopedCursorHider() { | 60 ~ScopedCursorHider() { |
61 if (!window_->IsRootWindow()) | 61 if (!window_->IsRootWindow()) |
62 return; | 62 return; |
63 | 63 |
64 // Update the device scale factor of the cursor client only when the last | 64 // Update the device scale factor of the cursor client only when the last |
65 // mouse location is on this root window. | 65 // mouse location is on this root window. |
66 if (hid_cursor_) { | 66 if (hid_cursor_) { |
67 client::CursorClient* cursor_client = client::GetCursorClient(window_); | 67 client::CursorClient* cursor_client = client::GetCursorClient(window_); |
68 if (cursor_client) { | 68 if (cursor_client) { |
69 const gfx::Display& display = | 69 const gfx::Display& display = |
70 gfx::Screen::GetScreenFor(window_)->GetDisplayNearestWindow( | 70 gfx::Screen::GetScreen()->GetDisplayNearestWindow(window_); |
71 window_); | |
72 cursor_client->SetDisplay(display); | 71 cursor_client->SetDisplay(display); |
73 cursor_client->ShowCursor(); | 72 cursor_client->ShowCursor(); |
74 } | 73 } |
75 } | 74 } |
76 } | 75 } |
77 | 76 |
78 private: | 77 private: |
79 Window* window_; | 78 Window* window_; |
80 bool hid_cursor_; | 79 bool hid_cursor_; |
81 | 80 |
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1111 layer_name = "Unnamed Window"; | 1110 layer_name = "Unnamed Window"; |
1112 | 1111 |
1113 if (id_ != -1) | 1112 if (id_ != -1) |
1114 layer_name += " " + base::IntToString(id_); | 1113 layer_name += " " + base::IntToString(id_); |
1115 | 1114 |
1116 layer()->set_name(layer_name); | 1115 layer()->set_name(layer_name); |
1117 #endif | 1116 #endif |
1118 } | 1117 } |
1119 | 1118 |
1120 } // namespace aura | 1119 } // namespace aura |
OLD | NEW |