| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.h" | 5 #include "ui/keyboard/content/keyboard.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "ui/base/resource/resource_bundle.h" | 9 #include "ui/base/resource/resource_bundle.h" |
| 10 | 10 |
| 11 namespace keyboard { | 11 namespace keyboard { |
| 12 | 12 |
| 13 void InitializeKeyboard() { | 13 void InitializeKeyboard() { |
| 14 static bool initialized = false; | 14 static bool initialized = false; |
| 15 if (initialized) | 15 if (initialized) |
| 16 return; | 16 return; |
| 17 initialized = true; | 17 initialized = true; |
| 18 | 18 |
| 19 base::FilePath pak_dir; | 19 base::FilePath pak_dir; |
| 20 PathService::Get(base::DIR_MODULE, &pak_dir); | 20 PathService::Get(base::DIR_MODULE, &pak_dir); |
| 21 base::FilePath pak_file = pak_dir.Append( | 21 base::FilePath pak_file = pak_dir.Append( |
| 22 FILE_PATH_LITERAL("keyboard_resources.pak")); | 22 FILE_PATH_LITERAL("keyboard_resources.pak")); |
| 23 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 23 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
| 24 pak_file, ui::SCALE_FACTOR_100P); | 24 pak_file, ui::SCALE_FACTOR_100P); |
| 25 } | 25 } |
| 26 | 26 |
| 27 } // namespace keyboard | 27 } // namespace keyboard |
| OLD | NEW |