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

Side by Side Diff: ash/wm/workspace/workspace_window_resizer_unittest.cc

Issue 14297013: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/wm/workspace/workspace_window_resizer.h" 5 #include "ash/wm/workspace/workspace_window_resizer.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/screen_ash.h" 9 #include "ash/screen_ash.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 115 }
116 116
117 // Returns a string identifying the z-order of each of the known child windows 117 // Returns a string identifying the z-order of each of the known child windows
118 // of |parent|. The returned string constains the id of the known windows and 118 // of |parent|. The returned string constains the id of the known windows and
119 // is ordered from topmost to bottomost windows. 119 // is ordered from topmost to bottomost windows.
120 std::string WindowOrderAsString(aura::Window* parent) const { 120 std::string WindowOrderAsString(aura::Window* parent) const {
121 std::string result; 121 std::string result;
122 const aura::Window::Windows& windows = parent->children(); 122 const aura::Window::Windows& windows = parent->children();
123 for (aura::Window::Windows::const_reverse_iterator i = windows.rbegin(); 123 for (aura::Window::Windows::const_reverse_iterator i = windows.rbegin();
124 i != windows.rend(); ++i) { 124 i != windows.rend(); ++i) {
125 if (*i == window_.get() || *i == window2_.get() || *i == window3_.get()) { 125 if (*i == window_ || *i == window2_ || *i == window3_) {
126 if (!result.empty()) 126 if (!result.empty())
127 result += " "; 127 result += " ";
128 result += base::IntToString((*i)->id()); 128 result += base::IntToString((*i)->id());
129 } 129 }
130 } 130 }
131 return result; 131 return result;
132 } 132 }
133 133
134 protected: 134 protected:
135 gfx::Point CalculateDragPoint(const WorkspaceWindowResizer& resizer, 135 gfx::Point CalculateDragPoint(const WorkspaceWindowResizer& resizer,
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1485 ASSERT_TRUE(resizer.get()); 1485 ASSERT_TRUE(resizer.get());
1486 // Move it 50 to the left, which should contract w1 and expand w2-3. 1486 // Move it 50 to the left, which should contract w1 and expand w2-3.
1487 resizer->Drag(CalculateDragPoint(*resizer, -50, 0), 0); 1487 resizer->Drag(CalculateDragPoint(*resizer, -50, 0), 0);
1488 EXPECT_EQ("100,100 98x100", window_->bounds().ToString()); 1488 EXPECT_EQ("100,100 98x100", window_->bounds().ToString());
1489 EXPECT_EQ("198,100 101x100", window2_->bounds().ToString()); 1489 EXPECT_EQ("198,100 101x100", window2_->bounds().ToString());
1490 EXPECT_EQ("299,100 101x100", window3_->bounds().ToString()); 1490 EXPECT_EQ("299,100 101x100", window3_->bounds().ToString());
1491 } 1491 }
1492 1492
1493 } // namespace internal 1493 } // namespace internal
1494 } // namespace ash 1494 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698