summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/bookmark_menu_controller_views.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-26 23:50:25 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-26 23:50:25 +0000
commitc5b6fb5f162db28dcf0c211e8e305f31097d0445 (patch)
tree53c2c0e5a106276476a56681f2656b64acec4531 /chrome/browser/views/bookmark_menu_controller_views.cc
parent7c55f4ce7d876c1e02ab9c8bad7a746697073b1b (diff)
downloadchromium_src-c5b6fb5f162db28dcf0c211e8e305f31097d0445.zip
chromium_src-c5b6fb5f162db28dcf0c211e8e305f31097d0445.tar.gz
chromium_src-c5b6fb5f162db28dcf0c211e8e305f31097d0445.tar.bz2
Fox some compilation problems for Linux. This also adds bookmark_bar_view and
window_sizer to the Linux build. Review URL: http://codereview.chromium.org/115803 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16953 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/bookmark_menu_controller_views.cc')
-rw-r--r--chrome/browser/views/bookmark_menu_controller_views.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/views/bookmark_menu_controller_views.cc b/chrome/browser/views/bookmark_menu_controller_views.cc
index 3f1fdd2..2ac58eb 100644
--- a/chrome/browser/views/bookmark_menu_controller_views.cc
+++ b/chrome/browser/views/bookmark_menu_controller_views.cc
@@ -48,10 +48,15 @@ void BookmarkMenuController::RunMenuAt(
bool for_drop) {
for_drop_ = for_drop;
profile_->GetBookmarkModel()->AddObserver(this);
+#if defined(OS_WIN)
+ gfx::NativeView widget = parent_;
+#else
+ gfx::NativeView widget = GTK_WIDGET(parent_);
+#endif
if (for_drop) {
- menu_->RunMenuForDropAt(parent_, bounds, position);
+ menu_->RunMenuForDropAt(widget, bounds, position);
} else {
- menu_->RunMenuAt(parent_, bounds, position, false);
+ menu_->RunMenuAt(widget, bounds, position, false);
delete this;
}
}
@@ -94,7 +99,6 @@ bool BookmarkMenuController::CanDrop(views::MenuItemView* menu,
// the dragged node is not a parent of the node menu represents.
BookmarkNode* drop_node = menu_id_to_node_map_[menu->GetCommand()];
DCHECK(drop_node);
- BookmarkNode* node = drop_node;
while (drop_node && drop_node != drag_node)
drop_node = drop_node->GetParent();
return (drop_node == NULL);