OLD | NEW |
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/views/dropdown_bar_view.h" | 5 #include "chrome/browser/ui/views/dropdown_bar_view.h" |
6 | 6 |
7 #include "chrome/browser/themes/theme_service.h" | 7 #include "chrome/browser/themes/theme_service.h" |
8 #include "chrome/browser/ui/view_ids.h" | 8 #include "chrome/browser/ui/view_ids.h" |
9 #include "chrome/browser/ui/views/frame/browser_view.h" | 9 #include "chrome/browser/ui/views/frame/browser_view.h" |
10 #include "grit/theme_resources.h" | 10 #include "grit/theme_resources.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 // Background to paint toolbar background with rounded corners. | 28 // Background to paint toolbar background with rounded corners. |
29 class DropdownBackground : public views::Background { | 29 class DropdownBackground : public views::Background { |
30 public: | 30 public: |
31 explicit DropdownBackground(BrowserView* browser, | 31 explicit DropdownBackground(BrowserView* browser, |
32 const gfx::ImageSkia* left_alpha_mask, | 32 const gfx::ImageSkia* left_alpha_mask, |
33 const gfx::ImageSkia* right_alpha_mask); | 33 const gfx::ImageSkia* right_alpha_mask); |
34 virtual ~DropdownBackground() {} | 34 virtual ~DropdownBackground() {} |
35 | 35 |
36 // Overridden from views::Background. | 36 // Overridden from views::Background. |
37 virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE; | 37 virtual void Paint(gfx::Canvas* canvas, views::View* view) const override; |
38 | 38 |
39 private: | 39 private: |
40 BrowserView* browser_view_; | 40 BrowserView* browser_view_; |
41 const gfx::ImageSkia* left_alpha_mask_; | 41 const gfx::ImageSkia* left_alpha_mask_; |
42 const gfx::ImageSkia* right_alpha_mask_; | 42 const gfx::ImageSkia* right_alpha_mask_; |
43 | 43 |
44 DISALLOW_COPY_AND_ASSIGN(DropdownBackground); | 44 DISALLOW_COPY_AND_ASSIGN(DropdownBackground); |
45 }; | 45 }; |
46 | 46 |
47 DropdownBackground::DropdownBackground(BrowserView* browser_view, | 47 DropdownBackground::DropdownBackground(BrowserView* browser_view, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 } | 131 } |
132 | 132 |
133 void DropdownBarView::SetBorderFromIds(int left_border_image_id, | 133 void DropdownBarView::SetBorderFromIds(int left_border_image_id, |
134 int middle_border_image_id, | 134 int middle_border_image_id, |
135 int right_border_image_id) { | 135 int right_border_image_id) { |
136 int border_image_ids[3] = {left_border_image_id, middle_border_image_id, | 136 int border_image_ids[3] = {left_border_image_id, middle_border_image_id, |
137 right_border_image_id}; | 137 right_border_image_id}; |
138 SetBorder(views::Border::CreateBorderPainter( | 138 SetBorder(views::Border::CreateBorderPainter( |
139 new views::HorizontalPainter(border_image_ids), gfx::Insets())); | 139 new views::HorizontalPainter(border_image_ids), gfx::Insets())); |
140 } | 140 } |
OLD | NEW |