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 "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "components/device_event_log/device_event_log.h" | 27 #include "components/device_event_log/device_event_log.h" |
28 #include "components/user_manager/user.h" | 28 #include "components/user_manager/user.h" |
29 #include "ui/accessibility/ax_node_data.h" | 29 #include "ui/accessibility/ax_node_data.h" |
30 #include "ui/aura/window_event_dispatcher.h" | 30 #include "ui/aura/window_event_dispatcher.h" |
31 #include "ui/base/l10n/l10n_util.h" | 31 #include "ui/base/l10n/l10n_util.h" |
32 #include "ui/base/material_design/material_design_controller.h" | 32 #include "ui/base/material_design/material_design_controller.h" |
33 #include "ui/gfx/color_palette.h" | 33 #include "ui/gfx/color_palette.h" |
34 #include "ui/gfx/geometry/rect.h" | 34 #include "ui/gfx/geometry/rect.h" |
35 #include "ui/gfx/image/image.h" | 35 #include "ui/gfx/image/image.h" |
36 #include "ui/gfx/paint_vector_icon.h" | 36 #include "ui/gfx/paint_vector_icon.h" |
37 #include "ui/gfx/vector_icons_public.h" | 37 #include "ui/vector_icons/vector_icons.h" |
38 #include "ui/views/controls/button/md_text_button.h" | 38 #include "ui/views/controls/button/md_text_button.h" |
39 #include "ui/views/controls/image_view.h" | 39 #include "ui/views/controls/image_view.h" |
40 #include "ui/views/layout/fill_layout.h" | 40 #include "ui/views/layout/fill_layout.h" |
41 #include "ui/views/layout/layout_constants.h" | 41 #include "ui/views/layout/layout_constants.h" |
42 #include "ui/views/widget/widget.h" | 42 #include "ui/views/widget/widget.h" |
43 | 43 |
44 using views::Widget; | 44 using views::Widget; |
45 | 45 |
46 namespace chromeos { | 46 namespace chromeos { |
47 | 47 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 } | 320 } |
321 | 321 |
322 // ControlledSettingIndicatorView | 322 // ControlledSettingIndicatorView |
323 | 323 |
324 ControlledSettingIndicatorView::ControlledSettingIndicatorView( | 324 ControlledSettingIndicatorView::ControlledSettingIndicatorView( |
325 const NetworkPropertyUIData& ui_data) | 325 const NetworkPropertyUIData& ui_data) |
326 : managed_(ui_data.IsManaged()), image_view_(nullptr) { | 326 : managed_(ui_data.IsManaged()), image_view_(nullptr) { |
327 image_view_ = new views::ImageView(); | 327 image_view_ = new views::ImageView(); |
328 // Disable |image_view_| so mouse events propagate to the parent. | 328 // Disable |image_view_| so mouse events propagate to the parent. |
329 image_view_->SetEnabled(false); | 329 image_view_->SetEnabled(false); |
330 image_view_->SetImage(gfx::CreateVectorIcon(gfx::VectorIconId::BUSINESS, 16, | 330 image_view_->SetImage( |
331 gfx::kChromeIconGrey)); | 331 gfx::CreateVectorIcon(ui::kBusinessIcon, 16, gfx::kChromeIconGrey)); |
332 image_view_->SetTooltipText( | 332 image_view_->SetTooltipText( |
333 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY)); | 333 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY)); |
334 AddChildView(image_view_); | 334 AddChildView(image_view_); |
335 SetLayoutManager(new views::FillLayout()); | 335 SetLayoutManager(new views::FillLayout()); |
336 } | 336 } |
337 | 337 |
338 ControlledSettingIndicatorView::~ControlledSettingIndicatorView() {} | 338 ControlledSettingIndicatorView::~ControlledSettingIndicatorView() {} |
339 | 339 |
340 gfx::Size ControlledSettingIndicatorView::GetPreferredSize() const { | 340 gfx::Size ControlledSettingIndicatorView::GetPreferredSize() const { |
341 return (managed_ && visible()) ? image_view_->GetPreferredSize() | 341 return (managed_ && visible()) ? image_view_->GetPreferredSize() |
342 : gfx::Size(); | 342 : gfx::Size(); |
343 } | 343 } |
344 | 344 |
345 } // namespace chromeos | 345 } // namespace chromeos |
OLD | NEW |