| OLD | NEW |
| 1 // Copyright 2015 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/content/keyboard_content_util.h" | 5 #include "ui/keyboard/content/keyboard_content_util.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/keyboard/grit/keyboard_resources.h" | 9 #include "ui/keyboard/grit/keyboard_resources.h" |
| 10 #include "ui/keyboard/grit/keyboard_resources_map.h" | 10 #include "ui/keyboard/grit/keyboard_resources_map.h" |
| 11 #include "url/gurl.h" | 11 #include "url/gurl.h" |
| 12 | 12 |
| 13 namespace keyboard { | 13 namespace keyboard { |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 base::LazyInstance<GURL> g_override_content_url = LAZY_INSTANCE_INITIALIZER; | 16 base::LazyInstance<GURL>::DestructorAtExit g_override_content_url = |
| 17 LAZY_INSTANCE_INITIALIZER; |
| 17 | 18 |
| 18 } // namespace | 19 } // namespace |
| 19 | 20 |
| 20 void SetOverrideContentUrl(const GURL& url) { | 21 void SetOverrideContentUrl(const GURL& url) { |
| 21 g_override_content_url.Get() = url; | 22 g_override_content_url.Get() = url; |
| 22 } | 23 } |
| 23 | 24 |
| 24 const GURL& GetOverrideContentUrl() { | 25 const GURL& GetOverrideContentUrl() { |
| 25 return g_override_content_url.Get(); | 26 return g_override_content_url.Get(); |
| 26 } | 27 } |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 {"keyboard/sounds/keypress-spacebar.wav", | 101 {"keyboard/sounds/keypress-spacebar.wav", |
| 101 IDR_KEYBOARD_SOUNDS_KEYPRESS_SPACEBAR}, | 102 IDR_KEYBOARD_SOUNDS_KEYPRESS_SPACEBAR}, |
| 102 {"keyboard/sounds/keypress-standard.wav", | 103 {"keyboard/sounds/keypress-standard.wav", |
| 103 IDR_KEYBOARD_SOUNDS_KEYPRESS_STANDARD}, | 104 IDR_KEYBOARD_SOUNDS_KEYPRESS_STANDARD}, |
| 104 }; | 105 }; |
| 105 *size = arraysize(kKeyboardResources); | 106 *size = arraysize(kKeyboardResources); |
| 106 return kKeyboardResources; | 107 return kKeyboardResources; |
| 107 } | 108 } |
| 108 | 109 |
| 109 } // namespace keyboard | 110 } // namespace keyboard |
| OLD | NEW |