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

Side by Side Diff: ui/keyboard/keyboard_ui_controller.cc

Issue 26258003: Add a full QWERTY layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix edge case in WebUI Created 7 years, 2 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/keyboard/keyboard_ui_controller.h" 5 #include "ui/keyboard/keyboard_ui_controller.h"
6 6
7 #include "content/public/browser/browser_context.h" 7 #include "content/public/browser/browser_context.h"
8 #include "content/public/browser/web_contents.h" 8 #include "content/public/browser/web_contents.h"
9 #include "content/public/browser/web_ui.h" 9 #include "content/public/browser/web_ui.h"
10 #include "content/public/browser/web_ui_data_source.h" 10 #include "content/public/browser/web_ui_data_source.h"
(...skipping 28 matching lines...) Expand all
39 source->AddResourcePath("elements/kb-row.html", IDR_KEYBOARD_ELEMENTS_ROW); 39 source->AddResourcePath("elements/kb-row.html", IDR_KEYBOARD_ELEMENTS_ROW);
40 source->AddResourcePath("elements/kb-shift-key.html", 40 source->AddResourcePath("elements/kb-shift-key.html",
41 IDR_KEYBOARD_ELEMENTS_SHIFT_KEY); 41 IDR_KEYBOARD_ELEMENTS_SHIFT_KEY);
42 source->AddResourcePath("images/microphone.svg", 42 source->AddResourcePath("images/microphone.svg",
43 IDR_KEYBOARD_IMAGES_MICROPHONE); 43 IDR_KEYBOARD_IMAGES_MICROPHONE);
44 source->AddResourcePath("images/microphone-green.svg", 44 source->AddResourcePath("images/microphone-green.svg",
45 IDR_KEYBOARD_IMAGES_MICROPHONE_GREEN); 45 IDR_KEYBOARD_IMAGES_MICROPHONE_GREEN);
46 source->AddResourcePath("layouts/latin-accents.js", 46 source->AddResourcePath("layouts/latin-accents.js",
47 IDR_KEYBOARD_LAYOUTS_LATIN_ACCENTS); 47 IDR_KEYBOARD_LAYOUTS_LATIN_ACCENTS);
48 source->AddResourcePath("layouts/numeric.html", IDR_KEYBOARD_LAYOUTS_NUMERIC); 48 source->AddResourcePath("layouts/numeric.html", IDR_KEYBOARD_LAYOUTS_NUMERIC);
49 source->AddResourcePath("layouts/system-qwerty.html",
50 IDR_KEYBOARD_LAYOUTS_SYSTEM_QWERTY);
49 source->AddResourcePath("main.js", IDR_KEYBOARD_MAIN_JS); 51 source->AddResourcePath("main.js", IDR_KEYBOARD_MAIN_JS);
50 source->AddResourcePath("polymer.min.js", IDR_KEYBOARD_POLYMER); 52 source->AddResourcePath("polymer.min.js", IDR_KEYBOARD_POLYMER);
51 source->AddResourcePath("voice_input.js", IDR_KEYBOARD_VOICE_INPUT_JS); 53 source->AddResourcePath("voice_input.js", IDR_KEYBOARD_VOICE_INPUT_JS);
52 54
53 // These files are specific to the WebUI version 55 // These files are specific to the WebUI version
54 source->AddResourcePath("api_adapter.js", IDR_KEYBOARD_WEBUI_API_ADAPTER_JS); 56 source->AddResourcePath("api_adapter.js", IDR_KEYBOARD_WEBUI_API_ADAPTER_JS);
55 source->AddResourcePath("constants.js", IDR_KEYBOARD_WEBUI_CONSTANTS_JS); 57 source->AddResourcePath("constants.js", IDR_KEYBOARD_WEBUI_CONSTANTS_JS);
56 source->AddResourcePath("layouts/qwerty.html", IDR_KEYBOARD_WEBUI_QWERTY); 58 source->AddResourcePath("layouts/qwerty.html", IDR_KEYBOARD_WEBUI_QWERTY);
57 source->AddResourcePath("main.css", IDR_KEYBOARD_WEBUI_MAIN_CSS); 59 source->AddResourcePath("main.css", IDR_KEYBOARD_WEBUI_MAIN_CSS);
58 60
(...skipping 10 matching lines...) Expand all
69 web_ui->GetWebContents()->GetBrowserContext(); 71 web_ui->GetWebContents()->GetBrowserContext();
70 web_ui->AddMessageHandler(new KeyboardUIHandler()); 72 web_ui->AddMessageHandler(new KeyboardUIHandler());
71 content::WebUIDataSource::Add( 73 content::WebUIDataSource::Add(
72 browser_context, 74 browser_context,
73 CreateKeyboardUIDataSource()); 75 CreateKeyboardUIDataSource());
74 } 76 }
75 77
76 KeyboardUIController::~KeyboardUIController() {} 78 KeyboardUIController::~KeyboardUIController() {}
77 79
78 } // namespace keyboard 80 } // namespace keyboard
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698