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

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

Issue 11779019: browser: Move FindTabbedBrowser() function into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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 | Annotate | Revision Log
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/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/chromeos/cros/network_library.h" 9 #include "chrome/browser/chromeos/cros/network_library.h"
10 #include "chrome/browser/extensions/extension_host.h" 10 #include "chrome/browser/extensions/extension_host.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 widget->Show(); 101 widget->Show();
102 } 102 }
103 103
104 int EnrollmentDialogView::GetDialogButtons() const { 104 int EnrollmentDialogView::GetDialogButtons() const {
105 return ui::DIALOG_BUTTON_CANCEL | ui::DIALOG_BUTTON_OK; 105 return ui::DIALOG_BUTTON_CANCEL | ui::DIALOG_BUTTON_OK;
106 } 106 }
107 107
108 bool EnrollmentDialogView::Accept() { 108 bool EnrollmentDialogView::Accept() {
109 // TODO(beng): use Navigate(). 109 // TODO(beng): use Navigate().
110 // Navigate to the target URI in a browser tab. 110 // Navigate to the target URI in a browser tab.
111 Browser* browser = browser::FindTabbedBrowser(profile_, false, 111 Browser* browser = chrome::FindTabbedBrowser(profile_, false,
112 chrome::HOST_DESKTOP_TYPE_ASH); 112 chrome::HOST_DESKTOP_TYPE_ASH);
113 if (!browser) { 113 if (!browser) {
114 // Couldn't find a tabbed browser: create one. 114 // Couldn't find a tabbed browser: create one.
115 browser = new Browser( 115 browser = new Browser(
116 Browser::CreateParams(Browser::TYPE_TABBED, 116 Browser::CreateParams(Browser::TYPE_TABBED,
117 profile_, 117 profile_,
118 chrome::HOST_DESKTOP_TYPE_ASH)); 118 chrome::HOST_DESKTOP_TYPE_ASH));
119 } 119 }
120 DCHECK(browser); 120 DCHECK(browser);
121 chrome::AddSelectedTabWithURL(browser, target_uri_, 121 chrome::AddSelectedTabWithURL(browser, target_uri_,
122 content::PAGE_TRANSITION_LINK); 122 content::PAGE_TRANSITION_LINK);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 //////////////////////////////////////////////////////////////////////////////// 246 ////////////////////////////////////////////////////////////////////////////////
247 // Factory function. 247 // Factory function.
248 248
249 EnrollmentDelegate* CreateEnrollmentDelegate(gfx::NativeWindow owning_window, 249 EnrollmentDelegate* CreateEnrollmentDelegate(gfx::NativeWindow owning_window,
250 const std::string& network_name, 250 const std::string& network_name,
251 Profile* profile) { 251 Profile* profile) {
252 return new DialogEnrollmentDelegate(owning_window, network_name, profile); 252 return new DialogEnrollmentDelegate(owning_window, network_name, profile);
253 } 253 }
254 254
255 } // namespace chromeos 255 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/captive_portal/captive_portal_browsertest.cc ('k') | chrome/browser/chromeos/locale_change_guard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698