| 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 #ifndef CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_VIEW_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/views/dropdown_bar_host.h" | 8 #include "chrome/browser/ui/views/dropdown_bar_host.h" |
| 9 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" | 9 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" |
| 10 #include "ui/views/accessible_pane_view.h" | 10 #include "ui/views/accessible_pane_view.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 protected: | 36 protected: |
| 37 // views::View: | 37 // views::View: |
| 38 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 38 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 39 | 39 |
| 40 // Returns the DropdownBarHost that manages this view. | 40 // Returns the DropdownBarHost that manages this view. |
| 41 DropdownBarHost* host() const { return host_; } | 41 DropdownBarHost* host() const { return host_; } |
| 42 | 42 |
| 43 void SetBackground(const gfx::ImageSkia* left_alpha_mask, | 43 void SetBackground(const gfx::ImageSkia* left_alpha_mask, |
| 44 const gfx::ImageSkia* right_alpha_mask); | 44 const gfx::ImageSkia* right_alpha_mask); |
| 45 void SetBorder(int left_border_image_id, int middle_border_image_id, | 45 void SetBorderFromIds(int left_border_image_id, |
| 46 int right_border_image_id); | 46 int middle_border_image_id, |
| 47 int right_border_image_id); |
| 47 | 48 |
| 48 private: | 49 private: |
| 49 // The dropdown bar host that controls this view. | 50 // The dropdown bar host that controls this view. |
| 50 DropdownBarHost* host_; | 51 DropdownBarHost* host_; |
| 51 | 52 |
| 52 // While animating, the host clips the widget and draws only the bottom | 53 // While animating, the host clips the widget and draws only the bottom |
| 53 // part of it. The view needs to know the pixel offset at which we are drawing | 54 // part of it. The view needs to know the pixel offset at which we are drawing |
| 54 // the widget so that we can draw the curved edges that attach to the toolbar | 55 // the widget so that we can draw the curved edges that attach to the toolbar |
| 55 // in the right location. | 56 // in the right location. |
| 56 int animation_offset_; | 57 int animation_offset_; |
| 57 | 58 |
| 58 DISALLOW_COPY_AND_ASSIGN(DropdownBarView); | 59 DISALLOW_COPY_AND_ASSIGN(DropdownBarView); |
| 59 }; | 60 }; |
| 60 #endif // CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_VIEW_H_ | 61 #endif // CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_VIEW_H_ |
| OLD | NEW |