| OLD | NEW |
| 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/touch/touch_uma.h" | 10 #include "ash/touch/touch_uma.h" |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 switch (to_hover->icon()) { | 207 switch (to_hover->icon()) { |
| 208 case CAPTION_BUTTON_ICON_LEFT_SNAPPED: | 208 case CAPTION_BUTTON_ICON_LEFT_SNAPPED: |
| 209 snap_type_ = SNAP_LEFT; | 209 snap_type_ = SNAP_LEFT; |
| 210 break; | 210 break; |
| 211 case CAPTION_BUTTON_ICON_RIGHT_SNAPPED: | 211 case CAPTION_BUTTON_ICON_RIGHT_SNAPPED: |
| 212 snap_type_ = SNAP_RIGHT; | 212 snap_type_ = SNAP_RIGHT; |
| 213 break; | 213 break; |
| 214 case CAPTION_BUTTON_ICON_MAXIMIZE_RESTORE: | 214 case CAPTION_BUTTON_ICON_MAXIMIZE_RESTORE: |
| 215 case CAPTION_BUTTON_ICON_MINIMIZE: | 215 case CAPTION_BUTTON_ICON_MINIMIZE: |
| 216 case CAPTION_BUTTON_ICON_CLOSE: | 216 case CAPTION_BUTTON_ICON_CLOSE: |
| 217 case CAPTION_BUTTON_ICON_BACK: |
| 217 case CAPTION_BUTTON_ICON_COUNT: | 218 case CAPTION_BUTTON_ICON_COUNT: |
| 218 NOTREACHED(); | 219 NOTREACHED(); |
| 219 break; | 220 break; |
| 220 } | 221 } |
| 221 } | 222 } |
| 222 | 223 |
| 223 if (snap_type_ == SNAP_LEFT || snap_type_ == SNAP_RIGHT) { | 224 if (snap_type_ == SNAP_LEFT || snap_type_ == SNAP_RIGHT) { |
| 224 aura::Window* window = frame_->GetNativeWindow(); | 225 aura::Window* window = frame_->GetNativeWindow(); |
| 225 if (!phantom_window_controller_.get()) { | 226 if (!phantom_window_controller_.get()) { |
| 226 phantom_window_controller_.reset(new PhantomWindowController(window)); | 227 phantom_window_controller_.reset(new PhantomWindowController(window)); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 void FrameSizeButton::SetButtonsToNormalMode( | 276 void FrameSizeButton::SetButtonsToNormalMode( |
| 276 FrameSizeButtonDelegate::Animate animate) { | 277 FrameSizeButtonDelegate::Animate animate) { |
| 277 in_snap_mode_ = false; | 278 in_snap_mode_ = false; |
| 278 snap_type_ = SNAP_NONE; | 279 snap_type_ = SNAP_NONE; |
| 279 set_buttons_to_snap_mode_timer_.Stop(); | 280 set_buttons_to_snap_mode_timer_.Stop(); |
| 280 delegate_->SetButtonsToNormal(animate); | 281 delegate_->SetButtonsToNormal(animate); |
| 281 phantom_window_controller_.reset(); | 282 phantom_window_controller_.reset(); |
| 282 } | 283 } |
| 283 | 284 |
| 284 } // namespace ash | 285 } // namespace ash |
| OLD | NEW |