OLD | NEW |
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 Loading... |
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 |
OLD | NEW |