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

Side by Side Diff: ui/aura/window.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 10 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
« no previous file with comments | « ui/aura/test/aura_test_helper.cc ('k') | ui/aura/window_tree_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/aura/test/aura_test_helper.cc ('k') | ui/aura/window_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698