| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/mobile_setup_dialog.h" | 5 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/platform_util.h" | 10 #include "chrome/browser/platform_util.h" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/browser_dialogs.h" | 12 #include "chrome/browser/ui/browser_dialogs.h" |
| 13 #include "chrome/browser/ui/browser_list.h" | 13 #include "chrome/browser/ui/browser_list.h" |
| 14 #include "chrome/browser/ui/dialog_style.h" |
| 14 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 15 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
| 15 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
| 16 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
| 17 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
| 18 | 19 |
| 19 using content::BrowserThread; | 20 using content::BrowserThread; |
| 20 | 21 |
| 21 class MobileSetupDialogDelegate : public HtmlDialogUIDelegate { | 22 class MobileSetupDialogDelegate : public HtmlDialogUIDelegate { |
| 22 public: | 23 public: |
| 23 static MobileSetupDialogDelegate* GetInstance(); | 24 static MobileSetupDialogDelegate* GetInstance(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 MobileSetupDialogDelegate::MobileSetupDialogDelegate() { | 66 MobileSetupDialogDelegate::MobileSetupDialogDelegate() { |
| 66 } | 67 } |
| 67 | 68 |
| 68 MobileSetupDialogDelegate::~MobileSetupDialogDelegate() { | 69 MobileSetupDialogDelegate::~MobileSetupDialogDelegate() { |
| 69 } | 70 } |
| 70 | 71 |
| 71 void MobileSetupDialogDelegate::ShowDialog() { | 72 void MobileSetupDialogDelegate::ShowDialog() { |
| 72 Browser* browser = BrowserList::GetLastActive(); | 73 Browser* browser = BrowserList::GetLastActive(); |
| 73 if (!browser) | 74 if (!browser) |
| 74 return; | 75 return; |
| 75 browser->BrowserShowHtmlDialog(this, NULL); | 76 browser->BrowserShowHtmlDialog(this, NULL, STYLE_GENERIC); |
| 76 } | 77 } |
| 77 | 78 |
| 78 bool MobileSetupDialogDelegate::IsDialogModal() const { | 79 bool MobileSetupDialogDelegate::IsDialogModal() const { |
| 79 return true; | 80 return true; |
| 80 } | 81 } |
| 81 | 82 |
| 82 string16 MobileSetupDialogDelegate::GetDialogTitle() const { | 83 string16 MobileSetupDialogDelegate::GetDialogTitle() const { |
| 83 return l10n_util::GetStringUTF16(IDS_MOBILE_SETUP_TITLE); | 84 return l10n_util::GetStringUTF16(IDS_MOBILE_SETUP_TITLE); |
| 84 } | 85 } |
| 85 | 86 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 112 } | 113 } |
| 113 | 114 |
| 114 bool MobileSetupDialogDelegate::ShouldShowDialogTitle() const { | 115 bool MobileSetupDialogDelegate::ShouldShowDialogTitle() const { |
| 115 return true; | 116 return true; |
| 116 } | 117 } |
| 117 | 118 |
| 118 bool MobileSetupDialogDelegate::HandleContextMenu( | 119 bool MobileSetupDialogDelegate::HandleContextMenu( |
| 119 const ContextMenuParams& params) { | 120 const ContextMenuParams& params) { |
| 120 return true; | 121 return true; |
| 121 } | 122 } |
| OLD | NEW |