diff options
author | stevet@chromium.org <stevet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-11 13:24:13 +0000 |
---|---|---|
committer | stevet@chromium.org <stevet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-11 13:24:13 +0000 |
commit | 7d56f819d0d4c20c9448c68c8e251e06e010376e (patch) | |
tree | 8765b1a12525c75b1e085105493c6db9509e6d74 /ash/wm/frame_painter.cc | |
parent | e92742011debdfab91e2622816aa5f91ff777177 (diff) | |
download | chromium_src-7d56f819d0d4c20c9448c68c8e251e06e010376e.zip chromium_src-7d56f819d0d4c20c9448c68c8e251e06e010376e.tar.gz chromium_src-7d56f819d0d4c20c9448c68c8e251e06e010376e.tar.bz2 |
Revert 222512 "Group WM related properties to ash::wm::WindowSet..."
> Group WM related properties to ash::wm::WindowSettings
> * Introduced Observer to observe changes to the settings.
> * renamed UserHasChangedWindowPositinoOrSize to bounds_channed_by_user
>
> BUG=272460
>
> Review URL: https://chromiumcodereview.appspot.com/23518006
REASON FOR REVERT:
- Causing compiler errors on the tree: Win Aura Builder
http://build.chromium.org/p/chromium.win/buildstatus?builder=Win%20Aura%20Builder&number=11959
TBR=oshima@chromium.org
Review URL: https://codereview.chromium.org/23478025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222522 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/frame_painter.cc')
-rw-r--r-- | ash/wm/frame_painter.cc | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/ash/wm/frame_painter.cc b/ash/wm/frame_painter.cc index 3b723f50..29865e1 100644 --- a/ash/wm/frame_painter.cc +++ b/ash/wm/frame_painter.cc @@ -12,7 +12,7 @@ #include "ash/shell.h" #include "ash/shell_window_ids.h" #include "ash/wm/property_util.h" -#include "ash/wm/window_settings.h" +#include "ash/wm/window_properties.h" #include "ash/wm/window_util.h" #include "ash/wm/workspace/frame_caption_button_container_view.h" #include "base/logging.h" // DCHECK @@ -273,7 +273,6 @@ void FramePainter::Init( // itself in OnWindowDestroying() below, or in the destructor if we go away // before the window. window_->AddObserver(this); - wm::GetWindowSettings(window_)->AddObserver(this); // Solo-window header updates are handled by the workspace controller when // this window is added to the desktop. @@ -391,9 +390,9 @@ bool FramePainter::ShouldUseMinimalHeaderStyle(Themed header_themed) const { // - If the user has installed a theme with custom images for the header. // - For windows which are not tracked by the workspace code (which are used // for tab dragging). - return (frame_->IsMaximized() || frame_->IsFullscreen()) && + return ((frame_->IsMaximized() || frame_->IsFullscreen()) && header_themed == THEMED_NO && - wm::GetWindowSettings(frame_->GetNativeWindow())->tracked_by_workspace(); + GetTrackedByWorkspace(frame_->GetNativeWindow())); } void FramePainter::PaintHeader(views::NonClientFrameView* view, @@ -618,21 +617,19 @@ void FramePainter::OnThemeChanged() { } /////////////////////////////////////////////////////////////////////////////// -// WindowSettings::jObserver overrides: -void FramePainter::OnTrackedByWorkspaceChanged(aura::Window* window, - bool old) { - // When 'TrackedByWorkspace' changes, we are going to paint the header - // differently. Schedule a paint to ensure everything is updated correctly. - if (wm::GetWindowSettings(window)->tracked_by_workspace()) - frame_->non_client_view()->SchedulePaint(); -} - -/////////////////////////////////////////////////////////////////////////////// // aura::WindowObserver overrides: void FramePainter::OnWindowPropertyChanged(aura::Window* window, const void* key, intptr_t old) { + // When 'kWindowTrackedByWorkspaceKey' changes, we are going to paint the + // header differently. Schedule a paint to ensure everything is updated + // correctly. + if (key == internal::kWindowTrackedByWorkspaceKey && + GetTrackedByWorkspace(window)) { + frame_->non_client_view()->SchedulePaint(); + } + if (key != aura::client::kShowStateKey) return; @@ -666,7 +663,6 @@ void FramePainter::OnWindowDestroying(aura::Window* destroying) { // Must be removed here and not in the destructor, as the aura::Window is // already destroyed when our destructor runs. window_->RemoveObserver(this); - wm::GetWindowSettings(window_)->RemoveObserver(this); // If we have two or more windows open and we close this one, we might trigger // the solo window appearance for another window. @@ -726,7 +722,7 @@ int FramePainter::GetHeaderCornerRadius() const { // tracked by the workspace code. (Windows which are not tracked by the // workspace code are used for tab dragging.) bool square_corners = ((frame_->IsMaximized() || frame_->IsFullscreen())) && - wm::GetWindowSettings(frame_->GetNativeWindow())->tracked_by_workspace(); + GetTrackedByWorkspace(frame_->GetNativeWindow()); const int kCornerRadius = 2; return square_corners ? 0 : kCornerRadius; } |