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

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

Issue 1227223004: Switch controlled settings indicators to inlined SVGs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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
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 "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 gfx::Size ControlledSettingIndicatorView::GetPreferredSize() const { 342 gfx::Size ControlledSettingIndicatorView::GetPreferredSize() const {
343 return (managed_ && visible()) ? image_view_->GetPreferredSize() 343 return (managed_ && visible()) ? image_view_->GetPreferredSize()
344 : gfx::Size(); 344 : gfx::Size();
345 } 345 }
346 346
347 void ControlledSettingIndicatorView::Layout() { 347 void ControlledSettingIndicatorView::Layout() {
348 image_view_->SetBounds(0, 0, width(), height()); 348 image_view_->SetBounds(0, 0, width(), height());
349 } 349 }
350 350
351 void ControlledSettingIndicatorView::Init() { 351 void ControlledSettingIndicatorView::Init() {
352 image_ = ResourceBundle::GetSharedInstance().GetImageNamed( 352 image_ = ResourceBundle::GetSharedInstance()
353 IDR_CONTROLLED_SETTING_MANDATORY).ToImageSkia(); 353 .GetImageNamed(IDR_OMNIBOX_HTTPS_POLICY_WARNING)
354 .ToImageSkia();
354 image_view_ = new views::ImageView(); 355 image_view_ = new views::ImageView();
355 // Disable |image_view_| so mouse events propagate to the parent. 356 // Disable |image_view_| so mouse events propagate to the parent.
356 image_view_->SetEnabled(false); 357 image_view_->SetEnabled(false);
357 image_view_->SetImage(image_); 358 image_view_->SetImage(image_);
358 image_view_->SetTooltipText( 359 image_view_->SetTooltipText(
359 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY)); 360 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY));
360 AddChildView(image_view_); 361 AddChildView(image_view_);
361 } 362 }
362 363
363 } // namespace chromeos 364 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | chrome/browser/extensions/extension_context_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698