Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: chrome/browser/ui/gtk/location_bar_view_gtk.cc

Issue 10383240: This adds a webui overlay on the extensions page for showing what Extension keybindings are active.… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after
1683 const ExtensionSet* extensions = owner_->browser()->profile()-> 1683 const ExtensionSet* extensions = owner_->browser()->profile()->
1684 GetExtensionService()->extensions(); 1684 GetExtensionService()->extensions();
1685 const Extension* extension = 1685 const Extension* extension =
1686 extensions->GetByID(page_action_->extension_id()); 1686 extensions->GetByID(page_action_->extension_id());
1687 window_ = owner_->browser()->window()->GetNativeHandle(); 1687 window_ = owner_->browser()->window()->GetNativeHandle();
1688 1688
1689 ExtensionCommandService* command_service = 1689 ExtensionCommandService* command_service =
1690 ExtensionCommandServiceFactory::GetForProfile( 1690 ExtensionCommandServiceFactory::GetForProfile(
1691 owner_->browser()->profile()); 1691 owner_->browser()->profile());
1692 const extensions::Command* command = 1692 const extensions::Command* command =
1693 command_service->GetActivePageActionCommand(extension->id()); 1693 command_service->GetPageActionCommand(
1694 extension->id(), ExtensionCommandService::ACTIVE_ONLY);
1694 if (command) { 1695 if (command) {
1695 // Found the browser action shortcut command, register it. 1696 // Found the browser action shortcut command, register it.
1696 keybinding_.reset(new ui::AcceleratorGtk( 1697 keybinding_.reset(new ui::AcceleratorGtk(
1697 command->accelerator().key_code(), 1698 command->accelerator().key_code(),
1698 command->accelerator().IsShiftDown(), 1699 command->accelerator().IsShiftDown(),
1699 command->accelerator().IsCtrlDown(), 1700 command->accelerator().IsCtrlDown(),
1700 command->accelerator().IsAltDown())); 1701 command->accelerator().IsAltDown()));
1701 1702
1702 accel_group_ = gtk_accel_group_new(); 1703 accel_group_ = gtk_accel_group_new();
1703 gtk_window_add_accel_group(window_, accel_group_); 1704 gtk_window_add_accel_group(window_, accel_group_);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1808 GdkModifierType modifier, 1809 GdkModifierType modifier,
1809 void* user_data) { 1810 void* user_data) {
1810 PageActionViewGtk* view = static_cast<PageActionViewGtk*>(user_data); 1811 PageActionViewGtk* view = static_cast<PageActionViewGtk*>(user_data);
1811 if (!gtk_widget_get_visible(view->widget())) 1812 if (!gtk_widget_get_visible(view->widget()))
1812 return FALSE; 1813 return FALSE;
1813 1814
1814 GdkEventButton event = {}; 1815 GdkEventButton event = {};
1815 event.button = 1; 1816 event.button = 1;
1816 return view->OnButtonPressed(view->widget(), &event); 1817 return view->OnButtonPressed(view->widget(), &event);
1817 } 1818 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698