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

Side by Side Diff: chrome/browser/chromeos/enrollment_dialog_view.cc

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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/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/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/chromeos/profiles/profile_helper.h" 9 #include "chrome/browser/chromeos/profiles/profile_helper.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/profiles/profile_manager.h" 11 #include "chrome/browser/profiles/profile_manager.h"
12 #include "chrome/browser/ui/browser_finder.h" 12 #include "chrome/browser/ui/browser_finder.h"
13 #include "chrome/browser/ui/browser_navigator.h" 13 #include "chrome/browser/ui/browser_navigator.h"
14 #include "chrome/grit/generated_resources.h" 14 #include "chrome/grit/generated_resources.h"
15 #include "chromeos/network/client_cert_util.h" 15 #include "chromeos/network/client_cert_util.h"
16 #include "chromeos/network/managed_network_configuration_handler.h" 16 #include "chromeos/network/managed_network_configuration_handler.h"
17 #include "chromeos/network/network_event_log.h" 17 #include "chromeos/network/network_event_log.h"
18 #include "chromeos/network/network_state.h" 18 #include "chromeos/network/network_state.h"
19 #include "chromeos/network/network_state_handler.h" 19 #include "chromeos/network/network_state_handler.h"
20 #include "content/public/common/page_transition_types.h"
21 #include "extensions/browser/extension_host.h" 20 #include "extensions/browser/extension_host.h"
22 #include "extensions/common/constants.h" 21 #include "extensions/common/constants.h"
23 #include "ui/base/l10n/l10n_util.h" 22 #include "ui/base/l10n/l10n_util.h"
23 #include "ui/base/page_transition_types.h"
24 #include "ui/views/controls/label.h" 24 #include "ui/views/controls/label.h"
25 #include "ui/views/layout/grid_layout.h" 25 #include "ui/views/layout/grid_layout.h"
26 #include "ui/views/layout/layout_constants.h" 26 #include "ui/views/layout/layout_constants.h"
27 #include "ui/views/widget/widget.h" 27 #include "ui/views/widget/widget.h"
28 #include "ui/views/window/dialog_delegate.h" 28 #include "ui/views/window/dialog_delegate.h"
29 29
30 namespace chromeos { 30 namespace chromeos {
31 31
32 namespace { 32 namespace {
33 33
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 bool EnrollmentDialogView::Accept() { 117 bool EnrollmentDialogView::Accept() {
118 accepted_ = true; 118 accepted_ = true;
119 return true; 119 return true;
120 } 120 }
121 121
122 void EnrollmentDialogView::OnClosed() { 122 void EnrollmentDialogView::OnClosed() {
123 if (!accepted_) 123 if (!accepted_)
124 return; 124 return;
125 chrome::NavigateParams params(profile_, 125 chrome::NavigateParams params(profile_,
126 GURL(target_uri_), 126 GURL(target_uri_),
127 content::PAGE_TRANSITION_LINK); 127 ui::PAGE_TRANSITION_LINK);
128 params.disposition = NEW_FOREGROUND_TAB; 128 params.disposition = NEW_FOREGROUND_TAB;
129 params.window_action = chrome::NavigateParams::SHOW_WINDOW; 129 params.window_action = chrome::NavigateParams::SHOW_WINDOW;
130 chrome::Navigate(&params); 130 chrome::Navigate(&params);
131 } 131 }
132 132
133 base::string16 EnrollmentDialogView::GetDialogButtonLabel( 133 base::string16 EnrollmentDialogView::GetDialogButtonLabel(
134 ui::DialogButton button) const { 134 ui::DialogButton button) const {
135 if (button == ui::DIALOG_BUTTON_OK) 135 if (button == ui::DIALOG_BUTTON_OK)
136 return l10n_util::GetStringUTF16(IDS_NETWORK_ENROLLMENT_HANDLER_BUTTON); 136 return l10n_util::GetStringUTF16(IDS_NETWORK_ENROLLMENT_HANDLER_BUTTON);
137 return views::DialogDelegateView::GetDialogButtonLabel(button); 137 return views::DialogDelegateView::GetDialogButtonLabel(button);
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 DialogEnrollmentDelegate* enrollment = 301 DialogEnrollmentDelegate* enrollment =
302 new DialogEnrollmentDelegate(owning_window, network->name(), profile); 302 new DialogEnrollmentDelegate(owning_window, network->name(), profile);
303 return enrollment->Enroll(cert_config.pattern.enrollment_uri_list(), 303 return enrollment->Enroll(cert_config.pattern.enrollment_uri_list(),
304 base::Bind(&EnrollmentComplete, service_path)); 304 base::Bind(&EnrollmentComplete, service_path));
305 } 305 }
306 306
307 } // namespace enrollment 307 } // namespace enrollment
308 308
309 } // namespace chromeos 309 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_task_executor.cc ('k') | chrome/browser/chromeos/extensions/echo_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698