| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/views/location_bar_view.h" | 5 #include "chrome/browser/views/location_bar_view.h" |
| 6 | 6 |
| 7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1270 | 1270 |
| 1271 LocationBarView::PageActionImageView::~PageActionImageView() { | 1271 LocationBarView::PageActionImageView::~PageActionImageView() { |
| 1272 if (tracker_) | 1272 if (tracker_) |
| 1273 tracker_->StopTrackingImageLoad(); | 1273 tracker_->StopTrackingImageLoad(); |
| 1274 } | 1274 } |
| 1275 | 1275 |
| 1276 bool LocationBarView::PageActionImageView::OnMousePressed( | 1276 bool LocationBarView::PageActionImageView::OnMousePressed( |
| 1277 const views::MouseEvent& event) { | 1277 const views::MouseEvent& event) { |
| 1278 // Our PageAction icon was clicked on, notify proper authorities. | 1278 // Our PageAction icon was clicked on, notify proper authorities. |
| 1279 ExtensionBrowserEventRouter::GetInstance()->PageActionExecuted( | 1279 ExtensionBrowserEventRouter::GetInstance()->PageActionExecuted( |
| 1280 profile_, page_action_->id(), current_tab_id_, current_url_.spec()); | 1280 profile_, page_action_->extension_id(), page_action_->id(), |
| 1281 current_tab_id_, current_url_.spec()); |
| 1281 return true; | 1282 return true; |
| 1282 } | 1283 } |
| 1283 | 1284 |
| 1284 void LocationBarView::PageActionImageView::ShowInfoBubble() { | 1285 void LocationBarView::PageActionImageView::ShowInfoBubble() { |
| 1285 SkColor text_color = SK_ColorBLACK; | 1286 SkColor text_color = SK_ColorBLACK; |
| 1286 ShowInfoBubbleImpl(ASCIIToWide(tooltip_), text_color); | 1287 ShowInfoBubbleImpl(ASCIIToWide(tooltip_), text_color); |
| 1287 } | 1288 } |
| 1288 | 1289 |
| 1289 void LocationBarView::PageActionImageView::UpdateVisibility( | 1290 void LocationBarView::PageActionImageView::UpdateVisibility( |
| 1290 TabContents* contents, GURL url) { | 1291 TabContents* contents, GURL url) { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1369 } | 1370 } |
| 1370 | 1371 |
| 1371 int LocationBarView::PageActionVisibleCount() { | 1372 int LocationBarView::PageActionVisibleCount() { |
| 1372 int result = 0; | 1373 int result = 0; |
| 1373 for (size_t i = 0; i < page_action_image_views_.size(); i++) { | 1374 for (size_t i = 0; i < page_action_image_views_.size(); i++) { |
| 1374 if (page_action_image_views_[i]->IsVisible()) | 1375 if (page_action_image_views_[i]->IsVisible()) |
| 1375 ++result; | 1376 ++result; |
| 1376 } | 1377 } |
| 1377 return result; | 1378 return result; |
| 1378 } | 1379 } |
| OLD | NEW |