diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-24 17:34:35 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-24 17:34:35 +0000 |
commit | dfc127009271a718b5dde4569732018a207be73a (patch) | |
tree | c97e6a747f57e035b614c98ed4744286fd0ee4b8 /chrome/browser/views | |
parent | bf2eb63023f6e3f14af1a07affc70e8c563df694 (diff) | |
download | chromium_src-dfc127009271a718b5dde4569732018a207be73a.zip chromium_src-dfc127009271a718b5dde4569732018a207be73a.tar.gz chromium_src-dfc127009271a718b5dde4569732018a207be73a.tar.bz2 |
Sets widget created by info bubbles to a custom type so that they
don't get a drop shadow and centered on screen.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/431021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32936 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/info_bubble.cc | 8 | ||||
-rw-r--r-- | chrome/browser/views/tabs/tab_overview_types.h | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/chrome/browser/views/info_bubble.cc b/chrome/browser/views/info_bubble.cc index 4f39ba9..edbc3b1 100644 --- a/chrome/browser/views/info_bubble.cc +++ b/chrome/browser/views/info_bubble.cc @@ -15,6 +15,10 @@ #include "views/widget/root_view.h" #include "views/window/window.h" +#if defined(OS_LINUX) +#include "chrome/browser/views/tabs/tab_overview_types.h" +#endif + // Background color of the bubble. #if defined(OS_WIN) const SkColor InfoBubble::kBackgroundColor = @@ -236,6 +240,10 @@ void InfoBubble::Init(views::Window* parent, MakeTransparent(); make_transient_to_parent(); WidgetGtk::Init(GTK_WIDGET(parent->GetNativeWindow()), gfx::Rect()); + TabOverviewTypes::instance()->SetWindowType( + GetNativeView(), + TabOverviewTypes::WINDOW_TYPE_CHROME_INFO_BUBBLE, + NULL); #endif // Create a View to hold the contents of the main window. diff --git a/chrome/browser/views/tabs/tab_overview_types.h b/chrome/browser/views/tabs/tab_overview_types.h index a2b41be..f1d72978 100644 --- a/chrome/browser/views/tabs/tab_overview_types.h +++ b/chrome/browser/views/tabs/tab_overview_types.h @@ -58,6 +58,7 @@ class TabOverviewTypes { // The contents of a popup window. // param[0]: X ID of associated titlebar, which must be mapped before // its panel + // param[1]: Initial state for panel (0 is collapsed, 1 is expanded) WINDOW_TYPE_CHROME_PANEL, // A small window representing a collapsed panel in the panel bar and @@ -67,6 +68,11 @@ class TabOverviewTypes { // A small window that when clicked creates a new browser window. WINDOW_TYPE_CREATE_BROWSER_WINDOW, + // A Chrome info bubble (e.g. the bookmark bubble). These are + // transient RGBA windows; we skip the usual transient behavior of + // centering them over their owner and omit drawing a drop shadow. + WINDOW_TYPE_CHROME_INFO_BUBBLE, + kNumWindowTypes, }; |