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

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

Issue 224113005: Eliminate ash::internal namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/alternate_frame_size_button.h" 5 #include "ash/frame/caption_buttons/alternate_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/touch/touch_uma.h" 10 #include "ash/touch/touch_uma.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 case CAPTION_BUTTON_ICON_CLOSE: 216 case CAPTION_BUTTON_ICON_CLOSE:
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( 226 phantom_window_controller_.reset(new PhantomWindowController(window));
227 new internal::PhantomWindowController(window));
228 } 227 }
229 gfx::Rect phantom_bounds_in_parent = (snap_type_ == SNAP_LEFT) ? 228 gfx::Rect phantom_bounds_in_parent = (snap_type_ == SNAP_LEFT) ?
230 wm::GetDefaultLeftSnappedWindowBoundsInParent(window) : 229 wm::GetDefaultLeftSnappedWindowBoundsInParent(window) :
231 wm::GetDefaultRightSnappedWindowBoundsInParent(window); 230 wm::GetDefaultRightSnappedWindowBoundsInParent(window);
232 phantom_window_controller_->Show(ScreenUtil::ConvertRectToScreen( 231 phantom_window_controller_->Show(ScreenUtil::ConvertRectToScreen(
233 window->parent(), phantom_bounds_in_parent)); 232 window->parent(), phantom_bounds_in_parent));
234 } else { 233 } else {
235 phantom_window_controller_.reset(); 234 phantom_window_controller_.reset();
236 } 235 }
237 } 236 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 void AlternateFrameSizeButton::SetButtonsToNormalMode( 275 void AlternateFrameSizeButton::SetButtonsToNormalMode(
277 AlternateFrameSizeButtonDelegate::Animate animate) { 276 AlternateFrameSizeButtonDelegate::Animate animate) {
278 in_snap_mode_ = false; 277 in_snap_mode_ = false;
279 snap_type_ = SNAP_NONE; 278 snap_type_ = SNAP_NONE;
280 set_buttons_to_snap_mode_timer_.Stop(); 279 set_buttons_to_snap_mode_timer_.Stop();
281 delegate_->SetButtonsToNormal(animate); 280 delegate_->SetButtonsToNormal(animate);
282 phantom_window_controller_.reset(); 281 phantom_window_controller_.reset();
283 } 282 }
284 283
285 } // namespace ash 284 } // namespace ash
OLDNEW
« no previous file with comments | « ash/frame/caption_buttons/alternate_frame_size_button.h ('k') | ash/frame/caption_buttons/frame_maximize_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698