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

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

Issue 2881683002: Log the creation of several more dialog box types. (Closed)
Patch Set: Fix alphabetization errors. Created 3 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
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/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"
11 #include "chrome/browser/chromeos/login/ui/login_display_host.h" 11 #include "chrome/browser/chromeos/login/ui/login_display_host.h"
12 #include "chrome/browser/chromeos/options/network_property_ui_data.h" 12 #include "chrome/browser/chromeos/options/network_property_ui_data.h"
13 #include "chrome/browser/chromeos/options/vpn_config_view.h" 13 #include "chrome/browser/chromeos/options/vpn_config_view.h"
14 #include "chrome/browser/chromeos/options/wifi_config_view.h" 14 #include "chrome/browser/chromeos/options/wifi_config_view.h"
15 #include "chrome/browser/chromeos/options/wimax_config_view.h" 15 #include "chrome/browser/chromeos/options/wimax_config_view.h"
16 #include "chrome/browser/profiles/profile_manager.h" 16 #include "chrome/browser/profiles/profile_manager.h"
17 #include "chrome/browser/ui/ash/ash_util.h" 17 #include "chrome/browser/ui/ash/ash_util.h"
18 #include "chrome/browser/ui/ash/system_tray_client.h" 18 #include "chrome/browser/ui/ash/system_tray_client.h"
19 #include "chrome/browser/ui/browser.h" 19 #include "chrome/browser/ui/browser.h"
20 #include "chrome/browser/ui/browser_dialogs.h"
20 #include "chrome/browser/ui/browser_finder.h" 21 #include "chrome/browser/ui/browser_finder.h"
21 #include "chrome/browser/ui/browser_window.h" 22 #include "chrome/browser/ui/browser_window.h"
22 #include "chrome/grit/generated_resources.h" 23 #include "chrome/grit/generated_resources.h"
23 #include "chrome/grit/locale_settings.h" 24 #include "chrome/grit/locale_settings.h"
24 #include "chromeos/login/login_state.h" 25 #include "chromeos/login/login_state.h"
25 #include "chromeos/network/network_state.h" 26 #include "chromeos/network/network_state.h"
26 #include "chromeos/network/network_state_handler.h" 27 #include "chromeos/network/network_state_handler.h"
27 #include "components/device_event_log/device_event_log.h" 28 #include "components/device_event_log/device_event_log.h"
28 #include "components/user_manager/user.h" 29 #include "components/user_manager/user.h"
29 #include "ui/accessibility/ax_node_data.h" 30 #include "ui/accessibility/ax_node_data.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // static 72 // static
72 const int ChildNetworkConfigView::kInputFieldMinWidth = 270; 73 const int ChildNetworkConfigView::kInputFieldMinWidth = 270;
73 const int ChildNetworkConfigView::kInputFieldHeight = 28; 74 const int ChildNetworkConfigView::kInputFieldHeight = 28;
74 75
75 NetworkConfigView::NetworkConfigView() 76 NetworkConfigView::NetworkConfigView()
76 : child_config_view_(nullptr), 77 : child_config_view_(nullptr),
77 delegate_(nullptr), 78 delegate_(nullptr),
78 advanced_button_(nullptr) { 79 advanced_button_(nullptr) {
79 DCHECK(!g_instance); 80 DCHECK(!g_instance);
80 g_instance = this; 81 g_instance = this;
82 chrome::RecordDialogCreation(chrome::DialogIdentifier::NETWORK_CONFIG);
81 } 83 }
82 84
83 bool NetworkConfigView::InitWithNetworkState(const NetworkState* network) { 85 bool NetworkConfigView::InitWithNetworkState(const NetworkState* network) {
84 DCHECK(network); 86 DCHECK(network);
85 std::string service_path = network->path(); 87 std::string service_path = network->path();
86 if (network->type() == shill::kTypeWifi || 88 if (network->type() == shill::kTypeWifi ||
87 network->type() == shill::kTypeEthernet) { 89 network->type() == shill::kTypeEthernet) {
88 child_config_view_ = new WifiConfigView(this, service_path, false); 90 child_config_view_ = new WifiConfigView(this, service_path, false);
89 } else if (network->type() == shill::kTypeWimax) { 91 } else if (network->type() == shill::kTypeWimax) {
90 child_config_view_ = new WimaxConfigView(this, service_path); 92 child_config_view_ = new WimaxConfigView(this, service_path);
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 } 338 }
337 339
338 ControlledSettingIndicatorView::~ControlledSettingIndicatorView() {} 340 ControlledSettingIndicatorView::~ControlledSettingIndicatorView() {}
339 341
340 gfx::Size ControlledSettingIndicatorView::GetPreferredSize() const { 342 gfx::Size ControlledSettingIndicatorView::GetPreferredSize() const {
341 return (managed_ && visible()) ? image_view_->GetPreferredSize() 343 return (managed_ && visible()) ? image_view_->GetPreferredSize()
342 : gfx::Size(); 344 : gfx::Size();
343 } 345 }
344 346
345 } // namespace chromeos 347 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/external_protocol_dialog.cc ('k') | chrome/browser/chromeos/power/idle_action_warning_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698