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

Side by Side Diff: extensions/browser/api/system_display/system_display_apitest.cc

Issue 2489873002: Change GetAllDisplays() in all screens to return a const vector&. (Closed)
Patch Set: roll back to rebase as dummy_screen_android is reverted Created 4 years, 1 month 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 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 29 matching lines...) Expand all
40 protected: 40 protected:
41 // Overridden from display::Screen: 41 // Overridden from display::Screen:
42 gfx::Point GetCursorScreenPoint() override { return gfx::Point(); } 42 gfx::Point GetCursorScreenPoint() override { return gfx::Point(); }
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 const std::vector<display::Display>& GetAllDisplays() const override {
51 return displays_; 51 return displays_;
52 } 52 }
53 display::Display GetDisplayNearestWindow( 53 display::Display GetDisplayNearestWindow(
54 gfx::NativeView window) const override { 54 gfx::NativeView window) const override {
55 return display::Display(0); 55 return display::Display(0);
56 } 56 }
57 display::Display GetDisplayNearestPoint( 57 display::Display GetDisplayNearestPoint(
58 const gfx::Point& point) const override { 58 const gfx::Point& point) const override {
59 return display::Display(0); 59 return display::Display(0);
60 } 60 }
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 enable_unified_function->set_extension(test_extension.get()); 299 enable_unified_function->set_extension(test_extension.get());
300 ASSERT_TRUE(api_test_utils::RunFunction(enable_unified_function.get(), 300 ASSERT_TRUE(api_test_utils::RunFunction(enable_unified_function.get(),
301 "[false]", browser_context())); 301 "[false]", browser_context()));
302 EXPECT_FALSE(provider_->unified_desktop_enabled()); 302 EXPECT_FALSE(provider_->unified_desktop_enabled());
303 } 303 }
304 } 304 }
305 305
306 #endif // !defined(OS_CHROMEOS) 306 #endif // !defined(OS_CHROMEOS)
307 307
308 } // namespace extensions 308 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc ('k') | ui/display/mac/screen_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698