OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/debug/leak_annotations.h" | 9 #include "base/debug/leak_annotations.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 bool IsWindowUnderCursor(gfx::NativeWindow window) override { return false; } | 43 bool IsWindowUnderCursor(gfx::NativeWindow window) override { return false; } |
44 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override { | 44 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override { |
45 return gfx::NativeWindow(); | 45 return gfx::NativeWindow(); |
46 } | 46 } |
47 int GetNumDisplays() const override { | 47 int GetNumDisplays() const override { |
48 return static_cast<int>(displays_.size()); | 48 return static_cast<int>(displays_.size()); |
49 } | 49 } |
50 std::vector<display::Display> GetAllDisplays() const override { | 50 std::vector<display::Display> GetAllDisplays() const override { |
51 return displays_; | 51 return displays_; |
52 } | 52 } |
| 53 bool GetDisplayWithDisplayId(int64_t display_id, |
| 54 display::Display* display) const override { |
| 55 for (const display::Display& display_in_list : displays_) { |
| 56 if (display_in_list.id() == display_id) { |
| 57 *display = display_in_list; |
| 58 return true; |
| 59 } |
| 60 } |
| 61 return false; |
| 62 } |
53 display::Display GetDisplayNearestWindow( | 63 display::Display GetDisplayNearestWindow( |
54 gfx::NativeView window) const override { | 64 gfx::NativeView window) const override { |
55 return display::Display(0); | 65 return display::Display(0); |
56 } | 66 } |
57 display::Display GetDisplayNearestPoint( | 67 display::Display GetDisplayNearestPoint( |
58 const gfx::Point& point) const override { | 68 const gfx::Point& point) const override { |
59 return display::Display(0); | 69 return display::Display(0); |
60 } | 70 } |
61 display::Display GetDisplayMatching( | 71 display::Display GetDisplayMatching( |
62 const gfx::Rect& match_rect) const override { | 72 const gfx::Rect& match_rect) const override { |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 enable_unified_function->set_extension(test_extension.get()); | 309 enable_unified_function->set_extension(test_extension.get()); |
300 ASSERT_TRUE(api_test_utils::RunFunction(enable_unified_function.get(), | 310 ASSERT_TRUE(api_test_utils::RunFunction(enable_unified_function.get(), |
301 "[false]", browser_context())); | 311 "[false]", browser_context())); |
302 EXPECT_FALSE(provider_->unified_desktop_enabled()); | 312 EXPECT_FALSE(provider_->unified_desktop_enabled()); |
303 } | 313 } |
304 } | 314 } |
305 | 315 |
306 #endif // !defined(OS_CHROMEOS) | 316 #endif // !defined(OS_CHROMEOS) |
307 | 317 |
308 } // namespace extensions | 318 } // namespace extensions |
OLD | NEW |