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

Side by Side Diff: chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc

Issue 2489873002: Change GetAllDisplays() in all screens to return a const vector&. (Closed)
Patch Set: 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 (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 "chrome/browser/ui/window_sizer/window_sizer_common_unittest.h" 5 #include "chrome/browser/ui/window_sizer/window_sizer_common_unittest.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/common/wm/window_resizer.h" 10 #include "ash/common/wm/window_resizer.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 return false; 51 return false;
52 } 52 }
53 53
54 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override { 54 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override {
55 NOTREACHED(); 55 NOTREACHED();
56 return NULL; 56 return NULL;
57 } 57 }
58 58
59 int GetNumDisplays() const override { return displays_.size(); } 59 int GetNumDisplays() const override { return displays_.size(); }
60 60
61 std::vector<display::Display> GetAllDisplays() const override { 61 const std::vector<display::Display>& GetAllDisplays() const override {
62 return displays_; 62 return displays_;
63 } 63 }
64 64
65 display::Display GetDisplayNearestWindow( 65 display::Display GetDisplayNearestWindow(
66 gfx::NativeView view) const override { 66 gfx::NativeView view) const override {
67 #if defined(USE_AURA) 67 #if defined(USE_AURA)
68 return displays_[index_of_display_nearest_window_]; 68 return displays_[index_of_display_nearest_window_];
69 #else 69 #else
70 NOTREACHED(); 70 NOTREACHED();
71 return display::Display(); 71 return display::Display();
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 { // Check that a window which hangs out of the screen get moved back in. 466 { // Check that a window which hangs out of the screen get moved back in.
467 gfx::Rect window_bounds; 467 gfx::Rect window_bounds;
468 GetWindowBounds(p1024x768, p1024x768, gfx::Rect(), gfx::Rect(), 468 GetWindowBounds(p1024x768, p1024x768, gfx::Rect(), gfx::Rect(),
469 gfx::Rect(), DEFAULT, NULL, 469 gfx::Rect(), DEFAULT, NULL,
470 gfx::Rect(1020, 700, 100, 100), &window_bounds); 470 gfx::Rect(1020, 700, 100, 100), &window_bounds);
471 EXPECT_EQ("924,668 100x100", window_bounds.ToString()); 471 EXPECT_EQ("924,668 100x100", window_bounds.ToString());
472 } 472 }
473 } 473 }
474 474
475 #endif // defined(OS_MACOSX) 475 #endif // defined(OS_MACOSX)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698