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

Unified Diff: athena/main/athena_main.cc

Issue 416243004: Enable touch text selection on Athena (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Passed windows list to overview mode Created 6 years, 5 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: athena/main/athena_main.cc
diff --git a/athena/main/athena_main.cc b/athena/main/athena_main.cc
index d50330e237bed0f1bf118af7868ccc9051f40e27..8d966b39de81b0d0fdd47841d591df6fab33bd95 100644
--- a/athena/main/athena_main.cc
+++ b/athena/main/athena_main.cc
@@ -29,6 +29,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/keyboard/keyboard_controller.h"
#include "ui/keyboard/keyboard_controller_observer.h"
+#include "ui/views/views_delegate.h"
#include "ui/wm/core/visibility_controller.h"
namespace {
@@ -74,6 +75,21 @@ class AthenaDesktopController : public extensions::ShellDesktopController {
DISALLOW_COPY_AND_ASSIGN(AthenaDesktopController);
};
+class AthenaViewsDelegate : public views::ViewsDelegate {
+ public:
+ AthenaViewsDelegate() {}
+ virtual ~AthenaViewsDelegate() {}
+
+ private:
+ // views::ViewsDelegate:
+ virtual void OnBeforeWidgetInit(
+ views::Widget::InitParams* params,
+ views::internal::NativeWidgetDelegate* delegate) OVERRIDE {
+ }
+
+ DISALLOW_COPY_AND_ASSIGN(AthenaViewsDelegate);
+};
+
class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate {
public:
AthenaBrowserMainDelegate() {}
@@ -100,6 +116,8 @@ class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate {
extension_system->LoadApp(app_absolute_dir);
}
+ views::ViewsDelegate::views_delegate = &views_delegate_;
oshima 2014/08/01 17:22:11 can you move this to athena_launcher ?
mohsen 2014/08/01 18:44:26 Done. Please take a look...
+
athena::StartAthena(
extensions::ShellDesktopController::instance()->host()->window(),
new athena::ContentActivityFactory(),
@@ -116,6 +134,8 @@ class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate {
virtual void Shutdown() OVERRIDE {
keyboard_observer_.reset();
athena::ShutdownAthena();
+
+ views::ViewsDelegate::views_delegate = NULL;
}
virtual extensions::ShellDesktopController* CreateDesktopController()
@@ -128,6 +148,7 @@ class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate {
}
private:
+ AthenaViewsDelegate views_delegate_;
scoped_ptr<VirtualKeyboardObserver> keyboard_observer_;
DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate);

Powered by Google App Engine
This is Rietveld 408576698