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

Unified Diff: athena/main/athena_main.cc

Issue 465803002: Make the minimized home card not overlap activities on Athena (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed sadrul@'s comments + rebased Created 6 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
« no previous file with comments | « athena/main/athena_launcher.cc ('k') | athena/screen/public/screen_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/main/athena_main.cc
diff --git a/athena/main/athena_main.cc b/athena/main/athena_main.cc
index 4cd30b13a3b370160f89a5383119f9e27f50216e..09cc30d0894d8abfd1c2247d0586a38ab4222190 100644
--- a/athena/main/athena_main.cc
+++ b/athena/main/athena_main.cc
@@ -6,6 +6,7 @@
#include "athena/main/athena_app_window_controller.h"
#include "athena/main/athena_launcher.h"
#include "athena/screen/public/screen_manager.h"
+#include "athena/screen/public/screen_manager_delegate.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/path_service.h"
@@ -44,6 +45,28 @@ class AthenaDesktopController : public extensions::ShellDesktopController {
DISALLOW_COPY_AND_ASSIGN(AthenaDesktopController);
};
+class AthenaScreenManagerDelegate : public athena::ScreenManagerDelegate {
+ public:
+ explicit AthenaScreenManagerDelegate(
+ extensions::ShellDesktopController* controller)
+ : controller_(controller) {
+ }
+
+ virtual ~AthenaScreenManagerDelegate() {
+ }
+
+ private:
+ // athena::ScreenManagerDelegate:
+ virtual void SetWorkAreaInsets(const gfx::Insets& insets) OVERRIDE {
+ controller_->SetDisplayWorkAreaInsets(insets);
+ }
+
+ // Not owned.
+ extensions::ShellDesktopController* controller_;
+
+ DISALLOW_COPY_AND_ASSIGN(AthenaScreenManagerDelegate);
+};
+
class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate {
public:
AthenaBrowserMainDelegate() {}
@@ -67,8 +90,12 @@ class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate {
extension_system->LoadApp(app_absolute_dir);
}
- athena::StartAthenaEnv(
- extensions::ShellDesktopController::instance()->host()->window());
+ extensions::ShellDesktopController* desktop_controller =
+ extensions::ShellDesktopController::instance();
+ screen_manager_delegate_.reset(
+ new AthenaScreenManagerDelegate(desktop_controller));
+ athena::StartAthenaEnv(desktop_controller->host()->window(),
+ screen_manager_delegate_.get());
athena::StartAthenaSessionWithContext(context);
}
@@ -86,6 +113,8 @@ class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate {
}
private:
+ scoped_ptr<AthenaScreenManagerDelegate> screen_manager_delegate_;
+
DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate);
};
« no previous file with comments | « athena/main/athena_launcher.cc ('k') | athena/screen/public/screen_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698