OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_VIEW_H_ | |
6 #define CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_VIEW_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "chrome/browser/ui/views/dropdown_bar_host.h" | |
10 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" | |
11 #include "ui/views/accessible_pane_view.h" | |
12 | |
13 namespace gfx { | |
14 class Canvas; | |
15 class ImageSkia; | |
16 } // namespace gfx | |
17 | |
18 //////////////////////////////////////////////////////////////////////////////// | |
19 // | |
20 // The DropdownBarView is an abstract view to draw the UI controls of the | |
21 // DropdownBarHost. | |
22 // | |
23 //////////////////////////////////////////////////////////////////////////////// | |
24 class DropdownBarView : public views::AccessiblePaneView, | |
25 public DropdownBarHostDelegate { | |
26 public: | |
27 explicit DropdownBarView(DropdownBarHost* host); | |
28 ~DropdownBarView() override; | |
29 | |
30 protected: | |
31 // Returns the DropdownBarHost that manages this view. | |
32 DropdownBarHost* host() const { return host_; } | |
33 | |
34 void SetBackground(const gfx::ImageSkia* left_alpha_mask, | |
35 const gfx::ImageSkia* right_alpha_mask); | |
36 void SetBorderFromIds(int left_border_image_id, | |
37 int middle_border_image_id, | |
38 int right_border_image_id); | |
39 | |
40 private: | |
41 // The dropdown bar host that controls this view. | |
42 DropdownBarHost* host_; | |
43 | |
44 DISALLOW_COPY_AND_ASSIGN(DropdownBarView); | |
45 }; | |
46 #endif // CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_VIEW_H_ | |
OLD | NEW |