summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-31 22:43:44 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-31 22:43:44 +0000
commitc288536191009fe8080396ff292b52aa6f435cdc (patch)
tree7d484371d0d96ccb30ca453f08e902a850d5a0aa /ash
parent7e08a115e8abdcf50bb4b9e65859d6d236cc35de (diff)
downloadchromium_src-c288536191009fe8080396ff292b52aa6f435cdc.zip
chromium_src-c288536191009fe8080396ff292b52aa6f435cdc.tar.gz
chromium_src-c288536191009fe8080396ff292b52aa6f435cdc.tar.bz2
Move UserGestureHandler to shell
Rename class names to UserActionXX to avoid confusion with touch gesture and this also handles non gesture mouse button action. This is necessary step to allow multiple root windows. BUG=123160 TEST=none Review URL: https://chromiumcodereview.appspot.com/10448093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139899 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/shell.cc6
-rw-r--r--ash/shell.h4
-rw-r--r--ash/shell/shell_delegate_impl.cc3
-rw-r--r--ash/shell/shell_delegate_impl.h1
-rw-r--r--ash/shell_delegate.h6
-rw-r--r--ash/test/test_shell_delegate.cc4
-rw-r--r--ash/test/test_shell_delegate.h1
7 files changed, 25 insertions, 0 deletions
diff --git a/ash/shell.cc b/ash/shell.cc
index a9f9d42..7eac672 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -66,6 +66,7 @@
#include "base/command_line.h"
#include "grit/ui_resources.h"
#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/client/user_action_client.h"
#include "ui/aura/env.h"
#include "ui/aura/focus_manager.h"
#include "ui/aura/layout_manager.h"
@@ -753,6 +754,11 @@ void Shell::Init() {
if (!user_wallpaper_delegate_.get())
user_wallpaper_delegate_.reset(new DummyUserWallpaperDelegate());
+ if (delegate_.get())
+ user_action_client_.reset(delegate_->CreateUserActionClient());
+ if (user_action_client_.get())
+ aura::client::SetUserActionClient(root_window, user_action_client_.get());
+
InitLayoutManagers();
if (!command_line->HasSwitch(switches::kAuraNoShadows)) {
diff --git a/ash/shell.h b/ash/shell.h
index 237c4945..153cd44 100644
--- a/ash/shell.h
+++ b/ash/shell.h
@@ -28,6 +28,9 @@ class FocusManager;
class Monitor;
class RootWindow;
class Window;
+namespace client {
+class UserActionClient;
+}
namespace shared {
class InputMethodEventFilter;
class RootWindowEventFilter;
@@ -381,6 +384,7 @@ class ASH_EXPORT Shell {
scoped_ptr<internal::MagnificationController> magnification_controller_;
scoped_ptr<internal::ScreenDimmer> screen_dimmer_;
scoped_ptr<aura::FocusManager> focus_manager_;
+ scoped_ptr<aura::client::UserActionClient> user_action_client_;
// An event filter that rewrites or drops a key event.
scoped_ptr<internal::KeyRewriterEventFilter> key_rewriter_filter_;
diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc
index 7890551..6dc3dc7 100644
--- a/ash/shell/shell_delegate_impl.cc
+++ b/ash/shell/shell_delegate_impl.cc
@@ -117,6 +117,9 @@ ash::SystemTrayDelegate* ShellDelegateImpl::CreateSystemTrayDelegate(
ash::UserWallpaperDelegate* ShellDelegateImpl::CreateUserWallpaperDelegate() {
return NULL;
}
+aura::client::UserActionClient* ShellDelegateImpl::CreateUserActionClient() {
+ return NULL;
+}
} // namespace shell
} // namespace ash
diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h
index 3acc893..4534347 100644
--- a/ash/shell/shell_delegate_impl.h
+++ b/ash/shell/shell_delegate_impl.h
@@ -47,6 +47,7 @@ class ShellDelegateImpl : public ash::ShellDelegate {
virtual ash::SystemTrayDelegate* CreateSystemTrayDelegate(
ash::SystemTray* tray) OVERRIDE;
virtual ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() OVERRIDE;
+ virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE;
private:
// Used to update Launcher. Owned by main.
diff --git a/ash/shell_delegate.h b/ash/shell_delegate.h
index d57cca3..5bb5303 100644
--- a/ash/shell_delegate.h
+++ b/ash/shell_delegate.h
@@ -19,6 +19,9 @@ class AppListViewDelegate;
namespace aura {
class Window;
+namespace client {
+class UserActionClient;
+}
}
namespace views {
@@ -111,6 +114,9 @@ class ASH_EXPORT ShellDelegate {
// Creates a user wallpaper delegate. Shell takes ownership of the delegate.
virtual UserWallpaperDelegate* CreateUserWallpaperDelegate() = 0;
+
+ // Creates a user action client. Shell takes ownership of the object.
+ virtual aura::client::UserActionClient* CreateUserActionClient() = 0;
};
} // namespace ash
diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc
index 82d98112..80a6894 100644
--- a/ash/test/test_shell_delegate.cc
+++ b/ash/test/test_shell_delegate.cc
@@ -103,5 +103,9 @@ UserWallpaperDelegate* TestShellDelegate::CreateUserWallpaperDelegate() {
return NULL;
}
+aura::client::UserActionClient* TestShellDelegate::CreateUserActionClient() {
+ return NULL;
+}
+
} // namespace test
} // namespace ash
diff --git a/ash/test/test_shell_delegate.h b/ash/test/test_shell_delegate.h
index 5ca9759..f9d6113 100644
--- a/ash/test/test_shell_delegate.h
+++ b/ash/test/test_shell_delegate.h
@@ -42,6 +42,7 @@ class TestShellDelegate : public ShellDelegate {
ash::LauncherModel* model) OVERRIDE;
virtual SystemTrayDelegate* CreateSystemTrayDelegate(SystemTray* t) OVERRIDE;
virtual UserWallpaperDelegate* CreateUserWallpaperDelegate() OVERRIDE;
+ virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE;
private:
bool locked_;