| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1692 DCHECK_EQ(id, IDC_CHROME_TO_MOBILE_PAGE); | 1692 DCHECK_EQ(id, IDC_CHROME_TO_MOBILE_PAGE); |
| 1693 if (enabled != gtk_widget_get_visible(chrome_to_mobile_view_.get())) | 1693 if (enabled != gtk_widget_get_visible(chrome_to_mobile_view_.get())) |
| 1694 UpdateChromeToMobileIcon(); | 1694 UpdateChromeToMobileIcon(); |
| 1695 } | 1695 } |
| 1696 | 1696 |
| 1697 void LocationBarViewGtk::PageActionViewGtk::ConnectPageActionAccelerator() { | 1697 void LocationBarViewGtk::PageActionViewGtk::ConnectPageActionAccelerator() { |
| 1698 const ExtensionSet* extensions = owner_->browser()->profile()-> | 1698 const ExtensionSet* extensions = owner_->browser()->profile()-> |
| 1699 GetExtensionService()->extensions(); | 1699 GetExtensionService()->extensions(); |
| 1700 const Extension* extension = | 1700 const Extension* extension = |
| 1701 extensions->GetByID(page_action_->extension_id()); | 1701 extensions->GetByID(page_action_->extension_id()); |
| 1702 window_ = owner_->browser()->window()->GetNativeHandle(); | 1702 window_ = owner_->browser()->window()->GetNativeWindow(); |
| 1703 | 1703 |
| 1704 extensions::CommandService* command_service = | 1704 extensions::CommandService* command_service = |
| 1705 extensions::CommandServiceFactory::GetForProfile( | 1705 extensions::CommandServiceFactory::GetForProfile( |
| 1706 owner_->browser()->profile()); | 1706 owner_->browser()->profile()); |
| 1707 const extensions::Command* command = | 1707 const extensions::Command* command = |
| 1708 command_service->GetPageActionCommand( | 1708 command_service->GetPageActionCommand( |
| 1709 extension->id(), | 1709 extension->id(), |
| 1710 extensions::CommandService::ACTIVE_ONLY); | 1710 extensions::CommandService::ACTIVE_ONLY); |
| 1711 if (command) { | 1711 if (command) { |
| 1712 // Found the browser action shortcut command, register it. | 1712 // Found the browser action shortcut command, register it. |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1825 GdkModifierType modifier, | 1825 GdkModifierType modifier, |
| 1826 void* user_data) { | 1826 void* user_data) { |
| 1827 PageActionViewGtk* view = static_cast<PageActionViewGtk*>(user_data); | 1827 PageActionViewGtk* view = static_cast<PageActionViewGtk*>(user_data); |
| 1828 if (!gtk_widget_get_visible(view->widget())) | 1828 if (!gtk_widget_get_visible(view->widget())) |
| 1829 return FALSE; | 1829 return FALSE; |
| 1830 | 1830 |
| 1831 GdkEventButton event = {}; | 1831 GdkEventButton event = {}; |
| 1832 event.button = 1; | 1832 event.button = 1; |
| 1833 return view->OnButtonPressed(view->widget(), &event); | 1833 return view->OnButtonPressed(view->widget(), &event); |
| 1834 } | 1834 } |
| OLD | NEW |