| 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/ui/webui/set_as_default_browser_ui.h" | 5 #include "chrome/browser/ui/webui/set_as_default_browser_ui.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "chrome/browser/first_run/first_run.h" | 10 #include "chrome/browser/first_run/first_run.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 DISALLOW_COPY_AND_ASSIGN(SetAsDefaultBrowserDialogImpl); | 242 DISALLOW_COPY_AND_ASSIGN(SetAsDefaultBrowserDialogImpl); |
| 243 }; | 243 }; |
| 244 | 244 |
| 245 SetAsDefaultBrowserDialogImpl::SetAsDefaultBrowserDialogImpl(Profile* profile, | 245 SetAsDefaultBrowserDialogImpl::SetAsDefaultBrowserDialogImpl(Profile* profile, |
| 246 Browser* browser) | 246 Browser* browser) |
| 247 : profile_(profile), browser_(browser) { | 247 : profile_(profile), browser_(browser) { |
| 248 } | 248 } |
| 249 | 249 |
| 250 void SetAsDefaultBrowserDialogImpl::ShowDialog() { | 250 void SetAsDefaultBrowserDialogImpl::ShowDialog() { |
| 251 browser::ShowWebDialog(browser_->window()->GetNativeWindow(), | 251 chrome::ShowWebDialog(browser_->window()->GetNativeWindow(), |
| 252 browser_->profile(), | 252 browser_->profile(), this); |
| 253 this); | |
| 254 } | 253 } |
| 255 | 254 |
| 256 ui::ModalType SetAsDefaultBrowserDialogImpl::GetDialogModalType() const { | 255 ui::ModalType SetAsDefaultBrowserDialogImpl::GetDialogModalType() const { |
| 257 return ui::MODAL_TYPE_SYSTEM; | 256 return ui::MODAL_TYPE_SYSTEM; |
| 258 } | 257 } |
| 259 | 258 |
| 260 string16 SetAsDefaultBrowserDialogImpl::GetDialogTitle() const { | 259 string16 SetAsDefaultBrowserDialogImpl::GetDialogTitle() const { |
| 261 return l10n_util::GetStringUTF16(IDS_METRO_FLOW_TAB_TITLE); | 260 return l10n_util::GetStringUTF16(IDS_METRO_FLOW_TAB_TITLE); |
| 262 } | 261 } |
| 263 | 262 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 new SetAsDefaultBrowserDialogImpl(profile, browser); | 322 new SetAsDefaultBrowserDialogImpl(profile, browser); |
| 324 dialog->ShowDialog(); | 323 dialog->ShowDialog(); |
| 325 } else { | 324 } else { |
| 326 GURL url(chrome::kChromeUIMetroFlowURL); | 325 GURL url(chrome::kChromeUIMetroFlowURL); |
| 327 chrome::NavigateParams params( | 326 chrome::NavigateParams params( |
| 328 chrome::GetSingletonTabNavigateParams(browser, url)); | 327 chrome::GetSingletonTabNavigateParams(browser, url)); |
| 329 params.path_behavior = chrome::NavigateParams::IGNORE_AND_NAVIGATE; | 328 params.path_behavior = chrome::NavigateParams::IGNORE_AND_NAVIGATE; |
| 330 chrome::ShowSingletonTabOverwritingNTP(browser, params); | 329 chrome::ShowSingletonTabOverwritingNTP(browser, params); |
| 331 } | 330 } |
| 332 } | 331 } |
| OLD | NEW |