diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-18 20:32:14 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-18 20:32:14 +0000 |
commit | 1422809c9c890fb145978b73d3ace532ee31c521 (patch) | |
tree | ebe9893baeac2532ade814c5e504a71c045a32da /chrome/browser/fullscreen_ash.cc | |
parent | ab6697bbd446c43094ea3593f857e7c3f3c9327f (diff) | |
download | chromium_src-1422809c9c890fb145978b73d3ace532ee31c521.zip chromium_src-1422809c9c890fb145978b73d3ace532ee31c521.tar.gz chromium_src-1422809c9c890fb145978b73d3ace532ee31c521.tar.bz2 |
Aura/ash split: Remove hacks and get chrome linking without ash.
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
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132856 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/fullscreen_ash.cc')
-rw-r--r-- | chrome/browser/fullscreen_ash.cc | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/chrome/browser/fullscreen_ash.cc b/chrome/browser/fullscreen_ash.cc new file mode 100644 index 0000000..08b1419 --- /dev/null +++ b/chrome/browser/fullscreen_ash.cc @@ -0,0 +1,37 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#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" + +namespace { + +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; +} + +} // 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()); +} |