| 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/enrollment_dialog_view.h" | 5 #include "chrome/browser/chromeos/enrollment_dialog_view.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 10 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 base::string16 EnrollmentDialogView::GetWindowTitle() const { | 129 base::string16 EnrollmentDialogView::GetWindowTitle() const { |
| 130 return l10n_util::GetStringUTF16(IDS_NETWORK_ENROLLMENT_HANDLER_TITLE); | 130 return l10n_util::GetStringUTF16(IDS_NETWORK_ENROLLMENT_HANDLER_TITLE); |
| 131 } | 131 } |
| 132 | 132 |
| 133 void EnrollmentDialogView::WindowClosing() { | 133 void EnrollmentDialogView::WindowClosing() { |
| 134 if (!accepted_) | 134 if (!accepted_) |
| 135 return; | 135 return; |
| 136 chrome::NavigateParams params(profile_, GURL(target_uri_), | 136 chrome::NavigateParams params(profile_, GURL(target_uri_), |
| 137 ui::PAGE_TRANSITION_LINK); | 137 ui::PAGE_TRANSITION_LINK); |
| 138 params.disposition = NEW_FOREGROUND_TAB; | 138 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; |
| 139 params.window_action = chrome::NavigateParams::SHOW_WINDOW; | 139 params.window_action = chrome::NavigateParams::SHOW_WINDOW; |
| 140 chrome::Navigate(¶ms); | 140 chrome::Navigate(¶ms); |
| 141 } | 141 } |
| 142 | 142 |
| 143 gfx::Size EnrollmentDialogView::GetPreferredSize() const { | 143 gfx::Size EnrollmentDialogView::GetPreferredSize() const { |
| 144 return gfx::Size(kDefaultWidth, kDefaultHeight); | 144 return gfx::Size(kDefaultWidth, kDefaultHeight); |
| 145 } | 145 } |
| 146 | 146 |
| 147 void EnrollmentDialogView::InitDialog() { | 147 void EnrollmentDialogView::InitDialog() { |
| 148 added_cert_ = false; | 148 added_cert_ = false; |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 | 295 |
| 296 DialogEnrollmentDelegate* enrollment = | 296 DialogEnrollmentDelegate* enrollment = |
| 297 new DialogEnrollmentDelegate(owning_window, network->name(), profile); | 297 new DialogEnrollmentDelegate(owning_window, network->name(), profile); |
| 298 return enrollment->Enroll(cert_config.pattern.enrollment_uri_list(), | 298 return enrollment->Enroll(cert_config.pattern.enrollment_uri_list(), |
| 299 base::Bind(&EnrollmentComplete, service_path)); | 299 base::Bind(&EnrollmentComplete, service_path)); |
| 300 } | 300 } |
| 301 | 301 |
| 302 } // namespace enrollment | 302 } // namespace enrollment |
| 303 | 303 |
| 304 } // namespace chromeos | 304 } // namespace chromeos |
| OLD | NEW |