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 <algorithm> | |
Erik does not do reviews
2011/01/12 00:31:54
why did these get added?
asargent_no_longer_on_chrome
2011/01/13 21:34:07
Same deal here - just cleanup of gcl lint while I'
| |
7 #include <string> | 8 #include <string> |
9 #include <vector> | |
8 | 10 |
9 #include "app/gtk_dnd_util.h" | 11 #include "app/gtk_dnd_util.h" |
10 #include "app/l10n_util.h" | 12 #include "app/l10n_util.h" |
11 #include "app/resource_bundle.h" | 13 #include "app/resource_bundle.h" |
12 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
13 #include "base/i18n/rtl.h" | 15 #include "base/i18n/rtl.h" |
14 #include "base/logging.h" | 16 #include "base/logging.h" |
15 #include "base/string_util.h" | 17 #include "base/string_util.h" |
16 #include "base/utf_string_conversions.h" | 18 #include "base/utf_string_conversions.h" |
17 #include "chrome/app/chrome_command_ids.h" | 19 #include "chrome/app/chrome_command_ids.h" |
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1496 event_box_.get(), | 1498 event_box_.get(), |
1497 devtools); | 1499 devtools); |
1498 return true; | 1500 return true; |
1499 } | 1501 } |
1500 | 1502 |
1501 gboolean LocationBarViewGtk::PageActionViewGtk::OnButtonPressed( | 1503 gboolean LocationBarViewGtk::PageActionViewGtk::OnButtonPressed( |
1502 GtkWidget* sender, | 1504 GtkWidget* sender, |
1503 GdkEvent* event) { | 1505 GdkEvent* event) { |
1504 if (event->button.button != 3) { | 1506 if (event->button.button != 3) { |
1505 if (!ShowPopup(false)) { | 1507 if (!ShowPopup(false)) { |
1506 ExtensionBrowserEventRouter::GetInstance()->PageActionExecuted( | 1508 ExtensionService* service = profile_->GetExtensionService(); |
1509 service->browser_event_router()->PageActionExecuted( | |
1507 profile_, | 1510 profile_, |
1508 page_action_->extension_id(), | 1511 page_action_->extension_id(), |
1509 page_action_->id(), | 1512 page_action_->id(), |
1510 current_tab_id_, | 1513 current_tab_id_, |
1511 current_url_.spec(), | 1514 current_url_.spec(), |
1512 event->button.button); | 1515 event->button.button); |
1513 } | 1516 } |
1514 } else { | 1517 } else { |
1515 const Extension* extension = profile_->GetExtensionService()-> | 1518 const Extension* extension = profile_->GetExtensionService()-> |
1516 GetExtensionById(page_action()->extension_id(), false); | 1519 GetExtensionById(page_action()->extension_id(), false); |
(...skipping 20 matching lines...) Expand all Loading... | |
1537 | 1540 |
1538 std::string badge_text = page_action_->GetBadgeText(tab_id); | 1541 std::string badge_text = page_action_->GetBadgeText(tab_id); |
1539 if (badge_text.empty()) | 1542 if (badge_text.empty()) |
1540 return FALSE; | 1543 return FALSE; |
1541 | 1544 |
1542 gfx::CanvasSkiaPaint canvas(event, false); | 1545 gfx::CanvasSkiaPaint canvas(event, false); |
1543 gfx::Rect bounding_rect(widget->allocation); | 1546 gfx::Rect bounding_rect(widget->allocation); |
1544 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); | 1547 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); |
1545 return FALSE; | 1548 return FALSE; |
1546 } | 1549 } |
OLD | NEW |