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

Unified Diff: chrome/browser/ui/views/frame/browser_frame_aura.cc

Issue 9630002: Ash: Remove compact window mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OpaqueBrowserFrameView, MultipleWindowIndicatorButton 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
Index: chrome/browser/ui/views/frame/browser_frame_aura.cc
diff --git a/chrome/browser/ui/views/frame/browser_frame_aura.cc b/chrome/browser/ui/views/frame/browser_frame_aura.cc
index 1f7a604c53e0e95fa9d20ec3eb768abb5de367f3..b6a206206bb08bd11420107cc93ee005812ce6b3 100644
--- a/chrome/browser/ui/views/frame/browser_frame_aura.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_aura.cc
@@ -4,77 +4,11 @@
#include "chrome/browser/ui/views/frame/browser_frame_aura.h"
-#include "ash/ash_switches.h"
-#include "ash/shell.h"
-#include "base/command_line.h"
-#include "chrome/browser/chromeos/status/status_area_view.h"
-#include "chrome/browser/ui/views/ash/chrome_shell_delegate.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/window.h"
#include "ui/aura/window_observer.h"
#include "ui/gfx/font.h"
-#include "ui/views/background.h"
-
-namespace {
-
-////////////////////////////////////////////////////////////////////////////////
-// StatusAreaBoundsWatcher
-
-class StatusAreaBoundsWatcher : public aura::WindowObserver {
- public:
- explicit StatusAreaBoundsWatcher(BrowserFrame* frame)
- : frame_(frame),
- status_area_window_(NULL) {
- StartWatch();
- }
-
- virtual ~StatusAreaBoundsWatcher() {
- StopWatch();
- }
-
- private:
- void StartWatch() {
- DCHECK(ChromeShellDelegate::instance());
-
- StatusAreaView* status_area =
- ChromeShellDelegate::instance()->GetStatusArea();
- if (!status_area)
- return;
-
- StopWatch();
- status_area_window_ = status_area->GetWidget()->GetNativeWindow();
- status_area_window_->AddObserver(this);
- }
-
- void StopWatch() {
- if (status_area_window_) {
- status_area_window_->RemoveObserver(this);
- status_area_window_ = NULL;
- }
- }
-
- // Overridden from aura::WindowObserver:
- virtual void OnWindowBoundsChanged(aura::Window* window,
- const gfx::Rect& bounds) OVERRIDE {
- DCHECK(window == status_area_window_);
-
- // Triggers frame layout when the bounds of status area changed.
- frame_->TabStripDisplayModeChanged();
- }
-
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE {
- DCHECK(window == status_area_window_);
- status_area_window_ = NULL;
- }
-
- BrowserFrame* frame_;
- aura::Window* status_area_window_;
-
- DISALLOW_COPY_AND_ASSIGN(StatusAreaBoundsWatcher);
-};
-
-} // namespace
////////////////////////////////////////////////////////////////////////////////
// BrowserFrameAura::WindowPropertyWatcher
@@ -105,20 +39,11 @@ class BrowserFrameAura::WindowPropertyWatcher : public aura::WindowObserver {
// to force a layout on show state changes. crbug.com/108073
if (browser_frame_->non_client_view())
browser_frame_->non_client_view()->Layout();
-
- // Watch for status area bounds change for maximized browser window in Aura
- // compact mode.
- if (ash::Shell::GetInstance()->IsWindowModeCompact() &&
- browser_frame_aura_->IsMaximized())
- status_area_watcher_.reset(new StatusAreaBoundsWatcher(browser_frame_));
- else
- status_area_watcher_.reset();
}
private:
BrowserFrameAura* browser_frame_aura_;
BrowserFrame* browser_frame_;
- scoped_ptr<StatusAreaBoundsWatcher> status_area_watcher_;
DISALLOW_COPY_AND_ASSIGN(WindowPropertyWatcher);
};

Powered by Google App Engine
This is Rietveld 408576698