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

Unified Diff: chrome/browser/gtk/bookmark_context_menu.cc

Issue 211056: GTK: Dismiss the bookmark folder menu(s) when a context menu item is executed... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/gtk/bookmark_context_menu.h ('k') | chrome/browser/gtk/bookmark_manager_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/bookmark_context_menu.cc
===================================================================
--- chrome/browser/gtk/bookmark_context_menu.cc (revision 26846)
+++ chrome/browser/gtk/bookmark_context_menu.cc (working copy)
@@ -215,7 +215,8 @@
PageNavigator* navigator,
const BookmarkNode* parent,
const std::vector<const BookmarkNode*>& selection,
- ConfigurationType configuration)
+ ConfigurationType configuration,
+ Delegate* delegate)
: wnd_(wnd),
profile_(profile),
browser_(browser),
@@ -223,7 +224,8 @@
parent_(parent),
selection_(selection),
model_(profile->GetBookmarkModel()),
- configuration_(configuration) {
+ configuration_(configuration),
+ delegate_(delegate) {
DCHECK(profile_);
DCHECK(model_->IsLoaded());
CreateMenuObject();
@@ -294,7 +296,14 @@
model_->RemoveObserver(this);
}
+void BookmarkContextMenu::DelegateDestroyed() {
+ delegate_ = NULL;
+}
+
void BookmarkContextMenu::ExecuteCommand(int id) {
+ if (delegate_)
+ delegate_->WillExecuteCommand();
+
switch (id) {
case IDS_BOOMARK_BAR_OPEN_ALL:
case IDS_BOOMARK_BAR_OPEN_ALL_INCOGNITO:
« no previous file with comments | « chrome/browser/gtk/bookmark_context_menu.h ('k') | chrome/browser/gtk/bookmark_manager_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698