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

Side by Side Diff: chrome/browser/chromeos/options/network_config_view.cc

Issue 10382144: Change SetImage, SetBackground, and SetToggledImage to take in a gfx::ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 "chrome/browser/chromeos/options/network_config_view.h" 5 #include "chrome/browser/chromeos/options/network_config_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 image_view_->SetImage(color_image_); 233 image_view_->SetImage(color_image_);
234 } 234 }
235 235
236 void ControlledSettingIndicatorView::OnMouseExited( 236 void ControlledSettingIndicatorView::OnMouseExited(
237 const views::MouseEvent& event) { 237 const views::MouseEvent& event) {
238 image_view_->SetImage(gray_image_); 238 image_view_->SetImage(gray_image_);
239 } 239 }
240 240
241 void ControlledSettingIndicatorView::Init() { 241 void ControlledSettingIndicatorView::Init() {
242 color_image_ = ResourceBundle::GetSharedInstance().GetImageNamed( 242 color_image_ = ResourceBundle::GetSharedInstance().GetImageNamed(
243 IDR_CONTROLLED_SETTING_MANDATORY).ToSkBitmap(); 243 IDR_CONTROLLED_SETTING_MANDATORY).ToImageSkia();
244 gray_image_ = ResourceBundle::GetSharedInstance().GetImageNamed( 244 gray_image_ = ResourceBundle::GetSharedInstance().GetImageNamed(
245 IDR_CONTROLLED_SETTING_MANDATORY_GRAY).ToSkBitmap(); 245 IDR_CONTROLLED_SETTING_MANDATORY_GRAY).ToImageSkia();
246 image_view_ = new views::ImageView(); 246 image_view_ = new views::ImageView();
247 // Disable |image_view_| so mouse events propagate to the parent. 247 // Disable |image_view_| so mouse events propagate to the parent.
248 image_view_->SetEnabled(false); 248 image_view_->SetEnabled(false);
249 image_view_->SetImage(gray_image_); 249 image_view_->SetImage(gray_image_);
250 image_view_->SetTooltipText( 250 image_view_->SetTooltipText(
251 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY)); 251 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY));
252 AddChildView(image_view_); 252 AddChildView(image_view_);
253 } 253 }
254 254
255 } // namespace chromeos 255 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698