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

Unified Diff: ash/shell.cc

Issue 9696008: TestScreen shouldn't be marked aura export (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again. 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 ae5ffab6a160c972ab0b46c557cb8350482dca60..ad8f835c7ec6319f924cd0e2da9d30dc5028c5af 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"
@@ -306,6 +307,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),
@@ -316,6 +318,7 @@ Shell::Shell(ShellDelegate* delegate)
desktop_background_mode_(BACKGROUND_IMAGE),
root_window_layout_(NULL),
status_widget_(NULL) {
+ gfx::Screen::SetInstance(screen_);
}
Shell::~Shell() {
@@ -597,6 +600,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