Skip to content

Commit

Permalink
Use NULL for ExtensionKeyBindingRegistry::Delegate for app windows.
Browse files Browse the repository at this point in the history
This avoids forcing AppWindow to be a delegate that does nothing.

Review URL: https://codereview.chromium.org/180633012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254843 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
yoz@chromium.org committed Mar 4, 2014
1 parent 44e062a commit a73b21f
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 16 deletions.
1 change: 0 additions & 1 deletion apps/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ include_rules = [
"+chrome/browser/extensions/extension_function_dispatcher.h",
"+chrome/browser/extensions/extension_icon_image.h",
"+chrome/browser/extensions/extension_host.h",
"+chrome/browser/extensions/extension_keybinding_registry.h",
"+chrome/browser/extensions/extension_web_contents_observer.h",
"+chrome/browser/extensions/suggest_permission_util.h",
"+chrome/browser/extensions/unpacked_installer.h",
Expand Down
6 changes: 0 additions & 6 deletions apps/app_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -831,12 +831,6 @@ bool AppWindow::IsWebContentsVisible(content::WebContents* web_contents) {
return delegate_->IsWebContentsVisible(web_contents);
}

extensions::ActiveTabPermissionGranter*
AppWindow::GetActiveTabPermissionGranter() {
// App windows don't support the activeTab permission.
return NULL;
}

WebContentsModalDialogHost* AppWindow::GetWebContentsModalDialogHost() {
return native_app_window_.get();
}
Expand Down
6 changes: 0 additions & 6 deletions apps/app_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/extensions/extension_icon_image.h"
#include "chrome/browser/extensions/extension_keybinding_registry.h"
#include "chrome/browser/sessions/session_id.h"
#include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
#include "content/public/browser/notification_observer.h"
Expand Down Expand Up @@ -82,7 +81,6 @@ class AppWindow : public content::NotificationObserver,
public content::WebContentsDelegate,
public content::WebContentsObserver,
public web_modal::WebContentsModalDialogManagerDelegate,
public extensions::ExtensionKeybindingRegistry::Delegate,
public extensions::IconImage::Observer {
public:
enum WindowType {
Expand Down Expand Up @@ -424,10 +422,6 @@ class AppWindow : public content::NotificationObserver,
// Update the always-on-top bit in the native app window.
void UpdateNativeAlwaysOnTop();

// extensions::ExtensionKeybindingRegistry::Delegate implementation.
virtual extensions::ActiveTabPermissionGranter*
GetActiveTabPermissionGranter() OVERRIDE;

// web_modal::WebContentsModalDialogManagerDelegate implementation.
virtual web_modal::WebContentsModalDialogHost* GetWebContentsModalDialogHost()
OVERRIDE;
Expand Down
2 changes: 2 additions & 0 deletions apps/app_window_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include "chrome/common/extensions/extension_messages.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_dispatcher_host.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ - (void)setMouseDownCanMoveWindow:(BOOL)can_move;
Profile::FromBrowserContext(app_window_->browser_context()),
window,
extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
app_window));
NULL));
}

NSUInteger NativeAppWindowCocoa::GetWindowStyleMask() const {
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/gtk/apps/native_app_window_gtk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ NativeAppWindowGtk::NativeAppWindowGtk(AppWindow* app_window,
Profile::FromBrowserContext(app_window_->browser_context()),
window_,
extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
app_window_));
NULL));

ui::ActiveWindowWatcherX::AddObserver(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ void ChromeNativeAppWindowViews::InitializeWindow(
Profile::FromBrowserContext(app_window->browser_context()),
window()->GetFocusManager(),
extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
app_window));
NULL));

#if defined(OS_WIN)
if (ShouldUseNativeFrame() &&
Expand Down

0 comments on commit a73b21f

Please sign in to comment.