| 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 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1344 // If we were already showing, then treat this click as a dismiss. | 1344 // If we were already showing, then treat this click as a dismiss. |
| 1345 if (popup_showing) | 1345 if (popup_showing) |
| 1346 return; | 1346 return; |
| 1347 | 1347 |
| 1348 View* parent = GetParent(); | 1348 View* parent = GetParent(); |
| 1349 gfx::Point origin; | 1349 gfx::Point origin; |
| 1350 View::ConvertPointToScreen(parent, &origin); | 1350 View::ConvertPointToScreen(parent, &origin); |
| 1351 gfx::Rect rect = parent->bounds(); | 1351 gfx::Rect rect = parent->bounds(); |
| 1352 rect.set_x(origin.x()); | 1352 rect.set_x(origin.x()); |
| 1353 rect.set_y(origin.y()); | 1353 rect.set_y(origin.y()); |
| 1354 popup_ = ExtensionPopup::Show(page_action_->popup_url(), browser, rect, | 1354 popup_ = ExtensionPopup::Show(page_action_->popup_url(), |
| 1355 BubbleBorder::TOP_RIGHT); | 1355 browser, |
| 1356 rect, |
| 1357 BubbleBorder::TOP_RIGHT, |
| 1358 true); // Activate the popup window. |
| 1356 popup_->set_delegate(this); | 1359 popup_->set_delegate(this); |
| 1357 } else { | 1360 } else { |
| 1358 ExtensionBrowserEventRouter::GetInstance()->PageActionExecuted( | 1361 ExtensionBrowserEventRouter::GetInstance()->PageActionExecuted( |
| 1359 profile_, page_action_->extension_id(), page_action_->id(), | 1362 profile_, page_action_->extension_id(), page_action_->id(), |
| 1360 current_tab_id_, current_url_.spec(), button); | 1363 current_tab_id_, current_url_.spec(), button); |
| 1361 } | 1364 } |
| 1362 } | 1365 } |
| 1363 | 1366 |
| 1364 void LocationBarView::PageActionImageView::OnMouseMoved( | 1367 void LocationBarView::PageActionImageView::OnMouseMoved( |
| 1365 const views::MouseEvent& event) { | 1368 const views::MouseEvent& event) { |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1599 const int button = 1; // Left mouse button. | 1602 const int button = 1; // Left mouse button. |
| 1600 page_action_views_[i]->image_view()->ExecuteAction(button); | 1603 page_action_views_[i]->image_view()->ExecuteAction(button); |
| 1601 return; | 1604 return; |
| 1602 } | 1605 } |
| 1603 ++current; | 1606 ++current; |
| 1604 } | 1607 } |
| 1605 } | 1608 } |
| 1606 } | 1609 } |
| 1607 NOTREACHED(); | 1610 NOTREACHED(); |
| 1608 } | 1611 } |
| OLD | NEW |