diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-26 22:00:37 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-26 22:00:37 +0000 |
commit | dcb3070302b8ee07a3d1dbfc290a84d325c7a6e3 (patch) | |
tree | c4f5942b02cb09f2a37dc96298bbb32d1858d421 /chrome/browser/tab_contents | |
parent | a314ee5ab5322b95a861e38fdc377ec156b0add9 (diff) | |
download | chromium_src-dcb3070302b8ee07a3d1dbfc290a84d325c7a6e3.zip chromium_src-dcb3070302b8ee07a3d1dbfc290a84d325c7a6e3.tar.gz chromium_src-dcb3070302b8ee07a3d1dbfc290a84d325c7a6e3.tar.bz2 |
[gtk] spoof proof infobars, take 2
This looks like a big review, but a lot of it is just shuffling code around:
- rip out dropshadow code
- move arrow state and drawing to a model class, to allow sharing between BrowserWindow and Infobar
- get rid of InfoBar's border_bin_ and slightly simplify baseclasses by no longer requiring them to call show() on the toplevel widget
Added stuff:
- transition between arrow colors (previous_color_ vs. target_color_ business)
- arrows protruding on neighboring infobars
BUG=48996
TEST=manual, with animations slowed down 100x
Review URL: http://codereview.chromium.org/3919004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63956 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
4 files changed, 0 insertions, 20 deletions
diff --git a/chrome/browser/tab_contents/tab_contents_view.cc b/chrome/browser/tab_contents/tab_contents_view.cc index 83eb7a4..47e71f2 100644 --- a/chrome/browser/tab_contents/tab_contents_view.cc +++ b/chrome/browser/tab_contents/tab_contents_view.cc @@ -113,10 +113,6 @@ bool TabContentsView::IsEventTracking() const { return false; } -bool TabContentsView::ShouldDrawDropShadow() { - return false; -} - TabContentsView::TabContentsView() : tab_contents_(NULL) {} void TabContentsView::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { diff --git a/chrome/browser/tab_contents/tab_contents_view.h b/chrome/browser/tab_contents/tab_contents_view.h index 4550781..c6b9a61 100644 --- a/chrome/browser/tab_contents/tab_contents_view.h +++ b/chrome/browser/tab_contents/tab_contents_view.h @@ -153,8 +153,6 @@ class TabContentsView : public RenderViewHostDelegate::View { virtual bool IsEventTracking() const; virtual void CloseTabAfterEventTracking() {} - virtual bool ShouldDrawDropShadow(); - protected: TabContentsView(); // Abstract interface. diff --git a/chrome/browser/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/tab_contents/tab_contents_view_gtk.cc index 2c8a276..7ec34e4 100644 --- a/chrome/browser/tab_contents/tab_contents_view_gtk.cc +++ b/chrome/browser/tab_contents/tab_contents_view_gtk.cc @@ -247,19 +247,6 @@ void TabContentsViewGtk::RestoreFocus() { SetInitialFocus(); } -bool TabContentsViewGtk::ShouldDrawDropShadow() { - GtkWindow* window = GetTopLevelNativeWindow(); - if (!window) - return false; - - BrowserWindowGtk* browser_window = - BrowserWindowGtk::GetBrowserWindowForNativeWindow(window); - if (!browser_window) - return false; - - return browser_window->ShouldDrawInfobarDropShadowOnRenderView(); -} - void TabContentsViewGtk::SetFocusedWidget(GtkWidget* widget) { focus_store_.SetWidget(widget); } diff --git a/chrome/browser/tab_contents/tab_contents_view_gtk.h b/chrome/browser/tab_contents/tab_contents_view_gtk.h index 2ea02ca..9a016a1 100644 --- a/chrome/browser/tab_contents/tab_contents_view_gtk.h +++ b/chrome/browser/tab_contents/tab_contents_view_gtk.h @@ -59,7 +59,6 @@ class TabContentsViewGtk : public TabContentsView, virtual void SetInitialFocus(); virtual void StoreFocus(); virtual void RestoreFocus(); - virtual bool ShouldDrawDropShadow(); // Backend implementation of RenderViewHostDelegate::View. virtual void ShowContextMenu(const ContextMenuParams& params); |