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

Side by Side Diff: chrome/browser/chromeos/login/take_photo_view.cc

Issue 8909002: views: Convert IsEnabled() to just enabled() since it's just a simple accessor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/login/take_photo_view.h" 5 #include "chrome/browser/chromeos/login/take_photo_view.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/chromeos/login/helper.h" 8 #include "chrome/browser/chromeos/login/helper.h"
9 #include "grit/generated_resources.h" 9 #include "grit/generated_resources.h"
10 #include "grit/theme_resources.h" 10 #include "grit/theme_resources.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 layout->StartRowWithPadding(0, kImageRow, 0, kVerticalPadding); 217 layout->StartRowWithPadding(0, kImageRow, 0, kVerticalPadding);
218 layout->AddView(user_image_); 218 layout->AddView(user_image_);
219 layout->StartRowWithPadding(1, kImageRow, 0, kVerticalPadding); 219 layout->StartRowWithPadding(1, kImageRow, 0, kVerticalPadding);
220 layout->AddView(snapshot_button_); 220 layout->AddView(snapshot_button_);
221 } 221 }
222 222
223 void TakePhotoView::UpdateVideoFrame(const SkBitmap& frame) { 223 void TakePhotoView::UpdateVideoFrame(const SkBitmap& frame) {
224 if (!is_capturing_) 224 if (!is_capturing_)
225 return; 225 return;
226 226
227 if (!snapshot_button_->IsEnabled()) { 227 if (!snapshot_button_->enabled()) {
228 user_image_->SetNormalState(); 228 user_image_->SetNormalState();
229 snapshot_button_->SetEnabled(true); 229 snapshot_button_->SetEnabled(true);
230 snapshot_button_->RequestFocus(); 230 snapshot_button_->RequestFocus();
231 } 231 }
232 SkBitmap user_image = 232 SkBitmap user_image =
233 skia::ImageOperations::Resize( 233 skia::ImageOperations::Resize(
234 frame, 234 frame,
235 skia::ImageOperations::RESIZE_BOX, 235 skia::ImageOperations::RESIZE_BOX,
236 login::kUserImageSize, 236 login::kUserImageSize,
237 login::kUserImageSize); 237 login::kUserImageSize);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 snapshot_button_->SetImage( 301 snapshot_button_->SetImage(
302 views::CustomButton::BS_NORMAL, 302 views::CustomButton::BS_NORMAL,
303 ResourceBundle::GetSharedInstance().GetBitmapNamed( 303 ResourceBundle::GetSharedInstance().GetBitmapNamed(
304 IDR_USER_IMAGE_CAPTURE)); 304 IDR_USER_IMAGE_CAPTURE));
305 delegate_->OnCapturingStarted(); 305 delegate_->OnCapturingStarted();
306 snapshot_button_->SchedulePaint(); 306 snapshot_button_->SchedulePaint();
307 } 307 }
308 } 308 }
309 309
310 } // namespace chromeos 310 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/shutdown_button.cc ('k') | chrome/browser/chromeos/login/username_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698