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

Unified Diff: chrome/browser/ui/views/dropdown_bar_host.h

Issue 1472023004: Updated DropdownBarHost to use Layer clipping instead of OnPaint() clipping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/dropdown_bar_host.h
diff --git a/chrome/browser/ui/views/dropdown_bar_host.h b/chrome/browser/ui/views/dropdown_bar_host.h
index bf335a7995db41b7266261ba78d1cad1c661370f..0ceb26fca72e5fff569128c8ff7e6c97f0a4d376 100644
--- a/chrome/browser/ui/views/dropdown_bar_host.h
+++ b/chrome/browser/ui/views/dropdown_bar_host.h
@@ -74,9 +74,9 @@ class DropdownBarHost : public ui::AcceleratorTarget,
virtual gfx::Rect GetDialogPosition(gfx::Rect avoid_overlapping_rect) = 0;
// Moves the widget to the provided location, moves it to top
- // in the z-order (HWND_TOP, not HWND_TOPMOST for windows) and shows
- // the widget (if hidden).
- virtual void SetDialogPosition(const gfx::Rect& new_pos) = 0;
+ // in the z-order (HWND_TOP, not HWND_TOPMOST for windows) shows the widget
Peter Kasting 2015/11/24 22:39:43 Nit: Comma before "shows"
bruthig 2015/11/25 16:55:06 Done.
+ // (if hidden) and sets the size of the |view_|.
+ virtual void SetDialogPosition(const gfx::Rect& new_pos);
// Overridden from views::FocusChangeListener:
void OnWillChangeFocus(views::View* focused_before,
@@ -132,9 +132,6 @@ class DropdownBarHost : public ui::AcceleratorTarget,
// Returns the host widget.
views::Widget* host() const { return host_.get(); }
- // Returns the animation offset.
- int animation_offset() const { return animation_offset_; }
-
// Retrieves the boundary that the dropdown widget has to work with
// within the Chrome frame window. The boundary differs depending on
// the dropdown bar implementation. The default implementation
@@ -156,14 +153,14 @@ class DropdownBarHost : public ui::AcceleratorTarget,
// The BrowserView that created us.
BrowserView* browser_view_;
+ // A parent View to |view_| that is used to clip when animating the bar
+ // between a shown and hidden states.
Peter Kasting 2015/11/24 22:39:43 Nit: "a" -> "the"
bruthig 2015/11/25 16:55:06 Done.
+ views::View* clip_view_;
+
// Our view, which is responsible for drawing the UI.
views::View* view_;
DropdownBarHostDelegate* delegate_;
- // The y position pixel offset of the widget while animating the
- // dropdown widget.
- int animation_offset_;
-
// The animation class to use when opening the Dropdown widget.
scoped_ptr<gfx::SlideAnimation> animation_;
« no previous file with comments | « no previous file | chrome/browser/ui/views/dropdown_bar_host.cc » ('j') | chrome/browser/ui/views/dropdown_bar_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698