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

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: filter by extension type instead of specific extensions Created 8 years, 4 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 99b0b2d733012e0a9fe9bbf4814e586b46d6d289..220fe98abf70bd0380237bd54a4824ecce8b662d 100644
--- a/chrome/browser/ui/views/extensions/shell_window_views.cc
+++ b/chrome/browser/ui/views/extensions/shell_window_views.cc
@@ -6,6 +6,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/extensions/extension_host.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"
@@ -326,6 +327,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_APP_ONLY));
+
OnViewWasResized();
window_->Show();
@@ -593,7 +600,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