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

Unified Diff: ash/frame/custom_frame_view_ash.cc

Issue 1921883002: Removes WindowState::aura_window() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix windows build Created 4 years, 8 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/accelerators/accelerator_controller_unittest.cc ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/frame/custom_frame_view_ash.cc
diff --git a/ash/frame/custom_frame_view_ash.cc b/ash/frame/custom_frame_view_ash.cc
index eebc44354de982eb080f8da403c7eb4330c26c44..aa930da2f4b8cc9b94d3eab738ad83f5136f1a4d 100644
--- a/ash/frame/custom_frame_view_ash.cc
+++ b/ash/frame/custom_frame_view_ash.cc
@@ -15,6 +15,7 @@
#include "ash/session/session_state_delegate.h"
#include "ash/shell.h"
#include "ash/shell_observer.h"
+#include "ash/wm/aura/wm_window_aura.h"
#include "ash/wm/immersive_fullscreen_controller.h"
#include "ash/wm/window_state.h"
#include "ash/wm/window_state_aura.h"
@@ -64,21 +65,25 @@ class CustomFrameViewAshWindowStateDelegate
// TODO(pkotwicz): This is a hack. Remove ASAP. http://crbug.com/319048
window_state_ = window_state;
window_state_->AddObserver(this);
- window_state_->aura_window()->AddObserver(this);
+ GetAuraWindow()->AddObserver(this);
}
~CustomFrameViewAshWindowStateDelegate() override {
if (window_state_) {
window_state_->RemoveObserver(this);
- window_state_->aura_window()->RemoveObserver(this);
+ GetAuraWindow()->RemoveObserver(this);
}
}
private:
+ aura::Window* GetAuraWindow() {
+ return ash::wm::WmWindowAura::GetAuraWindow(window_state_->window());
+ }
+
// Overridden from ash::wm::WindowStateDelegate:
bool ToggleFullscreen(ash::wm::WindowState* window_state) override {
bool enter_fullscreen = !window_state->IsFullscreen();
if (enter_fullscreen) {
- window_state->aura_window()->SetProperty(aura::client::kShowStateKey,
- ui::SHOW_STATE_FULLSCREEN);
+ GetAuraWindow()->SetProperty(aura::client::kShowStateKey,
+ ui::SHOW_STATE_FULLSCREEN);
} else {
window_state->Restore();
}
@@ -92,7 +97,7 @@ class CustomFrameViewAshWindowStateDelegate
// Overridden from aura::WindowObserver:
void OnWindowDestroying(aura::Window* window) override {
window_state_->RemoveObserver(this);
- window_state_->aura_window()->RemoveObserver(this);
+ GetAuraWindow()->RemoveObserver(this);
window_state_ = NULL;
}
// Overridden from ash::wm::WindowStateObserver:
« no previous file with comments | « ash/accelerators/accelerator_controller_unittest.cc ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698