| 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/chromeos/keyboard_overlay_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.h" |
| 6 | 6 |
| 7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 | 356 |
| 357 web_ui()->CallJavascriptFunction("initIdentifierMap", dict); | 357 web_ui()->CallJavascriptFunction("initIdentifierMap", dict); |
| 358 } | 358 } |
| 359 | 359 |
| 360 void KeyboardOverlayHandler::OpenLearnMorePage(const base::ListValue* args) { | 360 void KeyboardOverlayHandler::OpenLearnMorePage(const base::ListValue* args) { |
| 361 web_ui()->GetWebContents()->GetDelegate()->OpenURLFromTab( | 361 web_ui()->GetWebContents()->GetDelegate()->OpenURLFromTab( |
| 362 web_ui()->GetWebContents(), | 362 web_ui()->GetWebContents(), |
| 363 content::OpenURLParams(GURL(kLearnMoreURL), | 363 content::OpenURLParams(GURL(kLearnMoreURL), |
| 364 content::Referrer(), | 364 content::Referrer(), |
| 365 NEW_FOREGROUND_TAB, | 365 NEW_FOREGROUND_TAB, |
| 366 content::PAGE_TRANSITION_LINK, | 366 ui::PAGE_TRANSITION_LINK, |
| 367 false)); | 367 false)); |
| 368 } | 368 } |
| 369 | 369 |
| 370 //////////////////////////////////////////////////////////////////////////////// | 370 //////////////////////////////////////////////////////////////////////////////// |
| 371 // | 371 // |
| 372 // KeyboardOverlayUI | 372 // KeyboardOverlayUI |
| 373 // | 373 // |
| 374 //////////////////////////////////////////////////////////////////////////////// | 374 //////////////////////////////////////////////////////////////////////////////// |
| 375 | 375 |
| 376 KeyboardOverlayUI::KeyboardOverlayUI(content::WebUI* web_ui) | 376 KeyboardOverlayUI::KeyboardOverlayUI(content::WebUI* web_ui) |
| 377 : WebDialogUI(web_ui) { | 377 : WebDialogUI(web_ui) { |
| 378 Profile* profile = Profile::FromWebUI(web_ui); | 378 Profile* profile = Profile::FromWebUI(web_ui); |
| 379 KeyboardOverlayHandler* handler = new KeyboardOverlayHandler(profile); | 379 KeyboardOverlayHandler* handler = new KeyboardOverlayHandler(profile); |
| 380 web_ui->AddMessageHandler(handler); | 380 web_ui->AddMessageHandler(handler); |
| 381 | 381 |
| 382 // Set up the chrome://keyboardoverlay/ source. | 382 // Set up the chrome://keyboardoverlay/ source. |
| 383 content::WebUIDataSource::Add(profile, CreateKeyboardOverlayUIHTMLSource()); | 383 content::WebUIDataSource::Add(profile, CreateKeyboardOverlayUIHTMLSource()); |
| 384 } | 384 } |
| OLD | NEW |