OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
11 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
12 #include "app/resource_bundle.h" | |
13 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
14 #include "base/command_line.h" | 13 #include "base/command_line.h" |
15 #include "base/i18n/rtl.h" | 14 #include "base/i18n/rtl.h" |
16 #include "base/logging.h" | 15 #include "base/logging.h" |
17 #include "base/string_util.h" | 16 #include "base/string_util.h" |
18 #include "base/utf_string_conversions.h" | 17 #include "base/utf_string_conversions.h" |
19 #include "chrome/app/chrome_command_ids.h" | 18 #include "chrome/app/chrome_command_ids.h" |
20 #include "chrome/browser/accessibility_events.h" | 19 #include "chrome/browser/accessibility_events.h" |
21 #include "chrome/browser/alternate_nav_url_fetcher.h" | 20 #include "chrome/browser/alternate_nav_url_fetcher.h" |
22 #include "chrome/browser/autocomplete/autocomplete_edit_view_gtk.h" | 21 #include "chrome/browser/autocomplete/autocomplete_edit_view_gtk.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #include "chrome/common/notification_service.h" | 53 #include "chrome/common/notification_service.h" |
55 #include "chrome/common/page_transition_types.h" | 54 #include "chrome/common/page_transition_types.h" |
56 #include "chrome/common/pref_names.h" | 55 #include "chrome/common/pref_names.h" |
57 #include "gfx/canvas_skia_paint.h" | 56 #include "gfx/canvas_skia_paint.h" |
58 #include "gfx/font.h" | 57 #include "gfx/font.h" |
59 #include "gfx/gtk_util.h" | 58 #include "gfx/gtk_util.h" |
60 #include "grit/generated_resources.h" | 59 #include "grit/generated_resources.h" |
61 #include "grit/theme_resources.h" | 60 #include "grit/theme_resources.h" |
62 #include "net/base/net_util.h" | 61 #include "net/base/net_util.h" |
63 #include "ui/base/dragdrop/gtk_dnd_util.h" | 62 #include "ui/base/dragdrop/gtk_dnd_util.h" |
| 63 #include "ui/base/resource/resource_bundle.h" |
64 #include "webkit/glue/window_open_disposition.h" | 64 #include "webkit/glue/window_open_disposition.h" |
65 | 65 |
66 namespace { | 66 namespace { |
67 | 67 |
68 // We are positioned with a little bit of extra space that we don't use now. | 68 // We are positioned with a little bit of extra space that we don't use now. |
69 const int kTopMargin = 1; | 69 const int kTopMargin = 1; |
70 const int kBottomMargin = 1; | 70 const int kBottomMargin = 1; |
71 const int kLeftMargin = 1; | 71 const int kLeftMargin = 1; |
72 const int kRightMargin = 1; | 72 const int kRightMargin = 1; |
73 // We draw a border on the top and bottom (but not on left or right). | 73 // We draw a border on the top and bottom (but not on left or right). |
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1548 | 1548 |
1549 std::string badge_text = page_action_->GetBadgeText(tab_id); | 1549 std::string badge_text = page_action_->GetBadgeText(tab_id); |
1550 if (badge_text.empty()) | 1550 if (badge_text.empty()) |
1551 return FALSE; | 1551 return FALSE; |
1552 | 1552 |
1553 gfx::CanvasSkiaPaint canvas(event, false); | 1553 gfx::CanvasSkiaPaint canvas(event, false); |
1554 gfx::Rect bounding_rect(widget->allocation); | 1554 gfx::Rect bounding_rect(widget->allocation); |
1555 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); | 1555 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); |
1556 return FALSE; | 1556 return FALSE; |
1557 } | 1557 } |
OLD | NEW |