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

Side by Side Diff: chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 months 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 unified diff | Download patch
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "ash/display/display_manager.h" 9 #include "ash/display/display_manager.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 i != modifier_map.end(); ++i) { 400 i != modifier_map.end(); ++i) {
401 dict.SetString(ModifierKeyToLabel(i->first), ModifierKeyToLabel(i->second)); 401 dict.SetString(ModifierKeyToLabel(i->first), ModifierKeyToLabel(i->second));
402 } 402 }
403 403
404 web_ui()->CallJavascriptFunctionUnsafe("initIdentifierMap", dict); 404 web_ui()->CallJavascriptFunctionUnsafe("initIdentifierMap", dict);
405 } 405 }
406 406
407 void KeyboardOverlayHandler::OpenLearnMorePage(const base::ListValue* args) { 407 void KeyboardOverlayHandler::OpenLearnMorePage(const base::ListValue* args) {
408 web_ui()->GetWebContents()->GetDelegate()->OpenURLFromTab( 408 web_ui()->GetWebContents()->GetDelegate()->OpenURLFromTab(
409 web_ui()->GetWebContents(), 409 web_ui()->GetWebContents(),
410 content::OpenURLParams(GURL(kLearnMoreURL), 410 content::OpenURLParams(GURL(kLearnMoreURL), content::Referrer(),
411 content::Referrer(), 411 WindowOpenDisposition::NEW_FOREGROUND_TAB,
412 NEW_FOREGROUND_TAB, 412 ui::PAGE_TRANSITION_LINK, false));
413 ui::PAGE_TRANSITION_LINK,
414 false));
415 } 413 }
416 414
417 //////////////////////////////////////////////////////////////////////////////// 415 ////////////////////////////////////////////////////////////////////////////////
418 // 416 //
419 // KeyboardOverlayUI 417 // KeyboardOverlayUI
420 // 418 //
421 //////////////////////////////////////////////////////////////////////////////// 419 ////////////////////////////////////////////////////////////////////////////////
422 420
423 KeyboardOverlayUI::KeyboardOverlayUI(content::WebUI* web_ui) 421 KeyboardOverlayUI::KeyboardOverlayUI(content::WebUI* web_ui)
424 : WebDialogUI(web_ui) { 422 : WebDialogUI(web_ui) {
425 Profile* profile = Profile::FromWebUI(web_ui); 423 Profile* profile = Profile::FromWebUI(web_ui);
426 KeyboardOverlayHandler* handler = new KeyboardOverlayHandler(profile); 424 KeyboardOverlayHandler* handler = new KeyboardOverlayHandler(profile);
427 web_ui->AddMessageHandler(handler); 425 web_ui->AddMessageHandler(handler);
428 426
429 // Set up the chrome://keyboardoverlay/ source. 427 // Set up the chrome://keyboardoverlay/ source.
430 content::WebUIDataSource::Add(profile, 428 content::WebUIDataSource::Add(profile,
431 CreateKeyboardOverlayUIHTMLSource(profile)); 429 CreateKeyboardOverlayUIHTMLSource(profile));
432 } 430 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_contents_handler.cc ('k') | chrome/browser/ui/webui/inspect_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698