| 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/web_intent_picker_gtk.h" | 5 #include "chrome/browser/ui/gtk/web_intent_picker_gtk.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "chrome/browser/favicon/favicon_service.h" | 13 #include "chrome/browser/favicon/favicon_service.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/browser/ui/browser_window.h" | 16 #include "chrome/browser/ui/browser_window.h" |
| 17 #include "chrome/browser/ui/gtk/browser_toolbar_gtk.h" | 17 #include "chrome/browser/ui/gtk/browser_toolbar_gtk.h" |
| 18 #include "chrome/browser/ui/gtk/browser_window_gtk.h" | 18 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
| 19 #include "chrome/browser/ui/gtk/custom_button.h" | 19 #include "chrome/browser/ui/gtk/custom_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/location_bar_view_gtk.h" | 22 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" |
| 23 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h" | 23 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h" |
| 24 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" | 24 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" |
| 25 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h" | 25 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h" |
| 26 #include "chrome/browser/ui/intents/web_intent_picker_model.h" | 26 #include "chrome/browser/ui/intents/web_intent_picker_model.h" |
| 27 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 27 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 28 #include "content/browser/renderer_host/render_view_host.h" | 28 #include "content/browser/renderer_host/render_view_host.h" |
| 29 #include "content/browser/renderer_host/render_widget_host_view.h" | |
| 30 #include "content/public/browser/notification_registrar.h" | 29 #include "content/public/browser/notification_registrar.h" |
| 31 #include "content/public/browser/notification_source.h" | 30 #include "content/public/browser/notification_source.h" |
| 32 #include "content/public/browser/notification_types.h" | 31 #include "content/public/browser/notification_types.h" |
| 32 #include "content/public/browser/render_widget_host_view.h" |
| 33 #include "content/public/browser/web_contents.h" | 33 #include "content/public/browser/web_contents.h" |
| 34 #include "googleurl/src/gurl.h" | 34 #include "googleurl/src/gurl.h" |
| 35 #include "grit/generated_resources.h" | 35 #include "grit/generated_resources.h" |
| 36 #include "ui/base/gtk/gtk_hig_constants.h" | 36 #include "ui/base/gtk/gtk_hig_constants.h" |
| 37 #include "ui/base/l10n/l10n_util.h" | 37 #include "ui/base/l10n/l10n_util.h" |
| 38 #include "ui/base/resource/resource_bundle.h" | 38 #include "ui/base/resource/resource_bundle.h" |
| 39 #include "ui/gfx/gtk_util.h" | 39 #include "ui/gfx/gtk_util.h" |
| 40 #include "ui/gfx/image/image.h" | 40 #include "ui/gfx/image/image.h" |
| 41 | 41 |
| 42 using content::WebContents; | 42 using content::WebContents; |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 g_signal_connect(contents_, "destroy", G_CALLBACK(&OnDestroyThunk), this); | 271 g_signal_connect(contents_, "destroy", G_CALLBACK(&OnDestroyThunk), this); |
| 272 } | 272 } |
| 273 | 273 |
| 274 GtkWidget* WebIntentPickerGtk::GetServiceButton(size_t index) { | 274 GtkWidget* WebIntentPickerGtk::GetServiceButton(size_t index) { |
| 275 GList* button_list = gtk_container_get_children(GTK_CONTAINER(button_vbox_)); | 275 GList* button_list = gtk_container_get_children(GTK_CONTAINER(button_vbox_)); |
| 276 GtkWidget* button = GTK_WIDGET(g_list_nth_data(button_list, index)); | 276 GtkWidget* button = GTK_WIDGET(g_list_nth_data(button_list, index)); |
| 277 DCHECK(button != NULL); | 277 DCHECK(button != NULL); |
| 278 | 278 |
| 279 return button; | 279 return button; |
| 280 } | 280 } |
| OLD | NEW |