OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/keyboard_overlay_delegate.h" | 5 #include "chrome/browser/ui/views/keyboard_overlay_delegate.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/browser_list.h" | 10 #include "chrome/browser/browser_list.h" |
10 #include "chrome/browser/dom_ui/html_dialog_ui.h" | 11 #include "chrome/browser/dom_ui/html_dialog_ui.h" |
11 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
12 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
13 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
14 | 15 |
15 | 16 |
16 void KeyboardOverlayDelegate::ShowDialog(gfx::NativeWindow owning_window) { | 17 void KeyboardOverlayDelegate::ShowDialog(gfx::NativeWindow owning_window) { |
17 Browser* browser = BrowserList::GetLastActive(); | 18 Browser* browser = BrowserList::GetLastActive(); |
18 KeyboardOverlayDelegate* delegate = new KeyboardOverlayDelegate( | 19 KeyboardOverlayDelegate* delegate = new KeyboardOverlayDelegate( |
19 l10n_util::GetString(IDS_KEYBOARD_OVERLAY_TITLE)); | 20 UTF16ToWide(l10n_util::GetStringUTF16(IDS_KEYBOARD_OVERLAY_TITLE))); |
20 DCHECK(browser); | 21 DCHECK(browser); |
21 browser->BrowserShowHtmlDialog(delegate, owning_window); | 22 browser->BrowserShowHtmlDialog(delegate, owning_window); |
22 } | 23 } |
23 | 24 |
24 KeyboardOverlayDelegate::KeyboardOverlayDelegate( | 25 KeyboardOverlayDelegate::KeyboardOverlayDelegate( |
25 const std::wstring& title) | 26 const std::wstring& title) |
26 : title_(title) { | 27 : title_(title) { |
27 } | 28 } |
28 | 29 |
29 KeyboardOverlayDelegate::~KeyboardOverlayDelegate() { | 30 KeyboardOverlayDelegate::~KeyboardOverlayDelegate() { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 return; | 62 return; |
62 } | 63 } |
63 | 64 |
64 void KeyboardOverlayDelegate::OnCloseContents(TabContents* source, | 65 void KeyboardOverlayDelegate::OnCloseContents(TabContents* source, |
65 bool* out_close_dialog) { | 66 bool* out_close_dialog) { |
66 } | 67 } |
67 | 68 |
68 bool KeyboardOverlayDelegate::ShouldShowDialogTitle() const { | 69 bool KeyboardOverlayDelegate::ShouldShowDialogTitle() const { |
69 return false; | 70 return false; |
70 } | 71 } |
OLD | NEW |