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

Unified Diff: chrome/browser/ui/views/keyboard_overlay_delegate.cc

Issue 5440001: Enable to show the keyboard overlay by shortcut key. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/keyboard_overlay_delegate.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/keyboard_overlay_delegate.cc
diff --git a/chrome/browser/ui/views/keyboard_overlay_delegate.cc b/chrome/browser/ui/views/keyboard_overlay_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5673f0204480e6e7118b0cec9644c2dabe55e39b
--- /dev/null
+++ b/chrome/browser/ui/views/keyboard_overlay_delegate.cc
@@ -0,0 +1,70 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/views/keyboard_overlay_delegate.h"
+
+#include "app/l10n_util.h"
+#include "base/scoped_ptr.h"
+#include "chrome/browser/browser_list.h"
+#include "chrome/browser/dom_ui/html_dialog_ui.h"
+#include "chrome/browser/ui/browser.h"
+#include "chrome/common/url_constants.h"
+#include "grit/generated_resources.h"
+
+
+void KeyboardOverlayDelegate::ShowDialog(gfx::NativeWindow owning_window) {
+ Browser* browser = BrowserList::GetLastActive();
+ KeyboardOverlayDelegate* delegate = new KeyboardOverlayDelegate(
+ l10n_util::GetString(IDS_KEYBOARD_OVERLAY_TITLE));
+ DCHECK(browser);
+ browser->BrowserShowHtmlDialog(delegate, owning_window);
+}
+
+KeyboardOverlayDelegate::KeyboardOverlayDelegate(
+ const std::wstring& title)
+ : title_(title) {
+}
+
+KeyboardOverlayDelegate::~KeyboardOverlayDelegate() {
+}
+
+bool KeyboardOverlayDelegate::IsDialogModal() const {
+ return true;
+}
+
+std::wstring KeyboardOverlayDelegate::GetDialogTitle() const {
+ return title_;
+}
+
+GURL KeyboardOverlayDelegate::GetDialogContentURL() const {
+ std::string url_string(chrome::kChromeUIKeyboardOverlayURL);
+ return GURL(url_string);
+}
+
+void KeyboardOverlayDelegate::GetDOMMessageHandlers(
+ std::vector<DOMMessageHandler*>* handlers) const {
+}
+
+void KeyboardOverlayDelegate::GetDialogSize(
+ gfx::Size* size) const {
+ size->SetSize(1170, 483);
+}
+
+std::string KeyboardOverlayDelegate::GetDialogArgs() const {
+ return "[]";
+}
+
+void KeyboardOverlayDelegate::OnDialogClosed(
+ const std::string& json_retval) {
+ delete this;
+ return;
+}
+
+void KeyboardOverlayDelegate::OnCloseContents(TabContents* source,
+ bool* out_close_dialog) {
+}
+
+bool KeyboardOverlayDelegate::ShouldShowDialogTitle() const {
+ return false;
+}
« no previous file with comments | « chrome/browser/ui/views/keyboard_overlay_delegate.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698