diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 19:58:56 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 19:58:56 +0000 |
commit | 4efe6e11f1f4c750fb5aaea3ee4aa58f4450cd6b (patch) | |
tree | 2a95ce0c410624c34c287a7624ff54df3c170624 /chrome/browser/views/bookmark_bar_view.cc | |
parent | 0e8635177ee343f1c1ee48e7016a54b97bbf02ff (diff) | |
download | chromium_src-4efe6e11f1f4c750fb5aaea3ee4aa58f4450cd6b.zip chromium_src-4efe6e11f1f4c750fb5aaea3ee4aa58f4450cd6b.tar.gz chromium_src-4efe6e11f1f4c750fb5aaea3ee4aa58f4450cd6b.tar.bz2 |
Gets bookmark_bar_view to compile on Linux.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/115872
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17098 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/bookmark_bar_view.cc')
-rw-r--r-- | chrome/browser/views/bookmark_bar_view.cc | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc index 9dd3158..5621a83 100644 --- a/chrome/browser/views/bookmark_bar_view.cc +++ b/chrome/browser/views/bookmark_bar_view.cc @@ -11,9 +11,7 @@ #include "app/l10n_util.h" #include "app/os_exchange_data.h" #include "app/resource_bundle.h" -#include "app/win_util.h" #include "base/string_util.h" -#include "base/base_drag_source.h" #include "chrome/browser/bookmarks/bookmark_context_menu.h" #include "chrome/browser/bookmarks/bookmark_utils.h" #include "chrome/browser/browser.h" @@ -45,6 +43,11 @@ #include "views/widget/widget.h" #include "views/window/window.h" +#if defined(OS_WIN) +#include "app/win_util.h" +#include "base/base_drag_source.h" +#endif + using views::CustomButton; using views::DropTargetEvent; using views::MenuButton; @@ -146,8 +149,13 @@ static std::wstring CreateToolTipForURLAndTitle(const gfx::Point& screen_loc, const GURL& url, const std::wstring& title, const std::wstring& languages) { - const gfx::Rect monitor_bounds = win_util::GetMonitorBoundsForRect( +#if defined(OS_WIN) + gfx::Rect monitor_bounds = win_util::GetMonitorBoundsForRect( gfx::Rect(screen_loc.x(), screen_loc.y(), 1, 1)); +#else + gfx::Rect monitor_bounds(0, 0, 10000, 10000); + NOTIMPLEMENTED(); +#endif gfx::Font tt_font = views::TooltipManager::GetDefaultFont(); std::wstring result; @@ -272,7 +280,7 @@ class BookmarkFolderButton : public views::MenuButton { // Tracks drops on the BookmarkBarView. struct BookmarkBarView::DropInfo { - DropInfo() : drop_index(-1), is_menu_showing(false), valid(false) {} + DropInfo() : valid(false), drop_index(-1), is_menu_showing(false) {} // Whether the data is valid. bool valid; @@ -362,7 +370,6 @@ static const SkBitmap& GetGroupIcon() { BookmarkBarView::BookmarkBarView(Profile* profile, Browser* browser) : profile_(NULL), - browser_(browser), page_navigator_(NULL), model_(NULL), bookmark_menu_(NULL), @@ -373,6 +380,7 @@ BookmarkBarView::BookmarkBarView(Profile* profile, Browser* browser) overflow_button_(NULL), instructions_(NULL), bookmarks_separator_view_(NULL), + browser_(browser), throbbing_view_(NULL) { SetID(VIEW_ID_BOOKMARK_BAR); Init(); @@ -1268,6 +1276,10 @@ void BookmarkBarView::Observe(NotificationType type, StopThrobbing(false); bubble_url_ = GURL(); break; + + default: + NOTREACHED(); + break; } } @@ -1348,10 +1360,13 @@ void BookmarkBarView::StartShowFolderDropMenuTimer(BookmarkNode* node) { } DCHECK(!show_folder_drop_menu_task_); show_folder_drop_menu_task_ = new ShowFolderDropMenuTask(this, node); +#if defined(OS_WIN) static DWORD delay = 0; - if (!delay && !SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &delay, 0)) { + if (!delay && !SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &delay, 0)) delay = kShowFolderDropMenuDelay; - } +#else + int delay = kShowFolderDropMenuDelay; +#endif MessageLoop::current()->PostDelayedTask(FROM_HERE, show_folder_drop_menu_task_, delay); } |