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

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

Issue 2779973003: views: fold layout_utils::CreatePanelLayout into GridLayout::CreatePanel (Closed)
Patch Set: remove old DEPS entry Created 3 years, 8 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/vpn_config_view.h" 5 #include "chrome/browser/chromeos/options/vpn_config_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "chrome/browser/chromeos/enrollment_dialog_view.h" 14 #include "chrome/browser/chromeos/enrollment_dialog_view.h"
15 #include "chrome/browser/chromeos/net/shill_error.h" 15 #include "chrome/browser/chromeos/net/shill_error.h"
16 #include "chrome/browser/profiles/profile_manager.h" 16 #include "chrome/browser/profiles/profile_manager.h"
17 #include "chrome/browser/ui/views/harmony/layout_delegate.h" 17 #include "chrome/browser/ui/views/harmony/layout_delegate.h"
18 #include "chrome/browser/ui/views/layout_utils.h"
19 #include "chrome/common/net/x509_certificate_model.h" 18 #include "chrome/common/net/x509_certificate_model.h"
20 #include "chrome/grit/generated_resources.h" 19 #include "chrome/grit/generated_resources.h"
21 #include "chromeos/login/login_state.h" 20 #include "chromeos/login/login_state.h"
22 #include "chromeos/network/network_configuration_handler.h" 21 #include "chromeos/network/network_configuration_handler.h"
23 #include "chromeos/network/network_connect.h" 22 #include "chromeos/network/network_connect.h"
24 #include "chromeos/network/network_event_log.h" 23 #include "chromeos/network/network_event_log.h"
25 #include "chromeos/network/network_state.h" 24 #include "chromeos/network/network_state.h"
26 #include "chromeos/network/network_state_handler.h" 25 #include "chromeos/network/network_state_handler.h"
27 #include "chromeos/network/network_ui_data.h" 26 #include "chromeos/network/network_ui_data.h"
28 #include "chromeos/network/onc/onc_utils.h" 27 #include "chromeos/network/onc/onc_utils.h"
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 return std::string(); 496 return std::string();
498 } 497 }
499 498
500 void VPNConfigView::Init() { 499 void VPNConfigView::Init() {
501 const NetworkState* vpn = NULL; 500 const NetworkState* vpn = NULL;
502 if (!service_path_.empty()) { 501 if (!service_path_.empty()) {
503 vpn = NetworkHandler::Get()->network_state_handler()-> 502 vpn = NetworkHandler::Get()->network_state_handler()->
504 GetNetworkState(service_path_); 503 GetNetworkState(service_path_);
505 DCHECK(vpn && vpn->type() == shill::kTypeVPN); 504 DCHECK(vpn && vpn->type() == shill::kTypeVPN);
506 } 505 }
507 layout_ = layout_utils::CreatePanelLayout(this); 506 layout_ = views::GridLayout::CreatePanel(this);
508 LayoutDelegate* delegate = LayoutDelegate::Get(); 507 LayoutDelegate* delegate = LayoutDelegate::Get();
509 508
510 // Observer any changes to the certificate list. 509 // Observer any changes to the certificate list.
511 CertLibrary::Get()->AddObserver(this); 510 CertLibrary::Get()->AddObserver(this);
512 511
513 views::ColumnSet* column_set = layout_->AddColumnSet(0); 512 views::ColumnSet* column_set = layout_->AddColumnSet(0);
514 // Label. 513 // Label.
515 column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, 514 column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1,
516 views::GridLayout::USE_PREF, 0, 0); 515 views::GridLayout::USE_PREF, 0, 0);
517 column_set->AddPaddingColumn( 516 column_set->AddPaddingColumn(
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 property_ui_data->ParseOncProperty( 1093 property_ui_data->ParseOncProperty(
1095 onc_source, 1094 onc_source,
1096 onc, 1095 onc,
1097 base::StringPrintf("%s.%s.%s", 1096 base::StringPrintf("%s.%s.%s",
1098 ::onc::network_config::kVPN, 1097 ::onc::network_config::kVPN,
1099 dict_key.c_str(), 1098 dict_key.c_str(),
1100 key.c_str())); 1099 key.c_str()));
1101 } 1100 }
1102 1101
1103 } // namespace chromeos 1102 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/DEPS ('k') | chrome/browser/chromeos/options/wifi_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698