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

Unified Diff: chrome/browser/ui/views/dropdown_bar_view.cc

Issue 1545023002: Relanding fix from ea9b0ba419a3598bdb7f7c62afdf4409afa73ab1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « chrome/browser/ui/views/dropdown_bar_view.h ('k') | chrome/browser/ui/views/find_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_view.cc
diff --git a/chrome/browser/ui/views/dropdown_bar_view.cc b/chrome/browser/ui/views/dropdown_bar_view.cc
index fa36f93bf2114b746e3a2734c974831adcc454f7..369f0e55154b4e2bc4c98be3f9a1d57e59fbddf3 100644
--- a/chrome/browser/ui/views/dropdown_bar_view.cc
+++ b/chrome/browser/ui/views/dropdown_bar_view.cc
@@ -20,11 +20,6 @@
namespace {
-// When we are animating, we draw only the top part of the left and right
-// edges to give the illusion that the find dialog is attached to the
-// window during this animation; this is the height of the items we draw.
-const int kAnimatingEdgeHeight = 5;
-
// Background to paint toolbar background with rounded corners.
class DropdownBackground : public views::Background {
public:
@@ -87,38 +82,12 @@ void DropdownBackground::Paint(gfx::Canvas* canvas, views::View* view) const {
} // namespace
-DropdownBarView::DropdownBarView(DropdownBarHost* host)
- : host_(host), animation_offset_(0) {}
+DropdownBarView::DropdownBarView(DropdownBarHost* host) : host_(host) {}
DropdownBarView::~DropdownBarView() {
}
////////////////////////////////////////////////////////////////////////////////
-// DropDownBarView, public:
-
-void DropdownBarView::SetAnimationOffset(int offset) {
- animation_offset_ = offset;
- set_clip_insets(gfx::Insets(animation_offset_, 0, 0, 0));
-}
-
-// DropDownBarView, views::View overrides:
-void DropdownBarView::OnPaint(gfx::Canvas* canvas) {
- OnPaintBackground(canvas);
- OnPaintBorder(canvas);
-
- if (animation_offset() > 0) {
- gfx::Canvas animating_edges(
- gfx::Size(bounds().width(), kAnimatingEdgeHeight),
- canvas->image_scale(), false);
- canvas->Translate(bounds().OffsetFromOrigin());
- OnPaintBackground(&animating_edges);
- OnPaintBorder(&animating_edges);
- canvas->DrawImageInt(gfx::ImageSkia(animating_edges.ExtractImageRep()),
- bounds().x(), animation_offset());
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
// DropDownBarView, protected:
void DropdownBarView::SetBackground(const gfx::ImageSkia* left_alpha_mask,
« no previous file with comments | « chrome/browser/ui/views/dropdown_bar_view.h ('k') | chrome/browser/ui/views/find_bar_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698