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

Unified Diff: ash/frame/custom_frame_view_ash.cc

Issue 2908333003: [mus+ash] Removes WmWindow from ash (app_list, frame, metrics, session, system, wallpaper) (Closed)
Patch Set: [mus+ash] Removes WmWindow from ash (cleaning remaining wm_window.h in c/b/ui) Created 3 years, 7 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: 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 a236c1293ad2e40bca8f621cb3b81319836fccc6..0fa514dce6831aed97e1e991f62438a9d6f0c3df 100644
--- a/ash/frame/custom_frame_view_ash.cc
+++ b/ash/frame/custom_frame_view_ash.cc
@@ -13,10 +13,10 @@
#include "ash/shared/immersive_fullscreen_controller.h"
#include "ash/shared/immersive_fullscreen_controller_delegate.h"
#include "ash/shell_port.h"
+#include "ash/wm/resize_handle_window_targeter.h"
#include "ash/wm/window_state.h"
#include "ash/wm/window_state_delegate.h"
#include "ash/wm/window_state_observer.h"
-#include "ash/wm_window.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/window.h"
#include "ui/aura/window_observer.h"
@@ -214,17 +214,18 @@ CustomFrameViewAsh::CustomFrameViewAsh(
overlay_view_(new OverlayView(header_view_)),
immersive_delegate_(immersive_delegate ? immersive_delegate
: header_view_) {
- WmWindow* frame_window = WmWindow::Get(frame->GetNativeWindow());
- frame_window->InstallResizeHandleWindowTargeter(nullptr);
+ aura::Window* frame_window = frame->GetNativeWindow();
+ frame_window->SetEventTargeter(
+ base::MakeUnique<ResizeHandleWindowTargeter>(frame_window, nullptr));
// |header_view_| is set as the non client view's overlay view so that it can
// overlay the web contents in immersive fullscreen.
frame->non_client_view()->SetOverlayView(overlay_view_);
- frame_window->aura_window()->SetProperty(
- aura::client::kTopViewColor, header_view_->GetInactiveFrameColor());
+ frame_window->SetProperty(aura::client::kTopViewColor,
+ header_view_->GetInactiveFrameColor());
// A delegate for a more complex way of fullscreening the window may already
// be set. This is the case for packaged apps.
- wm::WindowState* window_state = frame_window->GetWindowState();
+ wm::WindowState* window_state = wm::GetWindowState(frame_window);
if (!window_state->HasDelegate()) {
window_state->SetDelegate(std::unique_ptr<wm::WindowStateDelegate>(
new CustomFrameViewAshWindowStateDelegate(window_state, this,
@@ -243,9 +244,9 @@ void CustomFrameViewAsh::InitImmersiveFullscreenControllerForView(
void CustomFrameViewAsh::SetFrameColors(SkColor active_frame_color,
SkColor inactive_frame_color) {
header_view_->SetFrameColors(active_frame_color, inactive_frame_color);
- WmWindow* frame_window = WmWindow::Get(frame_->GetNativeWindow());
- frame_window->aura_window()->SetProperty(
- aura::client::kTopViewColor, header_view_->GetInactiveFrameColor());
+ aura::Window* frame_window = frame_->GetNativeWindow();
+ frame_window->SetProperty(aura::client::kTopViewColor,
+ header_view_->GetInactiveFrameColor());
}
void CustomFrameViewAsh::SetHeaderHeight(base::Optional<int> height) {
@@ -314,9 +315,9 @@ gfx::Size CustomFrameViewAsh::CalculatePreferredSize() const {
void CustomFrameViewAsh::Layout() {
views::NonClientFrameView::Layout();
- WmWindow* frame_window = WmWindow::Get(frame_->GetNativeWindow());
- frame_window->aura_window()->SetProperty(aura::client::kTopViewInset,
- NonClientTopBorderHeight());
+ aura::Window* frame_window = frame_->GetNativeWindow();
+ frame_window->SetProperty(aura::client::kTopViewInset,
+ NonClientTopBorderHeight());
}
const char* CustomFrameViewAsh::GetClassName() const {

Powered by Google App Engine
This is Rietveld 408576698