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

Side by Side Diff: ash/frame/caption_buttons/frame_size_button.cc

Issue 1909273003: Makes PhantonWindowController use ash/wm/common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@workspace_window_resizer
Patch Set: merge 2 trunk 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/wm/aura/wm_window_aura.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/frame/caption_buttons/frame_size_button.h" 5 #include "ash/frame/caption_buttons/frame_size_button.h"
6 6
7 #include "ash/metrics/user_metrics_recorder.h" 7 #include "ash/metrics/user_metrics_recorder.h"
8 #include "ash/screen_util.h" 8 #include "ash/screen_util.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/wm/aura/wm_window_aura.h" 10 #include "ash/wm/aura/wm_window_aura.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 case CAPTION_BUTTON_ICON_LOCATION: 216 case CAPTION_BUTTON_ICON_LOCATION:
217 case CAPTION_BUTTON_ICON_COUNT: 217 case CAPTION_BUTTON_ICON_COUNT:
218 NOTREACHED(); 218 NOTREACHED();
219 break; 219 break;
220 } 220 }
221 } 221 }
222 222
223 if (snap_type_ == SNAP_LEFT || snap_type_ == SNAP_RIGHT) { 223 if (snap_type_ == SNAP_LEFT || snap_type_ == SNAP_RIGHT) {
224 aura::Window* window = frame_->GetNativeWindow(); 224 aura::Window* window = frame_->GetNativeWindow();
225 if (!phantom_window_controller_.get()) { 225 if (!phantom_window_controller_.get()) {
226 phantom_window_controller_.reset(new PhantomWindowController(window)); 226 phantom_window_controller_.reset(
227 new PhantomWindowController(wm::WmWindowAura::Get(window)));
227 } 228 }
228 gfx::Rect phantom_bounds_in_parent = 229 gfx::Rect phantom_bounds_in_parent =
229 (snap_type_ == SNAP_LEFT) 230 (snap_type_ == SNAP_LEFT)
230 ? wm::GetDefaultLeftSnappedWindowBoundsInParent( 231 ? wm::GetDefaultLeftSnappedWindowBoundsInParent(
231 wm::WmWindowAura::Get(window)) 232 wm::WmWindowAura::Get(window))
232 : wm::GetDefaultRightSnappedWindowBoundsInParent( 233 : wm::GetDefaultRightSnappedWindowBoundsInParent(
233 wm::WmWindowAura::Get(window)); 234 wm::WmWindowAura::Get(window));
234 phantom_window_controller_->Show(ScreenUtil::ConvertRectToScreen( 235 phantom_window_controller_->Show(ScreenUtil::ConvertRectToScreen(
235 window->parent(), phantom_bounds_in_parent)); 236 window->parent(), phantom_bounds_in_parent));
236 } else { 237 } else {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 void FrameSizeButton::SetButtonsToNormalMode( 279 void FrameSizeButton::SetButtonsToNormalMode(
279 FrameSizeButtonDelegate::Animate animate) { 280 FrameSizeButtonDelegate::Animate animate) {
280 in_snap_mode_ = false; 281 in_snap_mode_ = false;
281 snap_type_ = SNAP_NONE; 282 snap_type_ = SNAP_NONE;
282 set_buttons_to_snap_mode_timer_.Stop(); 283 set_buttons_to_snap_mode_timer_.Stop();
283 delegate_->SetButtonsToNormal(animate); 284 delegate_->SetButtonsToNormal(animate);
284 phantom_window_controller_.reset(); 285 phantom_window_controller_.reset();
285 } 286 }
286 287
287 } // namespace ash 288 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/aura/wm_window_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698