Chromium Code Reviews| Index: chrome/browser/ui/views/dropdown_bar_view.h |
| diff --git a/chrome/browser/ui/views/dropdown_bar_view.h b/chrome/browser/ui/views/dropdown_bar_view.h |
| index cfd3377f077cf0b91ba5ae865410342bfc2b9939..724f1418d781056f6efce7936ab658cc56b4564a 100644 |
| --- a/chrome/browser/ui/views/dropdown_bar_view.h |
| +++ b/chrome/browser/ui/views/dropdown_bar_view.h |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -6,9 +6,10 @@ |
| #define CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_VIEW_H_ |
| #pragma once |
| -#include "views/view.h" |
| +#include "chrome/browser/ui/views/dropdown_bar_host.h" |
| +#include "chrome/browser/ui/views/accessible_pane_view.h" |
|
sky
2011/05/03 18:38:32
remove newline
SteveT
2011/05/06 18:48:43
Done.
|
| -class DropdownBarHost; |
| +#include "ui/gfx/canvas.h" |
|
sky
2011/05/03 18:38:32
forward declare canvas
SteveT
2011/05/06 18:48:43
Done.
|
| //////////////////////////////////////////////////////////////////////////////// |
| // |
| @@ -16,7 +17,8 @@ class DropdownBarHost; |
| // DropdownBarHost. |
| // |
| //////////////////////////////////////////////////////////////////////////////// |
| -class DropdownBarView : public views::View { |
| +class DropdownBarView : public AccessiblePaneView, |
| + public DropdownBarHost::Delegate { |
| public: |
| explicit DropdownBarView(DropdownBarHost* host) |
| : host_(host), |
| @@ -24,12 +26,9 @@ class DropdownBarView : public views::View { |
| } |
| virtual ~DropdownBarView() {} |
| - // Claims focus for the text field and selects its contents. |
| - virtual void SetFocusAndSelection(bool select_all) = 0; |
| - |
| // Updates the view to let it know where the host is clipping the |
| // dropdown widget (while animating the opening or closing of the widget). |
| - void set_animation_offset(int offset) { animation_offset_ = offset; } |
| + virtual void set_animation_offset(int offset) OVERRIDE; |
|
sky
2011/05/03 18:38:32
This isn't OVERRIDE, is it? Should be CamelCase fo
SteveT
2011/05/06 18:48:43
Renamed everywhere.
|
| // Returns the offset used while animating. |
| int animation_offset() const { return animation_offset_; } |
| @@ -38,6 +37,27 @@ class DropdownBarView : public views::View { |
| // Returns the DropdownBarHost that manages this view. |
| DropdownBarHost* host() const { return host_; } |
| + // Assign border bitmaps for this drop down instance. |
| + void SetDialogBorderBitmaps(const SkBitmap* dialog_left, |
| + const SkBitmap* dialog_middle, |
| + const SkBitmap* dialog_right); |
| + |
| + // Paints the offset toolbar background over the widget area and returns the |
| + // bounds of the widget. |
| + gfx::Rect PaintOffsetToolbarBackground(gfx::Canvas* canvas); |
| + |
| + // Paint the border for the drop down dialog given the ends and middle |
| + // bitmaps. |
| + void PaintDialogBorder(gfx::Canvas* canvas, const gfx::Rect& bounds) const; |
| + |
| + // Special paint code for the edges when the drop down bar is animating. |
| + void PaintAnimatingEdges(gfx::Canvas* canvas, const gfx::Rect& bounds) const; |
| + |
| + // The dialog border bitmaps. |
| + const SkBitmap* dialog_left_; |
|
sky
2011/05/03 18:38:32
no protected members.
SteveT
2011/05/06 18:48:43
Made private.
|
| + const SkBitmap* dialog_middle_; |
| + const SkBitmap* dialog_right_; |
| + |
| private: |
| // The dropdown bar host that controls this view. |
| DropdownBarHost* host_; |