| 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 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #include "chrome/browser/ui/gtk/rounded_window.h" | 45 #include "chrome/browser/ui/gtk/rounded_window.h" |
| 46 #include "chrome/browser/ui/gtk/view_id_util.h" | 46 #include "chrome/browser/ui/gtk/view_id_util.h" |
| 47 #include "chrome/browser/ui/omnibox/location_bar_util.h" | 47 #include "chrome/browser/ui/omnibox/location_bar_util.h" |
| 48 #include "chrome/common/chrome_switches.h" | 48 #include "chrome/common/chrome_switches.h" |
| 49 #include "chrome/common/extensions/extension.h" | 49 #include "chrome/common/extensions/extension.h" |
| 50 #include "chrome/common/extensions/extension_action.h" | 50 #include "chrome/common/extensions/extension_action.h" |
| 51 #include "chrome/common/extensions/extension_resource.h" | 51 #include "chrome/common/extensions/extension_resource.h" |
| 52 #include "chrome/common/notification_service.h" | 52 #include "chrome/common/notification_service.h" |
| 53 #include "chrome/common/page_transition_types.h" | 53 #include "chrome/common/page_transition_types.h" |
| 54 #include "chrome/common/pref_names.h" | 54 #include "chrome/common/pref_names.h" |
| 55 #include "gfx/canvas_skia_paint.h" | |
| 56 #include "gfx/font.h" | |
| 57 #include "gfx/gtk_util.h" | |
| 58 #include "grit/generated_resources.h" | 55 #include "grit/generated_resources.h" |
| 59 #include "grit/theme_resources.h" | 56 #include "grit/theme_resources.h" |
| 60 #include "net/base/net_util.h" | 57 #include "net/base/net_util.h" |
| 61 #include "ui/base/dragdrop/gtk_dnd_util.h" | 58 #include "ui/base/dragdrop/gtk_dnd_util.h" |
| 62 #include "ui/base/l10n/l10n_util.h" | 59 #include "ui/base/l10n/l10n_util.h" |
| 63 #include "ui/base/resource/resource_bundle.h" | 60 #include "ui/base/resource/resource_bundle.h" |
| 61 #include "ui/gfx/canvas_skia_paint.h" |
| 62 #include "ui/gfx/font.h" |
| 63 #include "ui/gfx/gtk_util.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 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1546 | 1546 |
| 1547 std::string badge_text = page_action_->GetBadgeText(tab_id); | 1547 std::string badge_text = page_action_->GetBadgeText(tab_id); |
| 1548 if (badge_text.empty()) | 1548 if (badge_text.empty()) |
| 1549 return FALSE; | 1549 return FALSE; |
| 1550 | 1550 |
| 1551 gfx::CanvasSkiaPaint canvas(event, false); | 1551 gfx::CanvasSkiaPaint canvas(event, false); |
| 1552 gfx::Rect bounding_rect(widget->allocation); | 1552 gfx::Rect bounding_rect(widget->allocation); |
| 1553 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); | 1553 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); |
| 1554 return FALSE; | 1554 return FALSE; |
| 1555 } | 1555 } |
| OLD | NEW |