Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / ui / keyboard / keyboard.cc
blob436b93595f925ec97be82f1ee69b977330e615a5
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
3 // found in the LICENSE file.
5 #include "ui/keyboard/keyboard.h"
7 #include "base/files/file_path.h"
8 #include "base/path_service.h"
9 #include "ui/base/resource/resource_bundle.h"
11 namespace keyboard {
13 static bool initialized = false;
15 void ResetKeyboardForTesting() {
16 initialized = false;
19 void InitializeKeyboard() {
20 if (initialized)
21 return;
22 initialized = true;
24 base::FilePath pak_dir;
25 PathService::Get(base::DIR_MODULE, &pak_dir);
26 base::FilePath pak_file = pak_dir.Append(
27 FILE_PATH_LITERAL("keyboard_resources.pak"));
28 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
29 pak_file, ui::SCALE_FACTOR_100P);
32 } // namespace keyboard