| OLD | NEW |
| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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<display::Display> ShellScreen::GetAllDisplays() const { | 78 std::vector<display::Display> ShellScreen::GetAllDisplays() const { |
| 79 return std::vector<display::Display>(1, display_); | 79 return std::vector<display::Display>(1, display_); |
| 80 } | 80 } |
| 81 | 81 |
| 82 bool ShellScreen::GetDisplayWithDisplayId(int64_t display_id, |
| 83 display::Display* display) const { |
| 84 if (display_.id() == display_id) { |
| 85 *display = display_; |
| 86 return true; |
| 87 } |
| 88 return false; |
| 89 } |
| 90 |
| 82 display::Display ShellScreen::GetDisplayNearestWindow( | 91 display::Display ShellScreen::GetDisplayNearestWindow( |
| 83 gfx::NativeWindow window) const { | 92 gfx::NativeWindow window) const { |
| 84 return display_; | 93 return display_; |
| 85 } | 94 } |
| 86 | 95 |
| 87 display::Display ShellScreen::GetDisplayNearestPoint( | 96 display::Display ShellScreen::GetDisplayNearestPoint( |
| 88 const gfx::Point& point) const { | 97 const gfx::Point& point) const { |
| 89 return display_; | 98 return display_; |
| 90 } | 99 } |
| 91 | 100 |
| 92 display::Display ShellScreen::GetDisplayMatching( | 101 display::Display ShellScreen::GetDisplayMatching( |
| 93 const gfx::Rect& match_rect) const { | 102 const gfx::Rect& match_rect) const { |
| 94 return display_; | 103 return display_; |
| 95 } | 104 } |
| 96 | 105 |
| 97 display::Display ShellScreen::GetPrimaryDisplay() const { | 106 display::Display ShellScreen::GetPrimaryDisplay() const { |
| 98 return display_; | 107 return display_; |
| 99 } | 108 } |
| 100 | 109 |
| 101 void ShellScreen::AddObserver(display::DisplayObserver* observer) {} | 110 void ShellScreen::AddObserver(display::DisplayObserver* observer) {} |
| 102 | 111 |
| 103 void ShellScreen::RemoveObserver(display::DisplayObserver* observer) {} | 112 void ShellScreen::RemoveObserver(display::DisplayObserver* observer) {} |
| 104 | 113 |
| 105 } // namespace extensions | 114 } // namespace extensions |
| OLD | NEW |