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

Unified Diff: chrome/browser/ui/views/extensions/shell_window_views.cc

Issue 10911020: Enable commands API for platform apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/extensions/shell_window_views.cc
diff --git a/chrome/browser/ui/views/extensions/shell_window_views.cc b/chrome/browser/ui/views/extensions/shell_window_views.cc
index 79bc1fc9fb08e51f66437eef18a421cdc08e40e1..2c849f8ea25b0bbbc4191ac85a54ca2627860200 100644
--- a/chrome/browser/ui/views/extensions/shell_window_views.cc
+++ b/chrome/browser/ui/views/extensions/shell_window_views.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/favicon/favicon_tab_helper.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
+#include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views.h"
#include "chrome/common/extensions/draggable_region.h"
#include "chrome/common/extensions/extension.h"
#include "content/public/browser/render_view_host.h"
@@ -337,6 +338,12 @@ ShellWindowViews::ShellWindowViews(ShellWindow* shell_window,
UTF8ToWide(app_name), shell_window_->profile()->GetPath()),
GetWidget()->GetTopLevelWidget()->GetNativeWindow());
#endif
+
+ extension_keybinding_registry_.reset(
+ new ExtensionKeybindingRegistryViews(shell_window_->profile(),
+ window_->GetFocusManager(),
+ extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY));
+
OnViewWasResized();
window_->Show();
@@ -626,7 +633,8 @@ void ShellWindowViews::UpdateDraggableRegions(
void ShellWindowViews::HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
- // No-op.
+ unhandled_keyboard_event_handler_.HandleKeyboardEvent(event,
+ GetFocusManager());
}
// static

Powered by Google App Engine
This is Rietveld 408576698