OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/wm/workspace/frame_maximize_button.h" | 5 #include "ash/wm/workspace/frame_maximize_button.h" |
6 | 6 |
7 #include "ash/screen_ash.h" | 7 #include "ash/screen_ash.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/wm/property_util.h" | 9 #include "ash/wm/property_util.h" |
10 #include "ash/launcher/launcher.h" | 10 #include "ash/launcher/launcher.h" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 id = IDR_AURA_WINDOW_MAXIMIZED_SNAP_P; | 206 id = IDR_AURA_WINDOW_MAXIMIZED_SNAP_P; |
207 break; | 207 break; |
208 case SNAP_MINIMIZE: | 208 case SNAP_MINIMIZE: |
209 id = IDR_AURA_WINDOW_MAXIMIZED_SNAP_MINIMIZE_P; | 209 id = IDR_AURA_WINDOW_MAXIMIZED_SNAP_MINIMIZE_P; |
210 break; | 210 break; |
211 default: | 211 default: |
212 NOTREACHED(); | 212 NOTREACHED(); |
213 } | 213 } |
214 } | 214 } |
215 return *ResourceBundle::GetSharedInstance().GetImageNamed(id).ToSkBitmap(); | 215 return *ResourceBundle::GetSharedInstance().GetImageNamed(id).ToSkBitmap(); |
| 216 } else if (state() == BS_HOT) { |
| 217 return *ResourceBundle::GetSharedInstance().GetImageNamed( |
| 218 IDR_AURA_WINDOW_MAXIMIZED_RESTORE_SNAP_P).ToSkBitmap(); |
216 } | 219 } |
217 return ImageButton::GetImageToPaint(); | 220 return ImageButton::GetImageToPaint(); |
218 } | 221 } |
219 | 222 |
220 void FrameMaximizeButton::Cancel() { | 223 void FrameMaximizeButton::Cancel() { |
221 UninstallEventFilter(); | 224 UninstallEventFilter(); |
222 is_snap_enabled_ = false; | 225 is_snap_enabled_ = false; |
223 phantom_window_.reset(); | 226 phantom_window_.reset(); |
224 snap_sizer_.reset(); | 227 snap_sizer_.reset(); |
225 SchedulePaint(); | 228 SchedulePaint(); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 break; | 343 break; |
341 case SNAP_MINIMIZE: | 344 case SNAP_MINIMIZE: |
342 frame_->GetWidget()->Minimize(); | 345 frame_->GetWidget()->Minimize(); |
343 break; | 346 break; |
344 default: | 347 default: |
345 NOTREACHED(); | 348 NOTREACHED(); |
346 } | 349 } |
347 } | 350 } |
348 | 351 |
349 } // namespace ash | 352 } // namespace ash |
OLD | NEW |