| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "webkit/default_plugin/install_dialog.h" | 5 #include "chrome/default_plugin/install_dialog.h" |
| 6 | 6 |
| 7 #include "base/hash_tables.h" | 7 #include "base/hash_tables.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "chrome/default_plugin/plugin_impl.h" |
| 11 #include "grit/webkit_strings.h" | 12 #include "grit/webkit_strings.h" |
| 12 #include "webkit/default_plugin/plugin_impl.h" | |
| 13 #include "webkit/glue/webkit_glue.h" | 13 #include "webkit/glue/webkit_glue.h" |
| 14 | 14 |
| 15 typedef base::hash_map<const std::wstring, PluginInstallDialog*> DialogMap; | 15 typedef base::hash_map<const std::wstring, PluginInstallDialog*> DialogMap; |
| 16 base::LazyInstance<DialogMap> s_dialogs(base::LINKER_INITIALIZED); | 16 base::LazyInstance<DialogMap> s_dialogs(base::LINKER_INITIALIZED); |
| 17 | 17 |
| 18 PluginInstallDialog* PluginInstallDialog::AddInstaller( | 18 PluginInstallDialog* PluginInstallDialog::AddInstaller( |
| 19 PluginInstallerImpl* plugin_impl, const std::wstring& plugin_name) { | 19 PluginInstallerImpl* plugin_impl, const std::wstring& plugin_name) { |
| 20 PluginInstallDialog* dialog; | 20 PluginInstallDialog* dialog; |
| 21 if (s_dialogs.Get().count(plugin_name)) { | 21 if (s_dialogs.Get().count(plugin_name)) { |
| 22 dialog = s_dialogs.Get()[plugin_name]; | 22 dialog = s_dialogs.Get()[plugin_name]; |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 // same code. | 194 // same code. |
| 195 void PluginInstallDialog::AdjustTextDirectionality(std::wstring* text) const { | 195 void PluginInstallDialog::AdjustTextDirectionality(std::wstring* text) const { |
| 196 if (PluginInstallerImpl::IsRTLLayout()) { | 196 if (PluginInstallerImpl::IsRTLLayout()) { |
| 197 // Inserting an RLE (Right-To-Left Embedding) mark as the first character. | 197 // Inserting an RLE (Right-To-Left Embedding) mark as the first character. |
| 198 text->insert(0, L"\x202B"); | 198 text->insert(0, L"\x202B"); |
| 199 | 199 |
| 200 // Inserting a PDF (Pop Directional Formatting) mark as the last character. | 200 // Inserting a PDF (Pop Directional Formatting) mark as the last character. |
| 201 text->append(L"\x202C"); | 201 text->append(L"\x202C"); |
| 202 } | 202 } |
| 203 } | 203 } |
| OLD | NEW |