OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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" |
11 #include "chrome/browser/bookmarks/bookmark_model.h" | 11 #include "chrome/browser/bookmarks/bookmark_model.h" |
12 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 12 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
13 #include "chrome/browser/bookmarks/bookmark_utils.h" | 13 #include "chrome/browser/bookmarks/bookmark_utils.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/ui/bookmarks/bookmark_utils.h" | 15 #include "chrome/browser/ui/bookmarks/bookmark_utils.h" |
16 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
17 #include "chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.h" | 17 #include "chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.h" |
18 #include "chrome/browser/ui/gtk/event_utils.h" | 18 #include "chrome/browser/ui/gtk/event_utils.h" |
19 #include "chrome/browser/ui/gtk/gtk_chrome_button.h" | 19 #include "chrome/browser/ui/gtk/gtk_chrome_button.h" |
20 #include "chrome/browser/ui/gtk/gtk_theme_service.h" | 20 #include "chrome/browser/ui/gtk/gtk_theme_service.h" |
21 #include "chrome/browser/ui/gtk/gtk_util.h" | 21 #include "chrome/browser/ui/gtk/gtk_util.h" |
22 #include "chrome/browser/ui/gtk/menu_gtk.h" | 22 #include "chrome/browser/ui/gtk/menu_gtk.h" |
23 #include "content/public/browser/page_navigator.h" | 23 #include "content/public/browser/page_navigator.h" |
24 #include "grit/generated_resources.h" | 24 #include "grit/generated_resources.h" |
25 #include "grit/theme_resources.h" | 25 #include "grit/theme_resources.h" |
26 #include "grit/ui_resources.h" | 26 #include "grit/ui_resources.h" |
27 #include "ui/base/dragdrop/gtk_dnd_util.h" | 27 #include "ui/base/dragdrop/gtk_dnd_util.h" |
28 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
| 29 #include "ui/base/window_open_disposition.h" |
29 #include "ui/gfx/gtk_util.h" | 30 #include "ui/gfx/gtk_util.h" |
30 #include "webkit/glue/window_open_disposition.h" | |
31 | 31 |
32 using content::OpenURLParams; | 32 using content::OpenURLParams; |
33 using content::PageNavigator; | 33 using content::PageNavigator; |
34 | 34 |
35 namespace { | 35 namespace { |
36 | 36 |
37 void SetImageMenuItem(GtkWidget* menu_item, | 37 void SetImageMenuItem(GtkWidget* menu_item, |
38 const BookmarkNode* node, | 38 const BookmarkNode* node, |
39 BookmarkModel* model) { | 39 BookmarkModel* model) { |
40 GdkPixbuf* pixbuf = bookmark_utils::GetPixbufForNode(node, model, true); | 40 GdkPixbuf* pixbuf = bookmark_utils::GetPixbufForNode(node, model, true); |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 browser_->profile()); | 372 browser_->profile()); |
373 } | 373 } |
OLD | NEW |