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

Side by Side Diff: ash/wm/workspace/frame_maximize_button.cc

Issue 10437006: Converts ui/views/controls, ui/views/examples, ui/base/models to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } else { 168 } else {
169 ImageButton::OnMouseReleased(event); 169 ImageButton::OnMouseReleased(event);
170 } 170 }
171 } 171 }
172 172
173 void FrameMaximizeButton::OnMouseCaptureLost() { 173 void FrameMaximizeButton::OnMouseCaptureLost() {
174 Cancel(); 174 Cancel();
175 ImageButton::OnMouseCaptureLost(); 175 ImageButton::OnMouseCaptureLost();
176 } 176 }
177 177
178 SkBitmap FrameMaximizeButton::GetImageToPaint() { 178 gfx::ImageSkia FrameMaximizeButton::GetImageToPaint() {
179 if (is_snap_enabled_) { 179 if (is_snap_enabled_) {
180 int id = 0; 180 int id = 0;
181 if (frame_->GetWidget()->IsMaximized()) { 181 if (frame_->GetWidget()->IsMaximized()) {
182 switch (snap_type_) { 182 switch (snap_type_) {
183 case SNAP_LEFT: 183 case SNAP_LEFT:
184 id = IDR_AURA_WINDOW_MAXIMIZED_SNAP_LEFT_P; 184 id = IDR_AURA_WINDOW_MAXIMIZED_SNAP_LEFT_P;
185 break; 185 break;
186 case SNAP_RIGHT: 186 case SNAP_RIGHT:
187 id = IDR_AURA_WINDOW_MAXIMIZED_SNAP_RIGHT_P; 187 id = IDR_AURA_WINDOW_MAXIMIZED_SNAP_RIGHT_P;
188 break; 188 break;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 break; 358 break;
359 case SNAP_RESTORE: 359 case SNAP_RESTORE:
360 frame_->GetWidget()->Restore(); 360 frame_->GetWidget()->Restore();
361 break; 361 break;
362 case SNAP_NONE: 362 case SNAP_NONE:
363 NOTREACHED(); 363 NOTREACHED();
364 } 364 }
365 } 365 }
366 366
367 } // namespace ash 367 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698