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

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: 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 "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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 image_view_->SetImage(color_image_); 308 image_view_->SetImage(color_image_);
309 } 309 }
310 310
311 void ControlledSettingIndicatorView::OnMouseExited( 311 void ControlledSettingIndicatorView::OnMouseExited(
312 const views::MouseEvent& event) { 312 const views::MouseEvent& event) {
313 image_view_->SetImage(gray_image_); 313 image_view_->SetImage(gray_image_);
314 } 314 }
315 315
316 void ControlledSettingIndicatorView::Init() { 316 void ControlledSettingIndicatorView::Init() {
317 color_image_ = ResourceBundle::GetSharedInstance().GetImageNamed( 317 color_image_ = ResourceBundle::GetSharedInstance().GetImageNamed(
318 IDR_CONTROLLED_SETTING_MANDATORY).ToSkBitmap(); 318 IDR_CONTROLLED_SETTING_MANDATORY).ToImageSkia();
319 gray_image_ = ResourceBundle::GetSharedInstance().GetImageNamed( 319 gray_image_ = ResourceBundle::GetSharedInstance().GetImageNamed(
320 IDR_CONTROLLED_SETTING_MANDATORY_GRAY).ToSkBitmap(); 320 IDR_CONTROLLED_SETTING_MANDATORY_GRAY).ToImageSkia();
321 image_view_ = new views::ImageView(); 321 image_view_ = new views::ImageView();
322 // Disable |image_view_| so mouse events propagate to the parent. 322 // Disable |image_view_| so mouse events propagate to the parent.
323 image_view_->SetEnabled(false); 323 image_view_->SetEnabled(false);
324 image_view_->SetImage(gray_image_); 324 image_view_->SetImage(gray_image_);
325 image_view_->SetTooltipText( 325 image_view_->SetTooltipText(
326 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY)); 326 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY));
327 AddChildView(image_view_); 327 AddChildView(image_view_);
328 } 328 }
329 329
330 } // namespace chromeos 330 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/network_config_view.h ('k') | chrome/browser/chromeos/options/wifi_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698