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

Side by Side Diff: ash/common/wm/panels/panel_layout_manager.cc

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem 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_selector_item.cc ('k') | ash/common/wm/window_cycle_list.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 (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/common/wm/panels/panel_layout_manager.h" 5 #include "ash/common/wm/panels/panel_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
11 #include "ash/common/shelf/wm_shelf.h" 11 #include "ash/common/shelf/wm_shelf.h"
12 #include "ash/common/shelf/wm_shelf_util.h" 12 #include "ash/common/shelf/wm_shelf_util.h"
13 #include "ash/common/wm/overview/window_selector_controller.h" 13 #include "ash/common/wm/overview/window_selector_controller.h"
14 #include "ash/common/wm/window_animation_types.h" 14 #include "ash/common/wm/window_animation_types.h"
15 #include "ash/common/wm/window_parenting_utils.h" 15 #include "ash/common/wm/window_parenting_utils.h"
16 #include "ash/common/wm/window_state.h" 16 #include "ash/common/wm/window_state.h"
17 #include "ash/common/wm_lookup.h" 17 #include "ash/common/wm_lookup.h"
18 #include "ash/common/wm_shell.h" 18 #include "ash/common/wm_shell.h"
19 #include "ash/common/wm_window.h" 19 #include "ash/common/wm_window.h"
20 #include "ash/common/wm_window_property.h" 20 #include "ash/common/wm_window_property.h"
21 #include "ash/public/cpp/shell_window_ids.h" 21 #include "ash/public/cpp/shell_window_ids.h"
22 #include "ash/root_window_controller.h" 22 #include "ash/root_window_controller.h"
23 #include "base/auto_reset.h" 23 #include "base/auto_reset.h"
24 #include "third_party/skia/include/core/SkColor.h" 24 #include "third_party/skia/include/core/SkColor.h"
25 #include "third_party/skia/include/core/SkPaint.h"
26 #include "third_party/skia/include/core/SkPath.h" 25 #include "third_party/skia/include/core/SkPath.h"
27 #include "ui/compositor/scoped_layer_animation_settings.h" 26 #include "ui/compositor/scoped_layer_animation_settings.h"
28 #include "ui/gfx/canvas.h" 27 #include "ui/gfx/canvas.h"
29 #include "ui/gfx/geometry/rect.h" 28 #include "ui/gfx/geometry/rect.h"
30 #include "ui/gfx/geometry/vector2d.h" 29 #include "ui/gfx/geometry/vector2d.h"
31 #include "ui/views/background.h" 30 #include "ui/views/background.h"
32 #include "ui/views/widget/widget.h" 31 #include "ui/views/widget/widget.h"
33 32
34 namespace ash { 33 namespace ash {
35 namespace { 34 namespace {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 path.lineTo(SkIntToScalar(kArrowHeight), SkIntToScalar(0)); 70 path.lineTo(SkIntToScalar(kArrowHeight), SkIntToScalar(0));
72 break; 71 break;
73 case SHELF_ALIGNMENT_RIGHT: 72 case SHELF_ALIGNMENT_RIGHT:
74 path.moveTo(SkIntToScalar(0), SkIntToScalar(0)); 73 path.moveTo(SkIntToScalar(0), SkIntToScalar(0));
75 path.lineTo(SkIntToScalar(kArrowHeight), 74 path.lineTo(SkIntToScalar(kArrowHeight),
76 SkIntToScalar(kArrowWidth / 2)); 75 SkIntToScalar(kArrowWidth / 2));
77 path.lineTo(SkIntToScalar(0), SkIntToScalar(kArrowWidth)); 76 path.lineTo(SkIntToScalar(0), SkIntToScalar(kArrowWidth));
78 break; 77 break;
79 } 78 }
80 // Hard code the arrow color for now. 79 // Hard code the arrow color for now.
81 SkPaint paint; 80 cc::PaintFlags paint;
82 paint.setStyle(SkPaint::kFill_Style); 81 paint.setStyle(cc::PaintFlags::kFill_Style);
83 paint.setColor(SkColorSetARGB(0xff, 0xe5, 0xe5, 0xe5)); 82 paint.setColor(SkColorSetARGB(0xff, 0xe5, 0xe5, 0xe5));
84 canvas->DrawPath(path, paint); 83 canvas->DrawPath(path, paint);
85 } 84 }
86 85
87 ShelfAlignment alignment() { return alignment_; } 86 ShelfAlignment alignment() { return alignment_; }
88 87
89 void set_alignment(ShelfAlignment alignment) { alignment_ = alignment; } 88 void set_alignment(ShelfAlignment alignment) { alignment_ = alignment; }
90 89
91 private: 90 private:
92 ShelfAlignment alignment_; 91 ShelfAlignment alignment_;
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 } 916 }
918 } 917 }
919 // This bounds change will have caused a change to the Shelf which does not 918 // This bounds change will have caused a change to the Shelf which does not
920 // propogate automatically to this class, so manually recalculate bounds. 919 // propogate automatically to this class, so manually recalculate bounds.
921 OnWindowResized(); 920 OnWindowResized();
922 } 921 }
923 922
924 void PanelLayoutManager::OnKeyboardClosed() {} 923 void PanelLayoutManager::OnKeyboardClosed() {}
925 924
926 } // namespace ash 925 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/overview/window_selector_item.cc ('k') | ash/common/wm/window_cycle_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698