| 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/location_bar_view_gtk.h" | 5 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "chrome/browser/extensions/extension_browser_event_router.h" | 25 #include "chrome/browser/extensions/extension_browser_event_router.h" |
| 26 #include "chrome/browser/extensions/extension_service.h" | 26 #include "chrome/browser/extensions/extension_service.h" |
| 27 #include "chrome/browser/extensions/extension_tab_util.h" | 27 #include "chrome/browser/extensions/extension_tab_util.h" |
| 28 #include "chrome/browser/favicon/favicon_tab_helper.h" | 28 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 29 #include "chrome/browser/instant/instant_controller.h" | 29 #include "chrome/browser/instant/instant_controller.h" |
| 30 #include "chrome/browser/profiles/profile.h" | 30 #include "chrome/browser/profiles/profile.h" |
| 31 #include "chrome/browser/search_engines/template_url.h" | 31 #include "chrome/browser/search_engines/template_url.h" |
| 32 #include "chrome/browser/search_engines/template_url_service.h" | 32 #include "chrome/browser/search_engines/template_url_service.h" |
| 33 #include "chrome/browser/search_engines/template_url_service_factory.h" | 33 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 34 #include "chrome/browser/ui/browser.h" | 34 #include "chrome/browser/ui/browser.h" |
| 35 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h" | |
| 36 #include "chrome/browser/ui/browser_list.h" | 35 #include "chrome/browser/ui/browser_list.h" |
| 37 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" | 36 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
| 38 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" | 37 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" |
| 39 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h" | 38 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h" |
| 40 #include "chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.h" | 39 #include "chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.h" |
| 41 #include "chrome/browser/ui/gtk/content_setting_bubble_gtk.h" | 40 #include "chrome/browser/ui/gtk/content_setting_bubble_gtk.h" |
| 42 #include "chrome/browser/ui/gtk/extensions/extension_popup_gtk.h" | 41 #include "chrome/browser/ui/gtk/extensions/extension_popup_gtk.h" |
| 43 #include "chrome/browser/ui/gtk/first_run_bubble.h" | 42 #include "chrome/browser/ui/gtk/first_run_bubble.h" |
| 44 #include "chrome/browser/ui/gtk/gtk_util.h" | 43 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 45 #include "chrome/browser/ui/gtk/nine_box.h" | 44 #include "chrome/browser/ui/gtk/nine_box.h" |
| (...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1371 | 1370 |
| 1372 gboolean LocationBarViewGtk::ContentSettingImageViewGtk::OnButtonPressed( | 1371 gboolean LocationBarViewGtk::ContentSettingImageViewGtk::OnButtonPressed( |
| 1373 GtkWidget* sender, GdkEvent* event) { | 1372 GtkWidget* sender, GdkEvent* event) { |
| 1374 TabContentsWrapper* tab_contents = parent_->GetTabContentsWrapper(); | 1373 TabContentsWrapper* tab_contents = parent_->GetTabContentsWrapper(); |
| 1375 if (!tab_contents) | 1374 if (!tab_contents) |
| 1376 return TRUE; | 1375 return TRUE; |
| 1377 Profile* profile = parent_->browser()->profile(); | 1376 Profile* profile = parent_->browser()->profile(); |
| 1378 content_setting_bubble_ = new ContentSettingBubbleGtk( | 1377 content_setting_bubble_ = new ContentSettingBubbleGtk( |
| 1379 sender, this, | 1378 sender, this, |
| 1380 ContentSettingBubbleModel::CreateContentSettingBubbleModel( | 1379 ContentSettingBubbleModel::CreateContentSettingBubbleModel( |
| 1381 parent_->browser()->content_setting_bubble_model_delegate(), | 1380 parent_->browser(), tab_contents, profile, |
| 1382 tab_contents, | |
| 1383 profile, | |
| 1384 content_setting_image_model_->get_content_settings_type()), | 1381 content_setting_image_model_->get_content_settings_type()), |
| 1385 profile, tab_contents->web_contents()); | 1382 profile, tab_contents->web_contents()); |
| 1386 return TRUE; | 1383 return TRUE; |
| 1387 } | 1384 } |
| 1388 | 1385 |
| 1389 gboolean LocationBarViewGtk::ContentSettingImageViewGtk::OnExpose( | 1386 gboolean LocationBarViewGtk::ContentSettingImageViewGtk::OnExpose( |
| 1390 GtkWidget* sender, GdkEventExpose* event) { | 1387 GtkWidget* sender, GdkEventExpose* event) { |
| 1391 TRACE_EVENT0("ui::gtk", | 1388 TRACE_EVENT0("ui::gtk", |
| 1392 "LocationBarViewGtk::ContentSettingImageViewGtk::OnExpose"); | 1389 "LocationBarViewGtk::ContentSettingImageViewGtk::OnExpose"); |
| 1393 | 1390 |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1652 std::string badge_text = page_action_->GetBadgeText(tab_id); | 1649 std::string badge_text = page_action_->GetBadgeText(tab_id); |
| 1653 if (badge_text.empty()) | 1650 if (badge_text.empty()) |
| 1654 return FALSE; | 1651 return FALSE; |
| 1655 | 1652 |
| 1656 gfx::CanvasSkiaPaint canvas(event, false); | 1653 gfx::CanvasSkiaPaint canvas(event, false); |
| 1657 GtkAllocation allocation; | 1654 GtkAllocation allocation; |
| 1658 gtk_widget_get_allocation(widget, &allocation); | 1655 gtk_widget_get_allocation(widget, &allocation); |
| 1659 page_action_->PaintBadge(&canvas, gfx::Rect(allocation), tab_id); | 1656 page_action_->PaintBadge(&canvas, gfx::Rect(allocation), tab_id); |
| 1660 return FALSE; | 1657 return FALSE; |
| 1661 } | 1658 } |
| OLD | NEW |