summaryrefslogtreecommitdiffstats
path: root/chrome/browser/fullscreen_aura.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-18 21:00:32 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-18 21:00:32 +0000
commit91846402ed527c2c947dc476a7b36c992ea1c144 (patch)
treee0fe1a6510a51f0c296602b7732258001269de7d /chrome/browser/fullscreen_aura.cc
parentbdab1c04ca6f6bd94ca86d6caa810ca58edc7713 (diff)
downloadchromium_src-91846402ed527c2c947dc476a7b36c992ea1c144.zip
chromium_src-91846402ed527c2c947dc476a7b36c992ea1c144.tar.gz
chromium_src-91846402ed527c2c947dc476a7b36c992ea1c144.tar.bz2
Revert 132856 - Aura/ash split: Remove hacks and get chrome linking without ash.
views_unittests failure on Linux Chromeos. For the first time now, you can do: > build/gyp_chromium -Duse_aura=1 -Duse_ash=0 And get a running chrome. It has lots of issues, especially related to window placement, tab handling, etc, but it pops up and renders web content. Also consolidates most of the desktop behavior into its own class. Also makes views_examples_exe work again. Several of the hacks are no longer needed after Ben's refactoring to support WebView. BUG=116458,119759 TEST=none Review URL: http://codereview.chromium.org/10081022 TBR=erg@chromium.org Review URL: https://chromiumcodereview.appspot.com/10083057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132864 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/fullscreen_aura.cc')
-rw-r--r--chrome/browser/fullscreen_aura.cc32
1 files changed, 25 insertions, 7 deletions
diff --git a/chrome/browser/fullscreen_aura.cc b/chrome/browser/fullscreen_aura.cc
index db768be..08b1419 100644
--- a/chrome/browser/fullscreen_aura.cc
+++ b/chrome/browser/fullscreen_aura.cc
@@ -4,16 +4,34 @@
#include "chrome/browser/fullscreen.h"
+#include "ash/shell.h"
#include "base/logging.h"
+#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/root_window.h"
+#include "ui/aura/window.h"
+#include "ui/base/ui_base_types.h"
-#if !defined(USE_ASH)
+namespace {
-bool IsFullScreenMode() {
- // TODO(erg): An implementation here would have to check all existing
- // RootWindows instead of just recursively walking the Shell's RootWindow as
- // in the ash implementaiton.
- NOTIMPLEMENTED();
+bool CheckIfFullscreenWindowExists(aura::Window* window) {
+ if (window->GetProperty(aura::client::kShowStateKey) ==
+ ui::SHOW_STATE_FULLSCREEN)
+ return true;
+ aura::Window::Windows children = window->children();
+ for (aura::Window::Windows::const_iterator i = children.begin();
+ i != children.end();
+ ++i) {
+ if (CheckIfFullscreenWindowExists(*i))
+ return true;
+ }
return false;
}
-#endif
+} // namespace
+
+bool IsFullScreenMode() {
+ // This is used only by notification_ui_manager.cc. On aura, notification
+ // will be managed in panel. This is temporary to get certain feature running
+ // until we implement it for aura.
+ return CheckIfFullscreenWindowExists(ash::Shell::GetRootWindow());
+}