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

Side by Side Diff: chrome/browser/views/bookmark_menu_button.cc

Issue 115831: Converts a bunch things from NativeWindow to NativeView to make it... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/views/bookmark_menu_button.h" 5 #include "chrome/browser/views/bookmark_menu_button.h"
6 6
7 #include "build/build_config.h"
8
9 #if defined(OS_GTK)
10 #include <gtk/gtk.h>
11 #endif
12
7 #include "app/resource_bundle.h" 13 #include "app/resource_bundle.h"
8 #include "app/os_exchange_data.h" 14 #include "app/os_exchange_data.h"
9 #include "chrome/browser/bookmarks/bookmark_model.h" 15 #include "chrome/browser/bookmarks/bookmark_model.h"
10 #include "chrome/browser/bookmarks/bookmark_utils.h" 16 #include "chrome/browser/bookmarks/bookmark_utils.h"
11 #include "chrome/browser/browser.h" 17 #include "chrome/browser/browser.h"
12 #include "chrome/browser/profile.h" 18 #include "chrome/browser/profile.h"
13 #include "chrome/browser/view_ids.h" 19 #include "chrome/browser/view_ids.h"
14 #include "grit/theme_resources.h" 20 #include "grit/theme_resources.h"
15 #include "views/widget/widget.h" 21 #include "views/widget/widget.h"
16 22
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 128 }
123 129
124 BookmarkModel* BookmarkMenuButton::GetBookmarkModel() { 130 BookmarkModel* BookmarkMenuButton::GetBookmarkModel() {
125 return browser_->profile()->GetBookmarkModel(); 131 return browser_->profile()->GetBookmarkModel();
126 } 132 }
127 133
128 void BookmarkMenuButton::StartShowFolderDropMenuTimer() { 134 void BookmarkMenuButton::StartShowFolderDropMenuTimer() {
129 if (show_drop_menu_timer_.IsRunning()) 135 if (show_drop_menu_timer_.IsRunning())
130 return; 136 return;
131 137
138 #if defined(OS_WIN)
132 static DWORD delay = 0; 139 static DWORD delay = 0;
133 if (!delay && !SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &delay, 0)) 140 if (!delay && !SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &delay, 0))
134 delay = 400; 141 delay = 400;
142 #else
143 static int delay = 400;
144 #endif
135 show_drop_menu_timer_.Start(base::TimeDelta::FromMilliseconds(delay), 145 show_drop_menu_timer_.Start(base::TimeDelta::FromMilliseconds(delay),
136 this, &BookmarkMenuButton::ShowDropMenu); 146 this, &BookmarkMenuButton::ShowDropMenu);
137 } 147 }
138 148
139 void BookmarkMenuButton::StopShowFolderDropMenuTimer() { 149 void BookmarkMenuButton::StopShowFolderDropMenuTimer() {
140 show_drop_menu_timer_.Stop(); 150 show_drop_menu_timer_.Stop();
141 } 151 }
142 152
143 void BookmarkMenuButton::ShowDropMenu() { 153 void BookmarkMenuButton::ShowDropMenu() {
144 RunMenu(NULL, gfx::Point(), GetWidget()->GetNativeView(), true); 154 RunMenu(NULL, gfx::Point(), GetWidget()->GetNativeView(), true);
145 } 155 }
OLDNEW
« no previous file with comments | « chrome/browser/input_window_dialog_win.cc ('k') | chrome/browser/views/bookmark_menu_controller_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698