| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/gtk/location_bar_view_gtk.h" | 5 #include "chrome/browser/gtk/location_bar_view_gtk.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "app/gtk_dnd_util.h" | 9 #include "app/gtk_dnd_util.h" |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| 11 #include "app/resource_bundle.h" | 11 #include "app/resource_bundle.h" |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/i18n/rtl.h" | 13 #include "base/i18n/rtl.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/string_util.h" | 15 #include "base/string_util.h" |
| 16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
| 17 #include "chrome/app/chrome_command_ids.h" | 17 #include "chrome/app/chrome_command_ids.h" |
| 18 #include "chrome/browser/accessibility_events.h" | 18 #include "chrome/browser/accessibility_events.h" |
| 19 #include "chrome/browser/alternate_nav_url_fetcher.h" | 19 #include "chrome/browser/alternate_nav_url_fetcher.h" |
| 20 #include "chrome/browser/autocomplete/autocomplete_edit_view_gtk.h" | 20 #include "chrome/browser/autocomplete/autocomplete_edit_view_gtk.h" |
| 21 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" | 21 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" |
| 22 #include "chrome/browser/browser.h" | |
| 23 #include "chrome/browser/browser_list.h" | 22 #include "chrome/browser/browser_list.h" |
| 24 #include "chrome/browser/command_updater.h" | 23 #include "chrome/browser/command_updater.h" |
| 25 #include "chrome/browser/content_setting_bubble_model.h" | 24 #include "chrome/browser/content_setting_bubble_model.h" |
| 26 #include "chrome/browser/content_setting_image_model.h" | 25 #include "chrome/browser/content_setting_image_model.h" |
| 27 #include "chrome/browser/defaults.h" | 26 #include "chrome/browser/defaults.h" |
| 28 #include "chrome/browser/extensions/extension_browser_event_router.h" | 27 #include "chrome/browser/extensions/extension_browser_event_router.h" |
| 29 #include "chrome/browser/extensions/extension_tabs_module.h" | 28 #include "chrome/browser/extensions/extension_tabs_module.h" |
| 30 #include "chrome/browser/extensions/extensions_service.h" | 29 #include "chrome/browser/extensions/extensions_service.h" |
| 31 #include "chrome/browser/gtk/bookmark_bubble_gtk.h" | 30 #include "chrome/browser/gtk/bookmark_bubble_gtk.h" |
| 32 #include "chrome/browser/gtk/bookmark_utils_gtk.h" | 31 #include "chrome/browser/gtk/bookmark_utils_gtk.h" |
| 33 #include "chrome/browser/gtk/cairo_cached_surface.h" | 32 #include "chrome/browser/gtk/cairo_cached_surface.h" |
| 34 #include "chrome/browser/gtk/content_setting_bubble_gtk.h" | 33 #include "chrome/browser/gtk/content_setting_bubble_gtk.h" |
| 35 #include "chrome/browser/gtk/extension_popup_gtk.h" | 34 #include "chrome/browser/gtk/extension_popup_gtk.h" |
| 36 #include "chrome/browser/gtk/first_run_bubble.h" | 35 #include "chrome/browser/gtk/first_run_bubble.h" |
| 37 #include "chrome/browser/gtk/gtk_theme_provider.h" | 36 #include "chrome/browser/gtk/gtk_theme_provider.h" |
| 38 #include "chrome/browser/gtk/gtk_util.h" | 37 #include "chrome/browser/gtk/gtk_util.h" |
| 39 #include "chrome/browser/gtk/nine_box.h" | 38 #include "chrome/browser/gtk/nine_box.h" |
| 40 #include "chrome/browser/gtk/rounded_window.h" | 39 #include "chrome/browser/gtk/rounded_window.h" |
| 41 #include "chrome/browser/gtk/view_id_util.h" | 40 #include "chrome/browser/gtk/view_id_util.h" |
| 42 #include "chrome/browser/instant/instant_controller.h" | 41 #include "chrome/browser/instant/instant_controller.h" |
| 43 #include "chrome/browser/location_bar_util.h" | 42 #include "chrome/browser/location_bar_util.h" |
| 44 #include "chrome/browser/profile.h" | 43 #include "chrome/browser/profile.h" |
| 45 #include "chrome/browser/search_engines/template_url.h" | 44 #include "chrome/browser/search_engines/template_url.h" |
| 46 #include "chrome/browser/search_engines/template_url_model.h" | 45 #include "chrome/browser/search_engines/template_url_model.h" |
| 47 #include "chrome/browser/tab_contents/tab_contents.h" | 46 #include "chrome/browser/tab_contents/tab_contents.h" |
| 47 #include "chrome/browser/ui/browser.h" |
| 48 #include "chrome/common/extensions/extension.h" | 48 #include "chrome/common/extensions/extension.h" |
| 49 #include "chrome/common/extensions/extension_action.h" | 49 #include "chrome/common/extensions/extension_action.h" |
| 50 #include "chrome/common/extensions/extension_resource.h" | 50 #include "chrome/common/extensions/extension_resource.h" |
| 51 #include "chrome/common/notification_service.h" | 51 #include "chrome/common/notification_service.h" |
| 52 #include "chrome/common/page_transition_types.h" | 52 #include "chrome/common/page_transition_types.h" |
| 53 #include "chrome/common/pref_names.h" | 53 #include "chrome/common/pref_names.h" |
| 54 #include "gfx/canvas_skia_paint.h" | 54 #include "gfx/canvas_skia_paint.h" |
| 55 #include "gfx/font.h" | 55 #include "gfx/font.h" |
| 56 #include "gfx/gtk_util.h" | 56 #include "gfx/gtk_util.h" |
| 57 #include "grit/generated_resources.h" | 57 #include "grit/generated_resources.h" |
| (...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1520 | 1520 |
| 1521 std::string badge_text = page_action_->GetBadgeText(tab_id); | 1521 std::string badge_text = page_action_->GetBadgeText(tab_id); |
| 1522 if (badge_text.empty()) | 1522 if (badge_text.empty()) |
| 1523 return FALSE; | 1523 return FALSE; |
| 1524 | 1524 |
| 1525 gfx::CanvasSkiaPaint canvas(event, false); | 1525 gfx::CanvasSkiaPaint canvas(event, false); |
| 1526 gfx::Rect bounding_rect(widget->allocation); | 1526 gfx::Rect bounding_rect(widget->allocation); |
| 1527 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); | 1527 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); |
| 1528 return FALSE; | 1528 return FALSE; |
| 1529 } | 1529 } |
| OLD | NEW |