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

Side by Side Diff: ash/common/wm/overview/window_selector.cc

Issue 2679423002: ash: Clean up naming of paint-related identifiers (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « ash/common/wm/overview/window_grid.cc ('k') | ash/common/wm/overview/window_selector_item.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/common/wm/overview/window_selector.h" 5 #include "ash/common/wm/overview/window_selector.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 void OnPaint(gfx::Canvas* canvas) override { 109 void OnPaint(gfx::Canvas* canvas) override {
110 views::View::OnPaint(canvas); 110 views::View::OnPaint(canvas);
111 111
112 SkScalar radius = SkIntToScalar(corner_radius_); 112 SkScalar radius = SkIntToScalar(corner_radius_);
113 const SkScalar kRadius[8] = {radius, radius, radius, radius, 113 const SkScalar kRadius[8] = {radius, radius, radius, radius,
114 radius, radius, radius, radius}; 114 radius, radius, radius, radius};
115 SkPath path; 115 SkPath path;
116 gfx::Rect bounds(size()); 116 gfx::Rect bounds(size());
117 path.addRoundRect(gfx::RectToSkRect(bounds), kRadius); 117 path.addRoundRect(gfx::RectToSkRect(bounds), kRadius);
118 118
119 cc::PaintFlags paint;
120 paint.setAntiAlias(true);
121 canvas->ClipPath(path, true); 119 canvas->ClipPath(path, true);
122 canvas->DrawColor(background_); 120 canvas->DrawColor(background_);
123 } 121 }
124 122
125 private: 123 private:
126 int corner_radius_; 124 int corner_radius_;
127 SkColor background_; 125 SkColor background_;
128 126
129 DISALLOW_COPY_AND_ASSIGN(RoundedContainerView); 127 DISALLOW_COPY_AND_ASSIGN(RoundedContainerView);
130 }; 128 };
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 for (size_t i = 0; i <= grid_list_.size() && 663 for (size_t i = 0; i <= grid_list_.size() &&
666 grid_list_[selected_grid_index_]->Move(direction, animate); 664 grid_list_[selected_grid_index_]->Move(direction, animate);
667 i++) { 665 i++) {
668 selected_grid_index_ = 666 selected_grid_index_ =
669 (selected_grid_index_ + display_direction + grid_list_.size()) % 667 (selected_grid_index_ + display_direction + grid_list_.size()) %
670 grid_list_.size(); 668 grid_list_.size();
671 } 669 }
672 } 670 }
673 671
674 } // namespace ash 672 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/overview/window_grid.cc ('k') | ash/common/wm/overview/window_selector_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698