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

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: Addressed comments from patch set 1. 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/dropdown_bar_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c212158de0c84a072844527c1c466f296890a105 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), 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 the shown and hidden states.
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698