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/gfx/canvas_paint.h" | |
10 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
11 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
12 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
13 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
14 #include "base/logging.h" | 13 #include "base/logging.h" |
15 #include "base/string_util.h" | 14 #include "base/string_util.h" |
16 #include "chrome/app/chrome_dll_resource.h" | 15 #include "chrome/app/chrome_dll_resource.h" |
17 #include "chrome/browser/accessibility_events.h" | 16 #include "chrome/browser/accessibility_events.h" |
18 #include "chrome/browser/alternate_nav_url_fetcher.h" | 17 #include "chrome/browser/alternate_nav_url_fetcher.h" |
19 #include "chrome/browser/autocomplete/autocomplete_edit_view_gtk.h" | 18 #include "chrome/browser/autocomplete/autocomplete_edit_view_gtk.h" |
(...skipping 16 matching lines...) Expand all Loading... |
36 #include "chrome/browser/gtk/rounded_window.h" | 35 #include "chrome/browser/gtk/rounded_window.h" |
37 #include "chrome/browser/profile.h" | 36 #include "chrome/browser/profile.h" |
38 #include "chrome/browser/search_engines/template_url.h" | 37 #include "chrome/browser/search_engines/template_url.h" |
39 #include "chrome/browser/search_engines/template_url_model.h" | 38 #include "chrome/browser/search_engines/template_url_model.h" |
40 #include "chrome/browser/tab_contents/tab_contents.h" | 39 #include "chrome/browser/tab_contents/tab_contents.h" |
41 #include "chrome/common/extensions/extension.h" | 40 #include "chrome/common/extensions/extension.h" |
42 #include "chrome/common/extensions/extension_action.h" | 41 #include "chrome/common/extensions/extension_action.h" |
43 #include "chrome/common/notification_service.h" | 42 #include "chrome/common/notification_service.h" |
44 #include "chrome/common/page_transition_types.h" | 43 #include "chrome/common/page_transition_types.h" |
45 #include "chrome/common/pref_names.h" | 44 #include "chrome/common/pref_names.h" |
| 45 #include "gfx/canvas_paint.h" |
46 #include "gfx/gtk_util.h" | 46 #include "gfx/gtk_util.h" |
47 #include "grit/generated_resources.h" | 47 #include "grit/generated_resources.h" |
48 #include "grit/theme_resources.h" | 48 #include "grit/theme_resources.h" |
49 #include "net/base/net_util.h" | 49 #include "net/base/net_util.h" |
50 #include "webkit/glue/window_open_disposition.h" | 50 #include "webkit/glue/window_open_disposition.h" |
51 | 51 |
52 namespace { | 52 namespace { |
53 | 53 |
54 // We are positioned with a little bit of extra space that we don't use now. | 54 // We are positioned with a little bit of extra space that we don't use now. |
55 const int kTopMargin = 1; | 55 const int kTopMargin = 1; |
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1260 | 1260 |
1261 std::string badge_text = page_action_->GetBadgeText(tab_id); | 1261 std::string badge_text = page_action_->GetBadgeText(tab_id); |
1262 if (badge_text.empty()) | 1262 if (badge_text.empty()) |
1263 return FALSE; | 1263 return FALSE; |
1264 | 1264 |
1265 gfx::CanvasPaint canvas(event, false); | 1265 gfx::CanvasPaint canvas(event, false); |
1266 gfx::Rect bounding_rect(widget->allocation); | 1266 gfx::Rect bounding_rect(widget->allocation); |
1267 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); | 1267 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); |
1268 return FALSE; | 1268 return FALSE; |
1269 } | 1269 } |
OLD | NEW |