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

Side by Side Diff: chrome/browser/ui/gtk/bookmarks/bookmark_menu_controller_gtk.cc

Issue 8224023: Don't show URL for pending new navigations initiated by the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflicts. Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/gtk/bookmarks/bookmark_menu_controller_gtk.h" 5 #include "chrome/browser/ui/gtk/bookmarks/bookmark_menu_controller_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 130 }
131 131
132 void BookmarkMenuController::NavigateToMenuItem( 132 void BookmarkMenuController::NavigateToMenuItem(
133 GtkWidget* menu_item, 133 GtkWidget* menu_item,
134 WindowOpenDisposition disposition) { 134 WindowOpenDisposition disposition) {
135 const BookmarkNode* node = GetNodeFromMenuItem(menu_item); 135 const BookmarkNode* node = GetNodeFromMenuItem(menu_item);
136 DCHECK(node); 136 DCHECK(node);
137 DCHECK(page_navigator_); 137 DCHECK(page_navigator_);
138 page_navigator_->OpenURL(OpenURLParams( 138 page_navigator_->OpenURL(OpenURLParams(
139 node->url(), GURL(), disposition, 139 node->url(), GURL(), disposition,
140 content::PAGE_TRANSITION_AUTO_BOOKMARK)); 140 content::PAGE_TRANSITION_AUTO_BOOKMARK, false));
141 } 141 }
142 142
143 void BookmarkMenuController::BuildMenu(const BookmarkNode* parent, 143 void BookmarkMenuController::BuildMenu(const BookmarkNode* parent,
144 int start_child_index, 144 int start_child_index,
145 GtkWidget* menu) { 145 GtkWidget* menu) {
146 DCHECK(parent->empty() || start_child_index < parent->child_count()); 146 DCHECK(parent->empty() || start_child_index < parent->child_count());
147 147
148 signals_.Connect(menu, "button-press-event", 148 signals_.Connect(menu, "button-press-event",
149 G_CALLBACK(OnMenuButtonPressedOrReleasedThunk), this); 149 G_CALLBACK(OnMenuButtonPressedOrReleasedThunk), this);
150 signals_.Connect(menu, "button-release-event", 150 signals_.Connect(menu, "button-release-event",
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } 364 }
365 365
366 void BookmarkMenuController::OnMenuItemDragGet( 366 void BookmarkMenuController::OnMenuItemDragGet(
367 GtkWidget* widget, GdkDragContext* context, 367 GtkWidget* widget, GdkDragContext* context,
368 GtkSelectionData* selection_data, 368 GtkSelectionData* selection_data,
369 guint target_type, guint time) { 369 guint target_type, guint time) {
370 const BookmarkNode* node = bookmark_utils::BookmarkNodeForWidget(widget); 370 const BookmarkNode* node = bookmark_utils::BookmarkNodeForWidget(widget);
371 bookmark_utils::WriteBookmarkToSelection(node, selection_data, target_type, 371 bookmark_utils::WriteBookmarkToSelection(node, selection_data, target_type,
372 profile_); 372 profile_);
373 } 373 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/about_chrome_dialog.cc ('k') | chrome/browser/ui/gtk/extensions/extension_install_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698