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

Unified Diff: ash/shell.cc

Issue 9616045: Aura/Ash split: Move ScreenAura to ash::ScreenAsh. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use a separate aura::TestScreen in tests instead, partially reverting to patchset 2 Created 8 years, 9 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 | « ash/shell.h ('k') | ash/shell_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 1e8742a688abc0a75e6a0f5ef52c94a3ba66fcab..38cbfebcfde4e74c71e61f3f842b994daac38361 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -12,6 +12,7 @@
#include "ash/focus_cycler.h"
#include "ash/ime/input_method_event_filter.h"
#include "ash/launcher/launcher.h"
+#include "ash/screen_ash.h"
#include "ash/shell_delegate.h"
#include "ash/shell_factory.h"
#include "ash/shell_window_ids.h"
@@ -302,6 +303,7 @@ internal::WorkspaceController* Shell::TestApi::workspace_controller() {
Shell::Shell(ShellDelegate* delegate)
: root_window_(new aura::RootWindow),
+ screen_(new ScreenAsh(root_window_.get())),
root_filter_(NULL),
delegate_(delegate),
audio_controller_(NULL),
@@ -311,6 +313,7 @@ Shell::Shell(ShellDelegate* delegate)
desktop_background_mode_(BACKGROUND_IMAGE),
root_window_layout_(NULL),
status_widget_(NULL) {
+ gfx::Screen::SetInstance(screen_);
}
Shell::~Shell() {
@@ -589,6 +592,22 @@ void Shell::RotateFocus(Direction direction) {
internal::FocusCycler::BACKWARD);
}
+void Shell::SetScreenWorkAreaInsets(const gfx::Insets& insets) {
+ if (screen_->work_area_insets() == insets)
+ return;
+ screen_->set_work_area_insets(insets);
+ FOR_EACH_OBSERVER(ShellObserver, observers_,
+ OnScreenWorkAreaInsetsChanged());
+}
+
+void Shell::AddShellObserver(ShellObserver* observer) {
+ observers_.AddObserver(observer);
+}
+
+void Shell::RemoveShellObserver(ShellObserver* observer) {
+ observers_.RemoveObserver(observer);
+}
+
////////////////////////////////////////////////////////////////////////////////
// Shell, private:
« no previous file with comments | « ash/shell.h ('k') | ash/shell_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698