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

Side by Side Diff: extensions/shell/browser/shell_screen.cc

Issue 1924133002: Rename gfx::Display/Screen to display::Display/Screen in extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
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 "extensions/shell/browser/shell_screen.h" 5 #include "extensions/shell/browser/shell_screen.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 DCHECK_EQ(host_->window(), window); 50 DCHECK_EQ(host_->window(), window);
51 display_.SetSize(new_bounds.size()); 51 display_.SetSize(new_bounds.size());
52 } 52 }
53 53
54 void ShellScreen::OnWindowDestroying(aura::Window* window) { 54 void ShellScreen::OnWindowDestroying(aura::Window* window) {
55 DCHECK_EQ(host_->window(), window); 55 DCHECK_EQ(host_->window(), window);
56 host_->window()->RemoveObserver(this); 56 host_->window()->RemoveObserver(this);
57 host_ = nullptr; 57 host_ = nullptr;
58 } 58 }
59 59
60 // gfx::Screen overrides: 60 // display::Screen overrides:
61 61
62 gfx::Point ShellScreen::GetCursorScreenPoint() { 62 gfx::Point ShellScreen::GetCursorScreenPoint() {
63 return aura::Env::GetInstance()->last_mouse_location(); 63 return aura::Env::GetInstance()->last_mouse_location();
64 } 64 }
65 65
66 gfx::NativeWindow ShellScreen::GetWindowUnderCursor() { 66 gfx::NativeWindow ShellScreen::GetWindowUnderCursor() {
67 return GetWindowAtScreenPoint(GetCursorScreenPoint()); 67 return GetWindowAtScreenPoint(GetCursorScreenPoint());
68 } 68 }
69 69
70 gfx::NativeWindow ShellScreen::GetWindowAtScreenPoint(const gfx::Point& point) { 70 gfx::NativeWindow ShellScreen::GetWindowAtScreenPoint(const gfx::Point& point) {
71 return host_->window()->GetTopWindowContainingPoint(point); 71 return host_->window()->GetTopWindowContainingPoint(point);
72 } 72 }
73 73
74 int ShellScreen::GetNumDisplays() const { 74 int ShellScreen::GetNumDisplays() const {
75 return 1; 75 return 1;
76 } 76 }
77 77
78 std::vector<gfx::Display> ShellScreen::GetAllDisplays() const { 78 std::vector<display::Display> ShellScreen::GetAllDisplays() const {
79 return std::vector<gfx::Display>(1, display_); 79 return std::vector<display::Display>(1, display_);
80 } 80 }
81 81
82 gfx::Display ShellScreen::GetDisplayNearestWindow( 82 display::Display ShellScreen::GetDisplayNearestWindow(
83 gfx::NativeWindow window) const { 83 gfx::NativeWindow window) const {
84 return display_; 84 return display_;
85 } 85 }
86 86
87 gfx::Display ShellScreen::GetDisplayNearestPoint( 87 display::Display ShellScreen::GetDisplayNearestPoint(
88 const gfx::Point& point) const { 88 const gfx::Point& point) const {
89 return display_; 89 return display_;
90 } 90 }
91 91
92 gfx::Display ShellScreen::GetDisplayMatching( 92 display::Display ShellScreen::GetDisplayMatching(
93 const gfx::Rect& match_rect) const { 93 const gfx::Rect& match_rect) const {
94 return display_; 94 return display_;
95 } 95 }
96 96
97 gfx::Display ShellScreen::GetPrimaryDisplay() const { 97 display::Display ShellScreen::GetPrimaryDisplay() const {
98 return display_; 98 return display_;
99 } 99 }
100 100
101 void ShellScreen::AddObserver(gfx::DisplayObserver* observer) { 101 void ShellScreen::AddObserver(display::DisplayObserver* observer) {}
102 }
103 102
104 void ShellScreen::RemoveObserver(gfx::DisplayObserver* observer) { 103 void ShellScreen::RemoveObserver(display::DisplayObserver* observer) {}
105 }
106 104
107 } // namespace extensions 105 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_screen.h ('k') | extensions/shell/browser/shell_screen_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698