diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-08-08 14:30:41 +0200 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-08-12 13:49:54 +0200 |
commit | ab0a50979b9eb4dfa3320eff7e187e41efedf7a9 (patch) | |
tree | 498dfb8a97ff3361a9f7486863a52bb4e26bb898 /chromium/ui/base | |
parent | 4ce69f7403811819800e7c5ae1318b2647e778d1 (diff) |
Update Chromium to beta version 37.0.2062.68
Change-Id: I188e3b5aff1bec75566014291b654eb19f5bc8ca
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'chromium/ui/base')
476 files changed, 8812 insertions, 25539 deletions
diff --git a/chromium/ui/base/BUILD.gn b/chromium/ui/base/BUILD.gn new file mode 100644 index 00000000000..fe42ae9ec26 --- /dev/null +++ b/chromium/ui/base/BUILD.gn @@ -0,0 +1,556 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/ui.gni") + +if (is_android) { + import("//build/config/android/config.gni") + import("//build/config/android/rules.gni") +} + +component("base") { + output_name = "ui_base" + sources = [ + "accelerators/accelerator.cc", + "accelerators/accelerator.h", + "accelerators/accelerator_manager.cc", + "accelerators/accelerator_manager.h", + "accelerators/menu_label_accelerator_util_linux.cc", + "accelerators/menu_label_accelerator_util_linux.h", + "accelerators/platform_accelerator.h", + "accelerators/platform_accelerator_cocoa.h", + "accelerators/platform_accelerator_cocoa.mm", + "android/ui_base_jni_registrar.cc", + "android/ui_base_jni_registrar.h", + "android/view_android.cc", + "android/view_android.h", + "android/window_android.cc", + "android/window_android.h", + "android/window_android_compositor.h", + "android/window_android_observer.h", + "base_window.cc", + "base_window.h", + "clipboard/clipboard.cc", + "clipboard/clipboard.h", + "clipboard/clipboard_android.cc", + "clipboard/clipboard_android_initialization.h", + "clipboard/clipboard_constants.cc", + "clipboard/clipboard_mac.mm", + "clipboard/clipboard_types.h", + "clipboard/clipboard_util_win.cc", + "clipboard/clipboard_util_win.h", + "clipboard/clipboard_win.cc", + "clipboard/custom_data_helper.cc", + "clipboard/custom_data_helper.h", + "clipboard/custom_data_helper_linux.cc", + "clipboard/custom_data_helper_mac.mm", + "clipboard/scoped_clipboard_writer.cc", + "clipboard/scoped_clipboard_writer.h", + "cocoa/animation_utils.h", + "cocoa/appkit_utils.h", + "cocoa/appkit_utils.mm", + "cocoa/base_view.h", + "cocoa/base_view.mm", + "cocoa/cocoa_base_utils.h", + "cocoa/cocoa_base_utils.mm", + "cocoa/controls/blue_label_button.h", + "cocoa/controls/blue_label_button.mm", + "cocoa/controls/hover_image_menu_button.h", + "cocoa/controls/hover_image_menu_button.mm", + "cocoa/controls/hover_image_menu_button_cell.h", + "cocoa/controls/hover_image_menu_button_cell.mm", + "cocoa/controls/hyperlink_button_cell.h", + "cocoa/controls/hyperlink_button_cell.mm", + "cocoa/find_pasteboard.h", + "cocoa/find_pasteboard.mm", + "cocoa/flipped_view.h", + "cocoa/flipped_view.mm", + "cocoa/focus_tracker.h", + "cocoa/focus_tracker.mm", + "cocoa/focus_window_set.h", + "cocoa/focus_window_set.mm", + "cocoa/fullscreen_window_manager.h", + "cocoa/fullscreen_window_manager.mm", + "cocoa/hover_button.h", + "cocoa/hover_button.mm", + "cocoa/hover_image_button.h", + "cocoa/hover_image_button.mm", + "cocoa/menu_controller.h", + "cocoa/menu_controller.mm", + "cocoa/nib_loading.h", + "cocoa/nib_loading.mm", + "cocoa/nsgraphics_context_additions.h", + "cocoa/nsgraphics_context_additions.mm", + "cocoa/tracking_area.h", + "cocoa/tracking_area.mm", + "cocoa/underlay_opengl_hosting_window.h", + "cocoa/underlay_opengl_hosting_window.mm", + "cocoa/view_description.h", + "cocoa/view_description.mm", + "cocoa/window_size_constants.h", + "cocoa/window_size_constants.mm", + "cursor/cursor.cc", + "cursor/cursor.h", + "cursor/cursor_android.cc", + "cursor/cursor_loader.h", + "cursor/cursor_loader_win.cc", + "cursor/cursor_loader_win.h", + "cursor/cursor_util.cc", + "cursor/cursor_util.h", + "cursor/cursor_win.cc", + "cursor/cursors_aura.cc", + "cursor/cursors_aura.h", + "default_theme_provider.cc", + "default_theme_provider.h", + "default_theme_provider_mac.mm", + "device_form_factor_android.cc", + "device_form_factor_android.h", + "device_form_factor_desktop.cc", + "device_form_factor_ios.mm", + "device_form_factor.h", + "dragdrop/cocoa_dnd_util.h", + "dragdrop/cocoa_dnd_util.mm", + "dragdrop/drag_drop_types.h", + "dragdrop/drag_drop_types.h", + "dragdrop/drag_drop_types_win.cc", + "dragdrop/drag_source_win.cc", + "dragdrop/drag_source_win.h", + "dragdrop/drag_utils.cc", + "dragdrop/drag_utils.h", + "dragdrop/drag_utils_aura.cc", + "dragdrop/drag_utils_win.cc", + "dragdrop/drop_target_event.cc", + "dragdrop/drop_target_event.h", + "dragdrop/drop_target_win.cc", + "dragdrop/drop_target_win.h", + "dragdrop/file_info.cc", + "dragdrop/file_info.h", + "dragdrop/os_exchange_data.cc", + "dragdrop/os_exchange_data.h", + "dragdrop/os_exchange_data_provider_win.cc", + "dragdrop/os_exchange_data_provider_win.h", + "hit_test.h", + "l10n/formatter.cc", + "l10n/formatter.h", + "l10n/l10n_font_util.cc", + "l10n/l10n_font_util.h", + "l10n/l10n_util.cc", + "l10n/l10n_util.h", + "l10n/l10n_util_android.cc", + "l10n/l10n_util_android.h", + "l10n/l10n_util_collator.h", + "l10n/l10n_util_mac.h", + "l10n/l10n_util_mac.mm", + "l10n/l10n_util_plurals.cc", + "l10n/l10n_util_plurals.h", + "l10n/l10n_util_posix.cc", + "l10n/l10n_util_win.cc", + "l10n/l10n_util_win.h", + "l10n/time_format.cc", + "l10n/time_format.h", + "layout.cc", + "layout.h", + "layout_mac.mm", + "models/button_menu_item_model.cc", + "models/button_menu_item_model.h", + "models/combobox_model.cc", + "models/combobox_model.h", + "models/combobox_model_observer.h", + "models/dialog_model.cc", + "models/dialog_model.h", + "models/list_model.h", + "models/list_model_observer.h", + "models/list_selection_model.cc", + "models/list_selection_model.h", + "models/menu_model.cc", + "models/menu_model.h", + "models/menu_model_delegate.h", + "models/menu_separator_types.h", + "models/simple_menu_model.cc", + "models/simple_menu_model.h", + "models/table_model.cc", + "models/table_model.h", + "models/table_model_observer.h", + "models/tree_model.cc", + "models/tree_model.h", + "models/tree_node_iterator.h", + "models/tree_node_model.h", + "nine_image_painter_factory.cc", + "nine_image_painter_factory.h", + "resource/data_pack.cc", + "resource/data_pack.h", + "resource/resource_bundle.cc", + "resource/resource_bundle.h", + "resource/resource_bundle_android.cc", + "resource/resource_bundle_auralinux.cc", + "resource/resource_bundle_ios.mm", + "resource/resource_bundle_mac.mm", + "resource/resource_bundle_win.cc", + "resource/resource_bundle_win.h", + "resource/resource_data_dll_win.cc", + "resource/resource_data_dll_win.h", + "resource/resource_handle.h", + "text/bytes_formatting.cc", + "text/bytes_formatting.h", + "theme_provider.cc", + "theme_provider.h", + "touch/touch_device.h", + "touch/touch_editing_controller.cc", + "touch/touch_editing_controller.h", + "touch/touch_enabled.cc", + "touch/touch_enabled.h", + "ui_base_exports.cc", + "ui_base_paths.cc", + "ui_base_paths.h", + "ui_base_switches.cc", + "ui_base_switches.h", + "ui_base_switches_util.cc", + "ui_base_switches_util.h", + "ui_base_types.cc", + "ui_base_types.h", + "ui_base_export.h", + "view_prop.cc", + "view_prop.h", + "webui/jstemplate_builder.cc", + "webui/jstemplate_builder.h", + "webui/web_ui_util.cc", + "webui/web_ui_util.h", + "win/accessibility_ids_win.h", + "win/accessibility_misc_utils.cc", + "win/accessibility_misc_utils.h", + "win/atl_module.h", + "win/dpi_setup.cc", + "win/dpi_setup.h", + "win/foreground_helper.cc", + "win/foreground_helper.h", + "win/hidden_window.cc", + "win/hidden_window.h", + "win/hwnd_subclass.cc", + "win/hwnd_subclass.h", + "win/internal_constants.cc", + "win/internal_constants.h", + "win/lock_state.cc", + "win/lock_state.h", + "win/message_box_win.cc", + "win/message_box_win.h", + "win/mouse_wheel_util.cc", + "win/mouse_wheel_util.h", + "win/scoped_ole_initializer.cc", + "win/scoped_ole_initializer.h", + "win/shell.cc", + "win/shell.h", + "win/touch_input.cc", + "win/touch_input.h", + "win/window_event_target.cc", + "win/window_event_target.h", + "window_open_disposition.cc", + "window_open_disposition.h", + "work_area_watcher_observer.h", + "x/x11_menu_list.cc", + "x/x11_menu_list.h", + "x/x11_util.cc", + "x/x11_util.h", + "x/x11_util_internal.h", + ] + + if (is_win) { + sources += [ "touch/touch_device_win.cc" ] + } else if (is_android) { + sources += [ "touch/touch_device_android.cc" ] + } else if (use_ozone) { + sources += [ "touch/touch_device_ozone.cc" ] + } else if (use_aura && use_x11) { + sources += [ "touch/touch_device_aurax11.cc" ] + } else { + # Empty implementation for all other cases. + sources += [ "touch/touch_device.cc" ] + } + + defines = [ "UI_BASE_IMPLEMENTATION" ] + + deps = [ + "//base", + "//base/third_party/dynamic_annotations", + "//base:base_static", + "//base:i18n", + "//net", + "//skia", + "//third_party/icu", + "//ui/resources", + "//ui/resources:unscaled_resources", + "//ui/strings", + "//ui/webui/resources", + "//url", + ] + + if (is_ios) { + sources += [ + "l10n/l10n_util_mac.h", + "l10n/l10n_util_mac.mm", + ] + } + + if (toolkit_views) { + deps += [ + "//ui/events", + ] + } + + if (use_x11 && use_aura) { + sources += [ + "x/selection_owner.cc", + "x/selection_owner.h", + "x/selection_requestor.cc", + "x/selection_requestor.h", + "x/selection_utils.cc", + "x/selection_utils.h", + ] + } + + if (use_aura) { + deps += [ + "//ui/events", + ] + } else { + sources -= [ + "cursor/cursor.cc", + "cursor/cursor.h", + "dragdrop/drag_utils_aura.cc", + ] + } + if (!use_x11) { + sources -= [ + "x/x11_util.cc", + "x/x11_util.h", + "x/x11_util_internal.h", + ] + } + + if (!use_aura || !is_linux) { + sources -= [ + "resource/resource_bundle_auralinux.cc", + ] + } + + if (use_aura && is_win) { + sources -= [ + "dragdrop/drag_utils_aura.cc", + ] + } + + if (is_linux) { + configs += [ + "//build/config/linux:fontconfig", + "//build/config/linux:glib", + ] + } + + if ((is_linux && !is_chromeos) || is_chromeos) { + if (!toolkit_views && !use_aura) { + sources -= [ + "dragdrop/drag_utils.cc", + "dragdrop/drag_utils.h", + ] + } + } + + if (use_pango) { + configs += [ + "//build/config/linux:pangocairo", + ] + } + + if (is_chromeos || (use_aura && is_linux && !use_x11)) { + sources += [ + "dragdrop/os_exchange_data_provider_aura.cc", + "dragdrop/os_exchange_data_provider_aura.h", + ] + } + + libs = [] + if (is_win) { + deps += [ + "//third_party/wtl", + ] + cflags = [ + "/wd4267", # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int. + "/wd4324", # Structure was padded due to __declspec(align()), which is + # uninteresting. + ] + ldflags = [ + "/DELAYLOAD:d2d1.dll", + "/DELAYLOAD:d3d10_1.dll", + "/DELAYLOAD:dwmapi.dll", + ] + libs += [ + "d2d1.lib", + "d3d10_1.lib", + "dwmapi.lib", + "imm32.lib", + "d2d1.lib", + "dwmapi.lib", + "oleacc.lib", + ] + } else { + if (!use_aura) { + sources -= [ + "view_prop.cc", + "view_prop.h", + ] + } + } + + if (is_mac) { + deps += [ + #TODO(tfarina): port this third_party component to GN. + #"//third_party/mozilla", + ] + + sources -= [ + "dragdrop/drag_utils.cc", + "dragdrop/drag_utils.h", + ] + + libs += [ + "Accelerate.framework", + "AudioUnit.framework", + "CoreView.framework", + ] + } + + if (use_x11) { + #'all_dependent_settings': { + #'ldflags': [ + #'-L<(PRODUCT_DIR)', + #], + #}, + configs += [ + "//build/config/linux:x11" + ] + } + + if (use_aura) { + if (use_x11) { + sources += [ + "cursor/cursor_loader_x11.cc", + "cursor/cursor_loader_x11.h", + "cursor/cursor_x11.cc", + ] + if (!is_chromeos) { + # These Aura X11 files aren't used on ChromeOS. + sources += [ + "dragdrop/os_exchange_data_provider_aurax11.cc", + "dragdrop/os_exchange_data_provider_aurax11.h", + ] + } + } + } + + if (!toolkit_views) { + sources -= [ + "dragdrop/drag_drop_types.h", + "dragdrop/drop_target_event.cc", + "dragdrop/drop_target_event.h", + "dragdrop/os_exchange_data.cc", + "dragdrop/os_exchange_data.h", + "nine_image_painter_factory.cc", + "nine_image_painter_factory.h", + ] + } + + if (is_android) { + sources -= [ + "default_theme_provider.cc", + "dragdrop/drag_utils.cc", + "dragdrop/drag_utils.h", + "l10n/l10n_font_util.cc", + "models/button_menu_item_model.cc", + "models/dialog_model.cc", + "theme_provider.cc", + "touch/touch_editing_controller.cc", + "ui_base_types.cc", + ] + + deps += [ + ":ui_base_jni_headers", + ] + + libs += [ + "jnigraphics", + ] + } + + if (is_android && is_android_webview_build) { + deps += [ + #TODO(GYP): port this component to GN. + #"//ui/android:ui_java", + ] + } + + if (is_android && !use_aura) { + sources -= [ + "cursor/cursor_android.cc", + ] + } + + # Aura clipboard. + if (use_aura) { + if (use_x11) { + sources += [ "clipboard/clipboard_aurax11.cc" ] + } else if (!is_win) { + # This file is used for all non-X11, non-Windows aura Builds. + sources += [ "clipboard/clipboard_aura.cc" ] + } + } + + if (is_android || is_ios) { + sources -= [ + "device_form_factor_desktop.cc", + ] + } +} + +source_set("ui_base_test_support") { + sources = [ + "test/ui_controls.h", + "test/ui_controls_aura.cc", + "test/ui_controls_internal_win.cc", + "test/ui_controls_internal_win.h", + "test/ui_controls_mac.mm", + "test/ui_controls_win.cc", + ] + + deps = [ + "//base", + "//skia", + "//testing/gtest", + "//ui/events:events_base", + "//ui/gfx", + "//ui/gfx/geometry", + ] + + if (!is_ios) { + sources += [ + "ime/dummy_input_method.cc", + "ime/dummy_input_method.h", + "ime/dummy_text_input_client.cc", + "ime/dummy_text_input_client.h", + ] + } +} + +if (is_android) { + generate_jni("ui_base_jni_headers") { + sources = [ + "../android/java/src/org/chromium/ui/base/Clipboard.java", + "../android/java/src/org/chromium/ui/base/DeviceFormFactor.java", + "../android/java/src/org/chromium/ui/base/LocalizationUtils.java", + "../android/java/src/org/chromium/ui/base/SelectFileDialog.java", + "../android/java/src/org/chromium/ui/base/TouchDevice.java", + "../android/java/src/org/chromium/ui/base/ViewAndroid.java", + "../android/java/src/org/chromium/ui/base/WindowAndroid.java", + ] + jni_package = "base" + } +} diff --git a/chromium/ui/base/DEPS b/chromium/ui/base/DEPS index 99ec1517405..dd9bbe8d08d 100644 --- a/chromium/ui/base/DEPS +++ b/chromium/ui/base/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "+cc", "+grit/app_locale_settings.h", "+grit/ui_resources.h", "+grit/ui_strings.h", diff --git a/chromium/ui/base/accelerators/accelerator.cc b/chromium/ui/base/accelerators/accelerator.cc index 4439af51dbe..3ed80fa1e07 100644 --- a/chromium/ui/base/accelerators/accelerator.cc +++ b/chromium/ui/base/accelerators/accelerator.cc @@ -6,8 +6,6 @@ #if defined(OS_WIN) #include <windows.h> -#elif defined(TOOLKIT_GTK) -#include <gdk/gdk.h> #endif #include "base/i18n/rtl.h" @@ -26,19 +24,22 @@ namespace ui { Accelerator::Accelerator() : key_code_(ui::VKEY_UNKNOWN), type_(ui::ET_KEY_PRESSED), - modifiers_(0) { + modifiers_(0), + is_repeat_(false) { } Accelerator::Accelerator(KeyboardCode keycode, int modifiers) : key_code_(keycode), type_(ui::ET_KEY_PRESSED), - modifiers_(modifiers) { + modifiers_(modifiers), + is_repeat_(false) { } Accelerator::Accelerator(const Accelerator& accelerator) { key_code_ = accelerator.key_code_; type_ = accelerator.type_; modifiers_ = accelerator.modifiers_; + is_repeat_ = accelerator.is_repeat_; if (accelerator.platform_accelerator_.get()) platform_accelerator_ = accelerator.platform_accelerator_->CreateCopy(); } @@ -51,6 +52,7 @@ Accelerator& Accelerator::operator=(const Accelerator& accelerator) { key_code_ = accelerator.key_code_; type_ = accelerator.type_; modifiers_ = accelerator.modifiers_; + is_repeat_ = accelerator.is_repeat_; if (accelerator.platform_accelerator_.get()) platform_accelerator_ = accelerator.platform_accelerator_->CreateCopy(); else @@ -68,14 +70,15 @@ bool Accelerator::operator <(const Accelerator& rhs) const { } bool Accelerator::operator ==(const Accelerator& rhs) const { - if (platform_accelerator_.get() != rhs.platform_accelerator_.get() && - ((!platform_accelerator_.get() || !rhs.platform_accelerator_.get()) || - !platform_accelerator_->Equals(*rhs.platform_accelerator_))) { - return false; - } + if ((key_code_ == rhs.key_code_) && (type_ == rhs.type_) && + (modifiers_ == rhs.modifiers_)) + return true; + + bool platform_equal = + platform_accelerator_.get() && rhs.platform_accelerator_.get() && + platform_accelerator_.get() == rhs.platform_accelerator_.get(); - return (key_code_ == rhs.key_code_) && (type_ == rhs.type_) && - (modifiers_ == rhs.modifiers_); + return platform_equal; } bool Accelerator::operator !=(const Accelerator& rhs) const { @@ -98,6 +101,10 @@ bool Accelerator::IsCmdDown() const { return (modifiers_ & EF_COMMAND_DOWN) != 0; } +bool Accelerator::IsRepeat() const { + return is_repeat_; +} + base::string16 Accelerator::GetShortcutText() const { int string_id = 0; switch (key_code_) { @@ -191,23 +198,6 @@ base::string16 Accelerator::GetShortcutText() const { if (c != 0) shortcut += static_cast<base::string16::value_type>(base::ToUpperASCII(c)); -#elif defined(TOOLKIT_GTK) - const gchar* name = NULL; - switch (key_code_) { - case ui::VKEY_OEM_2: - name = static_cast<const gchar*>("/"); - break; - default: - name = gdk_keyval_name(gdk_keyval_to_lower(key_code_)); - break; - } - if (name) { - if (name[0] != 0 && name[1] == 0) - shortcut += - static_cast<base::string16::value_type>(g_ascii_toupper(name[0])); - else - shortcut += UTF8ToUTF16(name); - } #endif } else { shortcut = l10n_util::GetStringUTF16(string_id); @@ -262,7 +252,7 @@ base::string16 Accelerator::GetShortcutText() const { if (adjust_shortcut_for_rtl) { int key_length = static_cast<int>(shortcut_rtl.length()); DCHECK_GT(key_length, 0); - shortcut_rtl.append(ASCIIToUTF16("+")); + shortcut_rtl.append(base::ASCIIToUTF16("+")); // Subtracting the size of the shortcut key and 1 for the '+' sign. shortcut_rtl.append(shortcut, 0, shortcut.length() - key_length - 1); diff --git a/chromium/ui/base/accelerators/accelerator.h b/chromium/ui/base/accelerators/accelerator.h index 020c7bea40c..430a209f41c 100644 --- a/chromium/ui/base/accelerators/accelerator.h +++ b/chromium/ui/base/accelerators/accelerator.h @@ -14,7 +14,7 @@ #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "ui/base/accelerators/platform_accelerator.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/events/event_constants.h" #include "ui/events/keycodes/keyboard_codes.h" @@ -24,7 +24,7 @@ class PlatformAccelerator; // This is a cross-platform class for accelerator keys used in menus. // |platform_accelerator| should be used to store platform specific data. -class UI_EXPORT Accelerator { +class UI_BASE_EXPORT Accelerator { public: Accelerator(); Accelerator(ui::KeyboardCode keycode, int modifiers); @@ -54,6 +54,7 @@ class UI_EXPORT Accelerator { bool IsCtrlDown() const; bool IsAltDown() const; bool IsCmdDown() const; + bool IsRepeat() const; // Returns a string with the localized shortcut if any. base::string16 GetShortcutText() const; @@ -67,6 +68,7 @@ class UI_EXPORT Accelerator { return platform_accelerator_.get(); } + void set_is_repeat(bool is_repeat) { is_repeat_ = is_repeat; } protected: // The keycode (VK_...). @@ -78,13 +80,16 @@ class UI_EXPORT Accelerator { // The state of the Shift/Ctrl/Alt keys. int modifiers_; + // True if the accelerator is created for an auto repeated key event. + bool is_repeat_; + // Stores platform specific data. May be NULL. scoped_ptr<PlatformAccelerator> platform_accelerator_; }; // An interface that classes that want to register for keyboard accelerators // should implement. -class UI_EXPORT AcceleratorTarget { +class UI_BASE_EXPORT AcceleratorTarget { public: // Should return true if the accelerator was processed. virtual bool AcceleratorPressed(const Accelerator& accelerator) = 0; diff --git a/chromium/ui/base/accelerators/accelerator_manager.h b/chromium/ui/base/accelerators/accelerator_manager.h index 818dc3ea05a..0e33ad659aa 100644 --- a/chromium/ui/base/accelerators/accelerator_manager.h +++ b/chromium/ui/base/accelerators/accelerator_manager.h @@ -11,13 +11,13 @@ #include "base/basictypes.h" #include "ui/base/accelerators/accelerator.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/events/event_constants.h" namespace ui { // The AcceleratorManger is used to handle keyboard accelerators. -class UI_EXPORT AcceleratorManager { +class UI_BASE_EXPORT AcceleratorManager { public: enum HandlerPriority { kNormalPriority, diff --git a/chromium/ui/base/accelerators/menu_label_accelerator_util_linux.h b/chromium/ui/base/accelerators/menu_label_accelerator_util_linux.h index 6cc9b5f17c6..bd8d3cf14aa 100644 --- a/chromium/ui/base/accelerators/menu_label_accelerator_util_linux.h +++ b/chromium/ui/base/accelerators/menu_label_accelerator_util_linux.h @@ -7,22 +7,24 @@ #include <string> -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { // Change windows accelerator style to GTK style. (GTK uses _ for // accelerators. Windows uses & with && as an escape for &.) -UI_EXPORT std::string ConvertAcceleratorsFromWindowsStyle( +UI_BASE_EXPORT std::string ConvertAcceleratorsFromWindowsStyle( const std::string& label); // Removes the "&" accelerators from a Windows label. -UI_EXPORT std::string RemoveWindowsStyleAccelerators(const std::string& label); +UI_BASE_EXPORT std::string RemoveWindowsStyleAccelerators( + const std::string& label); // Escapes "&" characters by doubling them so that later calling // ConvertAcceleratorsFromWindowsStyle() will return the original string (except // with "_" characters doubled, to escape them for GTK). -UI_EXPORT std::string EscapeWindowsStyleAccelerators(const std::string& label); +UI_BASE_EXPORT std::string EscapeWindowsStyleAccelerators( + const std::string& label); } // namespace ui diff --git a/chromium/ui/base/accelerators/platform_accelerator.h b/chromium/ui/base/accelerators/platform_accelerator.h index 1b46003ea91..cca8021f2e1 100644 --- a/chromium/ui/base/accelerators/platform_accelerator.h +++ b/chromium/ui/base/accelerators/platform_accelerator.h @@ -6,12 +6,12 @@ #define UI_BASE_ACCELERATORS_PLATFORM_ACCELERATOR_H_ #include "base/memory/scoped_ptr.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { // Abstract base class for platform specific accelerator keys. -class UI_EXPORT PlatformAccelerator { +class UI_BASE_EXPORT PlatformAccelerator { public: virtual ~PlatformAccelerator() {} diff --git a/chromium/ui/base/accelerators/platform_accelerator_cocoa.h b/chromium/ui/base/accelerators/platform_accelerator_cocoa.h index 30941c77bb2..3f72cacd84a 100644 --- a/chromium/ui/base/accelerators/platform_accelerator_cocoa.h +++ b/chromium/ui/base/accelerators/platform_accelerator_cocoa.h @@ -13,7 +13,7 @@ namespace ui { // This is a Mac specific class for specifing accelerator keys. -class UI_EXPORT PlatformAcceleratorCocoa : public PlatformAccelerator { +class UI_BASE_EXPORT PlatformAcceleratorCocoa : public PlatformAccelerator { public: PlatformAcceleratorCocoa(); PlatformAcceleratorCocoa(NSString* key_code, NSUInteger modifier_mask); @@ -23,7 +23,10 @@ class UI_EXPORT PlatformAcceleratorCocoa : public PlatformAccelerator { virtual scoped_ptr<PlatformAccelerator> CreateCopy() const OVERRIDE; virtual bool Equals(const PlatformAccelerator& rhs) const OVERRIDE; + // The keyEquivalent of the NSMenuItem associated with the accelerator. NSString* characters() const { return characters_.get(); } + // The keyEquivalentModifierMask of the NSMenuItem associated with the + // accelerator. NSUInteger modifier_mask() const { return modifier_mask_; } private: diff --git a/chromium/ui/base/accelerators/platform_accelerator_gtk.cc b/chromium/ui/base/accelerators/platform_accelerator_gtk.cc deleted file mode 100644 index 5662452a530..00000000000 --- a/chromium/ui/base/accelerators/platform_accelerator_gtk.cc +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/accelerators/platform_accelerator_gtk.h" - -#include "ui/events/keycodes/keyboard_code_conversion_gtk.h" - -namespace ui { - -namespace { - -int GdkModifierToEventFlag(GdkModifierType gdk_modifier) { - int event_flags = 0; - if (gdk_modifier & GDK_SHIFT_MASK) - event_flags |= EF_SHIFT_DOWN; - if (gdk_modifier & GDK_CONTROL_MASK) - event_flags |= EF_CONTROL_DOWN; - if (gdk_modifier & GDK_MOD1_MASK) - event_flags |= EF_ALT_DOWN; - return event_flags; -} - -GdkModifierType EventFlagToGdkModifier(int event_flag) { - int modifier = 0; - if (event_flag & EF_SHIFT_DOWN) - modifier |= GDK_SHIFT_MASK; - if (event_flag & EF_CONTROL_DOWN) - modifier |= GDK_CONTROL_MASK; - if (event_flag & EF_ALT_DOWN) - modifier |= GDK_MOD1_MASK; - return static_cast<GdkModifierType>(modifier); -} - -} // namespace - -PlatformAcceleratorGtk::PlatformAcceleratorGtk() - : gdk_key_code_(0), - gdk_modifier_(static_cast<GdkModifierType>(0)) { -} - -PlatformAcceleratorGtk::PlatformAcceleratorGtk(guint gdk_key_code, - GdkModifierType gdk_modifier) - : gdk_key_code_(gdk_key_code), - gdk_modifier_(gdk_modifier) { -} - -PlatformAcceleratorGtk::~PlatformAcceleratorGtk() { -} - -scoped_ptr<PlatformAccelerator> PlatformAcceleratorGtk::CreateCopy() const { - scoped_ptr<PlatformAcceleratorGtk> copy(new PlatformAcceleratorGtk); - copy->gdk_key_code_ = gdk_key_code_; - copy->gdk_modifier_ = gdk_modifier_; - return scoped_ptr<PlatformAccelerator>(copy.release()); -} - -bool PlatformAcceleratorGtk::Equals(const PlatformAccelerator& rhs) const { - const PlatformAcceleratorGtk& rhs_gtk = - static_cast<const PlatformAcceleratorGtk&>(rhs); - return gdk_key_code_ == rhs_gtk.gdk_key_code_ && - gdk_modifier_ == rhs_gtk.gdk_modifier_; -} - -Accelerator AcceleratorForGdkKeyCodeAndModifier(guint gdk_key_code, - GdkModifierType gdk_modifier) { - ui::Accelerator accelerator(ui::WindowsKeyCodeForGdkKeyCode(gdk_key_code), - ui::GdkModifierToEventFlag(gdk_modifier)); - scoped_ptr<PlatformAccelerator> platform_accelerator( - new PlatformAcceleratorGtk(gdk_key_code, gdk_modifier)); - accelerator.set_platform_accelerator(platform_accelerator.Pass()); - return accelerator; -} - -guint GetGdkKeyCodeForAccelerator(const Accelerator& accelerator) { - if (accelerator.platform_accelerator()) { - return static_cast<const PlatformAcceleratorGtk*>( - accelerator.platform_accelerator())->gdk_key_code(); - } - // The second parameter is false because accelerator keys are expressed in - // terms of the non-shift-modified key. - return GdkKeyCodeForWindowsKeyCode(accelerator.key_code(), false); -} - -GdkModifierType GetGdkModifierForAccelerator(const Accelerator& accelerator) { - if (accelerator.platform_accelerator()) { - return static_cast<const PlatformAcceleratorGtk*>( - accelerator.platform_accelerator())->gdk_modifier(); - } - return EventFlagToGdkModifier(accelerator.modifiers()); -} - -} // namespace ui diff --git a/chromium/ui/base/accelerators/platform_accelerator_gtk.h b/chromium/ui/base/accelerators/platform_accelerator_gtk.h deleted file mode 100644 index 87900ddf858..00000000000 --- a/chromium/ui/base/accelerators/platform_accelerator_gtk.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_ACCELERATORS_PLATFORM_ACCELERATOR_GTK_H_ -#define UI_BASE_ACCELERATORS_PLATFORM_ACCELERATOR_GTK_H_ - -#include <gdk/gdk.h> - -#include "base/compiler_specific.h" -#include "ui/base/accelerators/accelerator.h" -#include "ui/base/accelerators/platform_accelerator.h" - -namespace ui { - -class Accelerator; - -// This is a GTK specific class for specifing accelerator keys. -class UI_EXPORT PlatformAcceleratorGtk : public PlatformAccelerator { - public: - PlatformAcceleratorGtk(); - PlatformAcceleratorGtk(guint gdk_key_code, GdkModifierType gdk_modifier); - virtual ~PlatformAcceleratorGtk(); - - // PlatformAccelerator: - virtual scoped_ptr<PlatformAccelerator> CreateCopy() const OVERRIDE; - virtual bool Equals(const PlatformAccelerator& rhs) const OVERRIDE; - - guint gdk_key_code() const { return gdk_key_code_; } - GdkModifierType gdk_modifier() const { return gdk_modifier_; } - - private: - guint gdk_key_code_; - GdkModifierType gdk_modifier_; - - DISALLOW_COPY_AND_ASSIGN(PlatformAcceleratorGtk); -}; - -UI_EXPORT Accelerator AcceleratorForGdkKeyCodeAndModifier( - guint gdk_key_code, - GdkModifierType gdk_modifier); -UI_EXPORT guint GetGdkKeyCodeForAccelerator(const Accelerator& accelerator); -UI_EXPORT GdkModifierType GetGdkModifierForAccelerator( - const Accelerator& accelerator); - -} // namespace ui - -#endif // UI_BASE_ACCELERATORS_PLATFORM_ACCELERATOR_GTK_H_ diff --git a/chromium/ui/base/accessibility/OWNERS b/chromium/ui/base/accessibility/OWNERS deleted file mode 100644 index c32e0598455..00000000000 --- a/chromium/ui/base/accessibility/OWNERS +++ /dev/null @@ -1 +0,0 @@ -dmazzoni@chromium.org diff --git a/chromium/ui/base/accessibility/accessibility_types.h b/chromium/ui/base/accessibility/accessibility_types.h deleted file mode 100644 index 91e497412be..00000000000 --- a/chromium/ui/base/accessibility/accessibility_types.h +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_ACCESSIBILITY_ACCESSIBILITY_TYPES_H_ -#define UI_BASE_ACCESSIBILITY_ACCESSIBILITY_TYPES_H_ - -#include "base/basictypes.h" - -namespace ui { - -//////////////////////////////////////////////////////////////////////////////// -// -// AccessibilityTypes -// -// Provides enumerations used to preserve platform-independence in -// accessibility functions. -// -//////////////////////////////////////////////////////////////////////////////// -class AccessibilityTypes { - public: - - // This defines states of the supported accessibility roles in our - // Views (e.g. used in View::GetAccessibleState). Any interface using states - // must provide a conversion to its own states (see e.g. - // NativeViewAccessibilityWin::get_accState). - typedef uint32 State; - enum StateFlag { - STATE_CHECKED = 1 << 0, - STATE_COLLAPSED = 1 << 1, - STATE_DEFAULT = 1 << 2, - STATE_EDITABLE = 1 << 3, - STATE_EXPANDED = 1 << 4, - STATE_FOCUSED = 1 << 5, - STATE_HASPOPUP = 1 << 6, - STATE_HOTTRACKED = 1 << 7, - STATE_INVISIBLE = 1 << 8, - STATE_LINKED = 1 << 9, - STATE_OFFSCREEN = 1 << 10, - STATE_PRESSED = 1 << 11, - STATE_PROTECTED = 1 << 12, - STATE_READONLY = 1 << 13, - STATE_SELECTED = 1 << 14, - STATE_UNAVAILABLE = 1 << 15 - }; - - // This defines an enumeration of the supported accessibility roles in our - // Views (e.g. used in View::GetAccessibleRole). Any interface using roles - // must provide a conversion to its own roles (see e.g. - // NativeViewAccessibilityWin::get_accRole). - enum Role { - ROLE_ALERT, - ROLE_APPLICATION, - ROLE_BUTTONDROPDOWN, - ROLE_BUTTONMENU, - ROLE_CHECKBUTTON, - ROLE_CLIENT, - ROLE_COMBOBOX, - ROLE_DIALOG, - ROLE_GRAPHIC, - ROLE_GROUPING, - ROLE_LINK, - ROLE_LOCATION_BAR, - ROLE_MENUBAR, - ROLE_MENUITEM, - ROLE_MENUPOPUP, - ROLE_OUTLINE, - ROLE_OUTLINEITEM, - ROLE_PAGETAB, - ROLE_PAGETABLIST, - ROLE_PANE, - ROLE_PROGRESSBAR, - ROLE_PUSHBUTTON, - ROLE_RADIOBUTTON, - ROLE_SCROLLBAR, - ROLE_SEPARATOR, - ROLE_SLIDER, - ROLE_STATICTEXT, - ROLE_TEXT, - ROLE_TITLEBAR, - ROLE_TOOLBAR, - ROLE_WINDOW - }; - - // This defines an enumeration of the supported accessibility events in our - // Views (e.g. used in View::NotifyAccessibilityEvent). Any interface using - // events must provide a conversion to its own events (see e.g. - // ViewAccessibility::MSAAEvent). - enum Event { - EVENT_ALERT, - EVENT_FOCUS, - EVENT_MENUSTART, - EVENT_MENUEND, - EVENT_MENUPOPUPSTART, - EVENT_MENUPOPUPEND, - EVENT_NAME_CHANGED, - EVENT_TEXT_CHANGED, - EVENT_SELECTION_CHANGED, - EVENT_VALUE_CHANGED - }; - - private: - // Do not instantiate this class. - AccessibilityTypes() {} - ~AccessibilityTypes() {} -}; - -} // namespace ui - -#endif // UI_BASE_ACCESSIBILITY_ACCESSIBILITY_TYPES_H_ diff --git a/chromium/ui/base/accessibility/accessible_text_utils.cc b/chromium/ui/base/accessibility/accessible_text_utils.cc deleted file mode 100644 index a878b23d476..00000000000 --- a/chromium/ui/base/accessibility/accessible_text_utils.cc +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/accessibility/accessible_text_utils.h" - -#include "base/logging.h" -#include "base/strings/string_util.h" - -namespace ui { - -size_t FindAccessibleTextBoundary(const base::string16& text, - const std::vector<int>& line_breaks, - TextBoundaryType boundary, - size_t start_offset, - TextBoundaryDirection direction) { - size_t text_size = text.size(); - DCHECK(start_offset <= text_size); - - if (boundary == CHAR_BOUNDARY) { - if (direction == FORWARDS_DIRECTION && start_offset < text_size) - return start_offset + 1; - else - return start_offset; - } else if (boundary == LINE_BOUNDARY) { - if (direction == FORWARDS_DIRECTION) { - for (size_t j = 0; j < line_breaks.size(); ++j) { - size_t line_break = line_breaks[j] >= 0 ? line_breaks[j] : 0; - if (line_break > start_offset) - return line_break; - } - return text_size; - } else { - // Note: j is unsigned, so for loop continues until j wraps around - // and becomes greater than the starting value. - for (size_t j = line_breaks.size() - 1; - j < line_breaks.size(); - --j) { - size_t line_break = line_breaks[j] >= 0 ? line_breaks[j] : 0; - if (line_break <= start_offset) - return line_break; - } - return 0; - } - } - - size_t result = start_offset; - for (;;) { - size_t pos; - if (direction == FORWARDS_DIRECTION) { - if (result >= text_size) - return text_size; - pos = result; - } else { - if (result == 0) - return 0; - pos = result - 1; - } - - switch (boundary) { - case CHAR_BOUNDARY: - case LINE_BOUNDARY: - NOTREACHED(); // These are handled above. - break; - case WORD_BOUNDARY: - if (IsWhitespace(text[pos])) - return result; - break; - case PARAGRAPH_BOUNDARY: - if (text[pos] == '\n') - return result; - break; - case SENTENCE_BOUNDARY: - if ((text[pos] == '.' || text[pos] == '!' || text[pos] == '?') && - (pos == text_size - 1 || IsWhitespace(text[pos + 1]))) { - return result; - } - break; - case ALL_BOUNDARY: - default: - break; - } - - if (direction == FORWARDS_DIRECTION) { - result++; - } else { - result--; - } - } -} - -} // Namespace ui diff --git a/chromium/ui/base/accessibility/accessible_text_utils.h b/chromium/ui/base/accessibility/accessible_text_utils.h deleted file mode 100644 index a64088c7f94..00000000000 --- a/chromium/ui/base/accessibility/accessible_text_utils.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_ACCESSIBILITY_ACCESSIBLE_TEXT_UTILS_H_ -#define UI_BASE_ACCESSIBILITY_ACCESSIBLE_TEXT_UTILS_H_ - -#include <vector> - -#include "base/basictypes.h" -#include "base/strings/string16.h" -#include "ui/base/ui_export.h" - -namespace ui { - -// Boundaries that can be passed to FindAccessibleTextBoundary, -// representing various visual boundaries in (potentially multi-line) -// text. This is used by assistive technology in order to, for example, -// retrieve the nearest word to the cursor, or retrieve all of the -// text from the current cursor position to the end of the line. -// These should be self-explanatory; "line" here refers to the visual -// line as currently displayed (possibly affected by wrapping). -enum TextBoundaryType { - CHAR_BOUNDARY, - WORD_BOUNDARY, - LINE_BOUNDARY, - SENTENCE_BOUNDARY, - PARAGRAPH_BOUNDARY, - ALL_BOUNDARY -}; - -// A direction when searching for the next boundary. -enum TextBoundaryDirection { - // Search forwards for the next boundary past the starting position. - FORWARDS_DIRECTION, - // Search backwards for the previous boundary before the starting position. - BACKWARDS_DIRECTION -}; - -// Convenience method needed to implement platform-specific text -// accessibility APIs like IAccessible2. Search forwards or backwards -// (depending on |direction|) from the given |start_offset| until the -// given boundary is found, and return the offset of that boundary, -// using the vector of line break character offsets in |line_breaks|. -size_t UI_EXPORT FindAccessibleTextBoundary(const base::string16& text, - const std::vector<int>& line_breaks, - TextBoundaryType boundary, - size_t start_offset, - TextBoundaryDirection direction); - -} // namespace ui - -#endif // UI_BASE_ACCESSIBILITY_ACCESSIBLE_TEXT_UTILS_H_ diff --git a/chromium/ui/base/accessibility/accessible_view_state.cc b/chromium/ui/base/accessibility/accessible_view_state.cc deleted file mode 100644 index ff1d3e69259..00000000000 --- a/chromium/ui/base/accessibility/accessible_view_state.cc +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/accessibility/accessible_view_state.h" - -namespace ui { - -AccessibleViewState::AccessibleViewState() - : role(AccessibilityTypes::ROLE_CLIENT), - state(0), - selection_start(-1), - selection_end(-1), - index(-1), - count(-1) { } - -AccessibleViewState::~AccessibleViewState() { } - -} // namespace ui diff --git a/chromium/ui/base/accessibility/accessible_view_state.h b/chromium/ui/base/accessibility/accessible_view_state.h deleted file mode 100644 index 2f4b4bffaac..00000000000 --- a/chromium/ui/base/accessibility/accessible_view_state.h +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_ACCESSIBILITY_ACCESSIBLE_VIEW_STATE_H_ -#define UI_BASE_ACCESSIBILITY_ACCESSIBLE_VIEW_STATE_H_ - -#include "base/basictypes.h" -#include "base/callback.h" -#include "base/strings/string16.h" -#include "ui/base/accessibility/accessibility_types.h" -#include "ui/base/ui_export.h" - -namespace ui { - -//////////////////////////////////////////////////////////////////////////////// -// -// AccessibleViewState -// -// A cross-platform struct for storing the core accessibility information -// that should be provided about any UI view to assistive technology (AT). -// -//////////////////////////////////////////////////////////////////////////////// -struct UI_EXPORT AccessibleViewState { - public: - AccessibleViewState(); - ~AccessibleViewState(); - - // The view's role, like button or list box. - AccessibilityTypes::Role role; - - // The view's state, a bitmask containing fields such as checked - // (for a checkbox) and protected (for a password text box). - AccessibilityTypes::State state; - - // The view's name / label. - base::string16 name; - - // The view's value, for example the text content. - base::string16 value; - - // The name of the default action if the user clicks on this view. - base::string16 default_action; - - // The keyboard shortcut to activate this view, if any. - base::string16 keyboard_shortcut; - - // The selection start and end. Only applies to views with text content, - // such as a text box or combo box; start and end should be -1 otherwise. - int selection_start; - int selection_end; - - // The selected item's index and the count of the number of items. - // Only applies to views with multiple choices like a listbox; both - // index and count should be -1 otherwise. - int index; - int count; - - // An optional callback that can be used by accessibility clients to - // set the string value of this view. This only applies to roles where - // setting the value makes sense, like a text box. Not often used by - // screen readers, but often used by automation software to script - // things like logging into portals or filling forms. - // - // This callback is only valid for the lifetime of the view, and should - // be a safe no-op if the view is deleted. Typically, accessible views - // should use a WeakPtr when binding the callback. - base::Callback<void(const base::string16&)> set_value_callback; -}; - -} // namespace ui - -#endif // UI_BASE_ACCESSIBILITY_ACCESSIBLE_VIEW_STATE_H_ diff --git a/chromium/ui/base/android/view_android.cc b/chromium/ui/base/android/view_android.cc index ffb510f672d..30e43164409 100644 --- a/chromium/ui/base/android/view_android.cc +++ b/chromium/ui/base/android/view_android.cc @@ -5,7 +5,7 @@ #include "ui/base/android/view_android.h" #include "base/android/jni_android.h" -#include "base/android/jni_helper.h" +#include "base/android/jni_weak_ref.h" #include "base/android/scoped_java_ref.h" #include "jni/ViewAndroid_jni.h" #include "ui/base/android/window_android.h" diff --git a/chromium/ui/base/android/view_android.h b/chromium/ui/base/android/view_android.h index 7bd334d29aa..0205fdf1414 100644 --- a/chromium/ui/base/android/view_android.h +++ b/chromium/ui/base/android/view_android.h @@ -6,9 +6,9 @@ #define UI_BASE_ANDROID_VIEW_ANDROID_H_ #include <jni.h> -#include "base/android/jni_helper.h" +#include "base/android/jni_weak_ref.h" #include "base/android/scoped_java_ref.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { @@ -16,7 +16,7 @@ class WindowAndroid; // This class is the native counterpart for ViewAndroid. It is owned by the // Java ViewAndroid object. -class UI_EXPORT ViewAndroid { +class UI_BASE_EXPORT ViewAndroid { public: ViewAndroid(JNIEnv* env, jobject obj, WindowAndroid* window); diff --git a/chromium/ui/base/android/window_android.cc b/chromium/ui/base/android/window_android.cc index bacf023dbfb..490c6f3b545 100644 --- a/chromium/ui/base/android/window_android.cc +++ b/chromium/ui/base/android/window_android.cc @@ -6,9 +6,10 @@ #include "base/android/jni_android.h" #include "base/android/jni_array.h" -#include "base/android/jni_helper.h" +#include "base/android/jni_weak_ref.h" #include "base/android/scoped_java_ref.h" #include "jni/WindowAndroid_jni.h" +#include "ui/base/android/window_android_compositor.h" #include "ui/base/android/window_android_observer.h" namespace ui { @@ -16,8 +17,10 @@ namespace ui { using base::android::AttachCurrentThread; using base::android::ScopedJavaLocalRef; -WindowAndroid::WindowAndroid(JNIEnv* env, jobject obj) - : weak_java_window_(env, obj) { +WindowAndroid::WindowAndroid(JNIEnv* env, jobject obj, jlong vsync_period) + : weak_java_window_(env, obj), + compositor_(NULL), + vsync_period_(base::TimeDelta::FromInternalValue(vsync_period)) { } void WindowAndroid::Destroy(JNIEnv* env, jobject obj) { @@ -33,22 +36,7 @@ bool WindowAndroid::RegisterWindowAndroid(JNIEnv* env) { } WindowAndroid::~WindowAndroid() { -} - -bool WindowAndroid::GrabSnapshot( - int content_x, int content_y, int width, int height, - std::vector<unsigned char>* png_representation) { - JNIEnv* env = AttachCurrentThread(); - ScopedJavaLocalRef<jbyteArray> result = - Java_WindowAndroid_grabSnapshot(env, GetJavaObject().obj(), - content_x + content_offset_.x(), - content_y + content_offset_.y(), - width, height); - if (result.is_null()) - return false; - base::android::JavaByteArrayToByteVector( - env, result.obj(), png_representation); - return true; + DCHECK(!compositor_); } void WindowAndroid::OnCompositingDidCommit() { @@ -66,25 +54,55 @@ void WindowAndroid::RemoveObserver(WindowAndroidObserver* observer) { observer_list_.RemoveObserver(observer); } -void WindowAndroid::AttachCompositor() { +void WindowAndroid::AttachCompositor(WindowAndroidCompositor* compositor) { + if (compositor_ && compositor != compositor_) + DetachCompositor(); + + compositor_ = compositor; FOR_EACH_OBSERVER(WindowAndroidObserver, observer_list_, OnAttachCompositor()); } void WindowAndroid::DetachCompositor() { + compositor_ = NULL; FOR_EACH_OBSERVER(WindowAndroidObserver, observer_list_, OnDetachCompositor()); observer_list_.Clear(); } +void WindowAndroid::RequestVSyncUpdate() { + JNIEnv* env = AttachCurrentThread(); + Java_WindowAndroid_requestVSyncUpdate(env, GetJavaObject().obj()); +} + +void WindowAndroid::SetNeedsAnimate() { + if (compositor_) + compositor_->SetNeedsAnimate(); +} + +void WindowAndroid::Animate(base::TimeTicks begin_frame_time) { + FOR_EACH_OBSERVER( + WindowAndroidObserver, observer_list_, OnAnimate(begin_frame_time)); +} + +void WindowAndroid::OnVSync(JNIEnv* env, jobject obj, jlong time_micros) { + base::TimeTicks frame_time(base::TimeTicks::FromInternalValue(time_micros)); + FOR_EACH_OBSERVER( + WindowAndroidObserver, + observer_list_, + OnVSync(frame_time, vsync_period_)); + if (compositor_) + compositor_->OnVSync(frame_time, vsync_period_); +} + // ---------------------------------------------------------------------------- // Native JNI methods // ---------------------------------------------------------------------------- -jlong Init(JNIEnv* env, jobject obj) { - WindowAndroid* window = new WindowAndroid(env, obj); +jlong Init(JNIEnv* env, jobject obj, jlong vsync_period) { + WindowAndroid* window = new WindowAndroid(env, obj, vsync_period); return reinterpret_cast<intptr_t>(window); } diff --git a/chromium/ui/base/android/window_android.h b/chromium/ui/base/android/window_android.h index 1da70739344..cd8ae3408c8 100644 --- a/chromium/ui/base/android/window_android.h +++ b/chromium/ui/base/android/window_android.h @@ -7,20 +7,22 @@ #include <jni.h> #include <vector> -#include "base/android/jni_helper.h" +#include "base/android/jni_weak_ref.h" #include "base/android/scoped_java_ref.h" #include "base/observer_list.h" -#include "ui/base/ui_export.h" +#include "base/time/time.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/vector2d_f.h" namespace ui { +class WindowAndroidCompositor; class WindowAndroidObserver; // Android implementation of the activity window. -class UI_EXPORT WindowAndroid { +class UI_BASE_EXPORT WindowAndroid { public: - WindowAndroid(JNIEnv* env, jobject obj); + WindowAndroid(JNIEnv* env, jobject obj, jlong vsync_period); void Destroy(JNIEnv* env, jobject obj); @@ -34,23 +36,33 @@ class UI_EXPORT WindowAndroid { content_offset_ = content_offset; } - bool GrabSnapshot(int content_x, int content_y, int width, int height, - std::vector<unsigned char>* png_representation); + gfx::Vector2dF content_offset() const { + return content_offset_; + } // Compositor callback relay. void OnCompositingDidCommit(); - void AttachCompositor(); + void AttachCompositor(WindowAndroidCompositor* compositor); void DetachCompositor(); void AddObserver(WindowAndroidObserver* observer); void RemoveObserver(WindowAndroidObserver* observer); + WindowAndroidCompositor* GetCompositor() { return compositor_; } + + void RequestVSyncUpdate(); + void SetNeedsAnimate(); + void OnVSync(JNIEnv* env, jobject obj, jlong time_micros); + void Animate(base::TimeTicks begin_frame_time); + private: ~WindowAndroid(); JavaObjectWeakGlobalRef weak_java_window_; gfx::Vector2dF content_offset_; + WindowAndroidCompositor* compositor_; + base::TimeDelta vsync_period_; ObserverList<WindowAndroidObserver> observer_list_; diff --git a/chromium/ui/base/android/window_android_compositor.h b/chromium/ui/base/android/window_android_compositor.h new file mode 100644 index 00000000000..eb55a7b13e6 --- /dev/null +++ b/chromium/ui/base/android/window_android_compositor.h @@ -0,0 +1,32 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_ANDROID_WINDOW_ANDROID_COMPOSITOR_H_ +#define UI_BASE_ANDROID_WINDOW_ANDROID_COMPOSITOR_H_ + +#include "cc/output/copy_output_request.h" +#include "ui/base/ui_base_export.h" + +namespace cc { +class Layer; +} + +namespace ui { + +// Android interface for compositor-related tasks. +class UI_BASE_EXPORT WindowAndroidCompositor { + public: + virtual ~WindowAndroidCompositor() {} + + virtual void AttachLayerForReadback(scoped_refptr<cc::Layer> layer) = 0; + virtual void RequestCopyOfOutputOnRootLayer( + scoped_ptr<cc::CopyOutputRequest> request) = 0; + virtual void OnVSync(base::TimeTicks frame_time, + base::TimeDelta vsync_period) = 0; + virtual void SetNeedsAnimate() = 0; +}; + +} // namespace ui + +#endif // UI_BASE_ANDROID_WINDOW_ANDROID_COMPOSITOR_H_ diff --git a/chromium/ui/base/android/window_android_observer.h b/chromium/ui/base/android/window_android_observer.h index 790170ec943..b9f5fbad5cf 100644 --- a/chromium/ui/base/android/window_android_observer.h +++ b/chromium/ui/base/android/window_android_observer.h @@ -5,15 +5,18 @@ #ifndef UI_BASE_ANDROID_WINDOW_ANDROID_OBSERVER_H_ #define UI_BASE_ANDROID_WINDOW_ANDROID_OBSERVER_H_ -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { -class UI_EXPORT WindowAndroidObserver { +class UI_BASE_EXPORT WindowAndroidObserver { public: virtual void OnCompositingDidCommit() = 0; virtual void OnAttachCompositor() = 0; virtual void OnDetachCompositor() = 0; + virtual void OnVSync(base::TimeTicks frame_time, + base::TimeDelta vsync_period) = 0; + virtual void OnAnimate(base::TimeTicks frame_begin_time) {} protected: virtual ~WindowAndroidObserver() {} diff --git a/chromium/ui/base/base_window.h b/chromium/ui/base/base_window.h index 73c26890b64..664616994ae 100644 --- a/chromium/ui/base/base_window.h +++ b/chromium/ui/base/base_window.h @@ -19,7 +19,7 @@ namespace ui { // Provides an interface to perform actions on windows, and query window // state. -class UI_EXPORT BaseWindow { +class UI_BASE_EXPORT BaseWindow { public: // Returns true if the window is currently the active/focused window. virtual bool IsActive() const = 0; diff --git a/chromium/ui/base/clipboard/clipboard.cc b/chromium/ui/base/clipboard/clipboard.cc index a77efd661e9..c71d5b910f1 100644 --- a/chromium/ui/base/clipboard/clipboard.cc +++ b/chromium/ui/base/clipboard/clipboard.cc @@ -163,7 +163,7 @@ void Clipboard::DispatchObject(ObjectType type, const ObjectMapParams& params) { } // Make sure the size is representable as a signed 32-bit int, so // SkBitmap::getSize() won't be truncated. - if (bitmap.getSize64().is64()) + if (!sk_64_isS32(bitmap.computeSize64())) return; // It's OK to cast away constness here since we map the handle as diff --git a/chromium/ui/base/clipboard/clipboard.h b/chromium/ui/base/clipboard/clipboard.h index f818bd6a6df..94748478614 100644 --- a/chromium/ui/base/clipboard/clipboard.h +++ b/chromium/ui/base/clipboard/clipboard.h @@ -18,11 +18,7 @@ #include "base/threading/platform_thread.h" #include "base/threading/thread_checker.h" #include "ui/base/clipboard/clipboard_types.h" -#include "ui/base/ui_export.h" - -#if defined(TOOLKIT_GTK) -#include <gdk/gdk.h> -#endif +#include "ui/base/ui_base_export.h" #if defined(OS_WIN) #include <objidl.h> @@ -45,16 +41,17 @@ class MessageWindow; } // namespace win } // namespace base +// TODO(dcheng): Temporary until the IPC layer doesn't use WriteObjects(). +namespace content { +class ClipboardMessageFilter; +} + namespace gfx { class Size; } class SkBitmap; -#if defined(TOOLKIT_GTK) -typedef struct _GtkClipboard GtkClipboard; -#endif - #ifdef __OBJC__ @class NSString; #else @@ -63,8 +60,9 @@ class NSString; namespace ui { class ClipboardTest; +class ScopedClipboardWriter; -class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { +class UI_BASE_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { public: // MIME type constants. static const char kMimeTypeText[]; @@ -75,7 +73,7 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { static const char kMimeTypePNG[]; // Platform neutral holder for native data representation of a clipboard type. - struct UI_EXPORT FormatType { + struct UI_BASE_EXPORT FormatType { FormatType(); ~FormatType(); @@ -83,19 +81,19 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { std::string Serialize() const; static FormatType Deserialize(const std::string& serialization); -#if defined(OS_WIN) || defined(USE_AURA) +#if defined(USE_AURA) // FormatType can be used in a set on some platforms. bool operator<(const FormatType& other) const; #endif #if defined(OS_WIN) const FORMATETC& ToFormatEtc() const { return data_; } +#elif defined(USE_AURA) + const std::string& ToString() const { return data_; } #elif defined(OS_MACOSX) // Custom copy and assignment constructor to handle NSString. FormatType(const FormatType& other); FormatType& operator=(const FormatType& other); -#elif defined(USE_AURA) - const std::string& ToString() const { return data_; } #endif bool Equals(const FormatType& other) const; @@ -116,18 +114,14 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { FormatType(UINT native_format, LONG index); UINT ToUINT() const { return data_.cfFormat; } FORMATETC data_; +#elif defined(USE_AURA) + explicit FormatType(const std::string& native_format); + const std::string& data() const { return data_; } + std::string data_; #elif defined(OS_MACOSX) explicit FormatType(NSString* native_format); NSString* ToNSString() const { return data_; } NSString* data_; -#elif defined(USE_AURA) - explicit FormatType(const std::string& native_format); - std::string data_; -#elif defined(TOOLKIT_GTK) - explicit FormatType(const std::string& native_format); - explicit FormatType(const GdkAtom& native_format); - const GdkAtom& ToGdkAtom() const { return data_; } - GdkAtom data_; #elif defined(OS_ANDROID) explicit FormatType(const std::string& native_format); const std::string& data() const { return data_; } @@ -139,6 +133,8 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { // Copyable and assignable, since this is essentially an opaque value type. }; + // TODO(dcheng): Make this private once the IPC layer no longer needs to + // serialize this information. // ObjectType designates the type of data to be stored in the clipboard. This // designation is shared across all OSes. The system-specific designation // is defined by FormatType. A single ObjectType might be represented by @@ -183,7 +179,7 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { switch (type) { case CLIPBOARD_TYPE_COPY_PASTE: return true; -#if defined(USE_X11) && !defined(OS_CHROMEOS) +#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS) case CLIPBOARD_TYPE_SELECTION: return true; #endif @@ -212,12 +208,6 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { // clipboard, so it shouldn't be a problem.) static void DestroyClipboardForCurrentThread(); - // Write a bunch of objects to the system clipboard. Copies are made of the - // contents of |objects|. - // Note: If you're thinking about calling this, you should probably be using - // ScopedClipboardWriter instead. - void WriteObjects(ClipboardType type, const ObjectMap& objects); - // Returns a sequence number which uniquely identifies clipboard state. // This can be used to version the data on the clipboard and determine // whether it has changed. @@ -312,10 +302,18 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { FRIEND_TEST_ALL_PREFIXES(ClipboardTest, SharedBitmapTest); FRIEND_TEST_ALL_PREFIXES(ClipboardTest, EmptyHTMLTest); friend class ClipboardTest; + // For access to WriteObjects(). + // TODO(dcheng): Remove the temporary exception for content. + friend class content::ClipboardMessageFilter; + friend class ScopedClipboardWriter; Clipboard(); ~Clipboard(); + // Write a bunch of objects to the system clipboard. Copies are made of the + // contents of |objects|. + void WriteObjects(ClipboardType type, const ObjectMap& objects); + void DispatchObject(ObjectType type, const ObjectMapParams& params); void WriteText(const char* text_data, size_t text_len); @@ -360,30 +358,6 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { // Mark this as mutable so const methods can still do lazy initialization. mutable scoped_ptr<base::win::MessageWindow> clipboard_owner_; -#elif defined(TOOLKIT_GTK) - // The public API is via WriteObjects() which dispatches to multiple - // Write*() calls, but on GTK we must write all the clipboard types - // in a single GTK call. To support this we store the current set - // of data we intend to put on the clipboard on clipboard_data_ as - // WriteObjects is running, and then at the end call SetGtkClipboard - // which replaces whatever is on the system clipboard with the - // contents of clipboard_data_. - - public: - typedef std::map<std::string, std::pair<char*, size_t> > TargetMap; - - private: - // Write changes to gtk clipboard. - void SetGtkClipboard(ClipboardType type); - // Insert a mapping into clipboard_data_. - void InsertMapping(const char* key, char* data, size_t data_len); - - // Find the gtk clipboard for the passed type enum. - GtkClipboard* LookupBackingClipboard(ClipboardType type) const; - - TargetMap* clipboard_data_; - GtkClipboard* clipboard_; - GtkClipboard* primary_selection_; #elif defined(USE_CLIPBOARD_AURAX11) private: // We keep our implementation details private because otherwise we bring in diff --git a/chromium/ui/base/clipboard/clipboard_android.cc b/chromium/ui/base/clipboard/clipboard_android.cc index f0971c448a0..e5e2a960d4d 100644 --- a/chromium/ui/base/clipboard/clipboard_android.cc +++ b/chromium/ui/base/clipboard/clipboard_android.cc @@ -243,7 +243,7 @@ void Clipboard::Clear(ClipboardType type) { } void Clipboard::ReadAvailableTypes(ClipboardType type, - std::vector<string16>* types, + std::vector<base::string16>* types, bool* contains_filenames) const { DCHECK(CalledOnValidThread()); DCHECK_EQ(type, CLIPBOARD_TYPE_COPY_PASTE); @@ -259,12 +259,12 @@ void Clipboard::ReadAvailableTypes(ClipboardType type, *contains_filenames = false; } -void Clipboard::ReadText(ClipboardType type, string16* result) const { +void Clipboard::ReadText(ClipboardType type, base::string16* result) const { DCHECK(CalledOnValidThread()); DCHECK_EQ(type, CLIPBOARD_TYPE_COPY_PASTE); std::string utf8; ReadAsciiText(type, &utf8); - *result = UTF8ToUTF16(utf8); + *result = base::UTF8ToUTF16(utf8); } void Clipboard::ReadAsciiText(ClipboardType type, std::string* result) const { @@ -275,7 +275,7 @@ void Clipboard::ReadAsciiText(ClipboardType type, std::string* result) const { // Note: |src_url| isn't really used. It is only implemented in Windows void Clipboard::ReadHTML(ClipboardType type, - string16* markup, + base::string16* markup, std::string* src_url, uint32* fragment_start, uint32* fragment_end) const { @@ -285,7 +285,7 @@ void Clipboard::ReadHTML(ClipboardType type, src_url->clear(); std::string input = g_map.Get().Get(kHTMLFormat); - *markup = UTF8ToUTF16(input); + *markup = base::UTF8ToUTF16(input); *fragment_start = 0; *fragment_end = static_cast<uint32>(markup->length()); @@ -317,13 +317,13 @@ SkBitmap Clipboard::ReadImage(ClipboardType type) const { } void Clipboard::ReadCustomData(ClipboardType clipboard_type, - const string16& type, - string16* result) const { + const base::string16& type, + base::string16* result) const { DCHECK(CalledOnValidThread()); NOTIMPLEMENTED(); } -void Clipboard::ReadBookmark(string16* title, std::string* url) const { +void Clipboard::ReadBookmark(base::string16* title, std::string* url) const { DCHECK(CalledOnValidThread()); NOTIMPLEMENTED(); } diff --git a/chromium/ui/base/clipboard/clipboard_aura.cc b/chromium/ui/base/clipboard/clipboard_aura.cc index 638604b5027..30b639a9076 100644 --- a/chromium/ui/base/clipboard/clipboard_aura.cc +++ b/chromium/ui/base/clipboard/clipboard_aura.cc @@ -47,7 +47,7 @@ class ClipboardData { virtual ~ClipboardData() {} // Bitmask of AuraClipboardFormat types. - const int format() const { return format_; } + int format() const { return format_; } const std::string& text() const { return text_; } void set_text(const std::string& text) { @@ -87,7 +87,7 @@ class ClipboardData { const SkBitmap& bitmap() const { return bitmap_; } void SetBitmapData(const SkBitmap& bitmap) { - bitmap.copyTo(&bitmap_, bitmap.getConfig()); + bitmap.copyTo(&bitmap_); format_ |= BITMAP; } @@ -150,20 +150,21 @@ class ClipboardData { // on gtk or winapi clipboard on win. class AuraClipboard { public: - AuraClipboard() {} + AuraClipboard() : sequence_number_(0) { + } ~AuraClipboard() { Clear(); } void Clear() { + sequence_number_++; STLDeleteContainerPointers(data_list_.begin(), data_list_.end()); data_list_.clear(); } - // Returns the number of entries currently in the clipboard stack. - size_t GetNumClipboardEntries() { - return data_list_.size(); + uint64_t sequence_number() const { + return sequence_number_; } // Returns the data currently on the top of the clipboard stack, NULL if the @@ -186,10 +187,10 @@ class AuraClipboard { } // Reads text from the data at the top of clipboard stack. - void ReadText(string16* result) const { + void ReadText(base::string16* result) const { std::string utf8_result; ReadAsciiText(&utf8_result); - *result = UTF8ToUTF16(utf8_result); + *result = base::UTF8ToUTF16(utf8_result); } // Reads ascii text from the data at the top of clipboard stack. @@ -207,7 +208,7 @@ class AuraClipboard { } // Reads HTML from the data at the top of clipboard stack. - void ReadHTML(string16* markup, + void ReadHTML(base::string16* markup, std::string* src_url, uint32* fragment_start, uint32* fragment_end) const { @@ -221,7 +222,7 @@ class AuraClipboard { return; const ClipboardData* data = GetData(); - *markup = UTF8ToUTF16(data->markup_data()); + *markup = base::UTF8ToUTF16(data->markup_data()); *src_url = data->url(); *fragment_start = 0; @@ -247,12 +248,13 @@ class AuraClipboard { // A shallow copy should be fine here, but just to be safe... const SkBitmap& clipboard_bitmap = GetData()->bitmap(); - clipboard_bitmap.copyTo(&img, clipboard_bitmap.getConfig()); + clipboard_bitmap.copyTo(&img); return img; } // Reads data of type |type| from the data at the top of clipboard stack. - void ReadCustomData(const string16& type, string16* result) const { + void ReadCustomData(const base::string16& type, + base::string16* result) const { result->clear(); const ClipboardData* data = GetData(); if (!HasFormat(CUSTOM)) @@ -264,14 +266,14 @@ class AuraClipboard { } // Reads bookmark from the data at the top of clipboard stack. - void ReadBookmark(string16* title, std::string* url) const { + void ReadBookmark(base::string16* title, std::string* url) const { title->clear(); url->clear(); if (!HasFormat(BOOKMARK)) return; const ClipboardData* data = GetData(); - *title = UTF8ToUTF16(data->bookmark_title()); + *title = base::UTF8ToUTF16(data->bookmark_title()); *url = data->bookmark_url(); } @@ -302,6 +304,7 @@ class AuraClipboard { void AddToListEnsuringSize(ClipboardData* data) { DCHECK(data); + sequence_number_++; data_list_.push_front(data); // If the size of list becomes more than the maximum allowed, we delete the @@ -316,6 +319,9 @@ class AuraClipboard { // Stack containing various versions of ClipboardData. std::list<ClipboardData*> data_list_; + // Sequence number uniquely identifying clipboard state. + uint64_t sequence_number_; + DISALLOW_COPY_AND_ASSIGN(AuraClipboard); }; @@ -481,7 +487,7 @@ void Clipboard::Clear(ClipboardType type) { } void Clipboard::ReadAvailableTypes(ClipboardType type, - std::vector<string16>* types, + std::vector<base::string16>* types, bool* contains_filenames) const { DCHECK(CalledOnValidThread()); if (!types || !contains_filenames) { @@ -492,13 +498,13 @@ void Clipboard::ReadAvailableTypes(ClipboardType type, types->clear(); *contains_filenames = false; if (IsFormatAvailable(GetPlainTextFormatType(), type)) - types->push_back(UTF8ToUTF16(GetPlainTextFormatType().ToString())); + types->push_back(base::UTF8ToUTF16(GetPlainTextFormatType().ToString())); if (IsFormatAvailable(GetHtmlFormatType(), type)) - types->push_back(UTF8ToUTF16(GetHtmlFormatType().ToString())); + types->push_back(base::UTF8ToUTF16(GetHtmlFormatType().ToString())); if (IsFormatAvailable(GetRtfFormatType(), type)) - types->push_back(UTF8ToUTF16(GetRtfFormatType().ToString())); + types->push_back(base::UTF8ToUTF16(GetRtfFormatType().ToString())); if (IsFormatAvailable(GetBitmapFormatType(), type)) - types->push_back(UTF8ToUTF16(kMimeTypePNG)); + types->push_back(base::UTF8ToUTF16(kMimeTypePNG)); AuraClipboard* clipboard = GetClipboard(); if (clipboard->IsFormatAvailable(CUSTOM) && clipboard->GetData()) { @@ -507,7 +513,7 @@ void Clipboard::ReadAvailableTypes(ClipboardType type, } } -void Clipboard::ReadText(ClipboardType type, string16* result) const { +void Clipboard::ReadText(ClipboardType type, base::string16* result) const { DCHECK(CalledOnValidThread()); GetClipboard()->ReadText(result); } @@ -518,7 +524,7 @@ void Clipboard::ReadAsciiText(ClipboardType type, std::string* result) const { } void Clipboard::ReadHTML(ClipboardType type, - string16* markup, + base::string16* markup, std::string* src_url, uint32* fragment_start, uint32* fragment_end) const { @@ -537,13 +543,13 @@ SkBitmap Clipboard::ReadImage(ClipboardType type) const { } void Clipboard::ReadCustomData(ClipboardType clipboard_type, - const string16& type, - string16* result) const { + const base::string16& type, + base::string16* result) const { DCHECK(CalledOnValidThread()); GetClipboard()->ReadCustomData(type, result); } -void Clipboard::ReadBookmark(string16* title, std::string* url) const { +void Clipboard::ReadBookmark(base::string16* title, std::string* url) const { DCHECK(CalledOnValidThread()); GetClipboard()->ReadBookmark(title, url); } @@ -555,7 +561,7 @@ void Clipboard::ReadData(const FormatType& format, std::string* result) const { uint64 Clipboard::GetSequenceNumber(ClipboardType type) { DCHECK(CalledOnValidThread()); - return GetClipboard()->GetNumClipboardEntries(); + return GetClipboard()->sequence_number(); } void Clipboard::WriteText(const char* text_data, size_t text_len) { diff --git a/chromium/ui/base/clipboard/clipboard_aurax11.cc b/chromium/ui/base/clipboard/clipboard_aurax11.cc index 71a545c8b98..b075ddbddaf 100644 --- a/chromium/ui/base/clipboard/clipboard_aurax11.cc +++ b/chromium/ui/base/clipboard/clipboard_aurax11.cc @@ -15,8 +15,7 @@ #include "base/memory/ref_counted_memory.h" #include "base/memory/scoped_ptr.h" #include "base/memory/singleton.h" -#include "base/message_loop/message_pump_observer.h" -#include "base/message_loop/message_pump_x11.h" +#include "base/metrics/histogram.h" #include "base/stl_util.h" #include "base/strings/utf_string_conversions.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -25,6 +24,9 @@ #include "ui/base/x/selection_requestor.h" #include "ui/base/x/selection_utils.h" #include "ui/base/x/x11_util.h" +#include "ui/events/platform/platform_event_dispatcher.h" +#include "ui/events/platform/platform_event_observer.h" +#include "ui/events/platform/platform_event_source.h" #include "ui/gfx/codec/png_codec.h" #include "ui/gfx/size.h" #include "ui/gfx/x/x11_atom_cache.h" @@ -34,17 +36,21 @@ namespace ui { namespace { const char kClipboard[] = "CLIPBOARD"; +const char kClipboardManager[] = "CLIPBOARD_MANAGER"; const char kMimeTypeFilename[] = "chromium/filename"; const char kMimeTypePepperCustomData[] = "chromium/x-pepper-custom-data"; const char kMimeTypeWebkitSmartPaste[] = "chromium/x-webkit-paste"; +const char kSaveTargets[] = "SAVE_TARGETS"; const char kTargets[] = "TARGETS"; const char* kAtomsToCache[] = { kClipboard, + kClipboardManager, Clipboard::kMimeTypePNG, kMimeTypeFilename, kMimeTypeMozillaURL, kMimeTypeWebkitSmartPaste, + kSaveTargets, kString, kTargets, kText, @@ -55,7 +61,7 @@ const char* kAtomsToCache[] = { /////////////////////////////////////////////////////////////////////////////// // Uses the XFixes API to provide sequence numbers for GetSequenceNumber(). -class SelectionChangeObserver : public base::MessagePumpObserver { +class SelectionChangeObserver : public ui::PlatformEventObserver { public: static SelectionChangeObserver* GetInstance(); @@ -70,11 +76,9 @@ class SelectionChangeObserver : public base::MessagePumpObserver { SelectionChangeObserver(); virtual ~SelectionChangeObserver(); - // Overridden from base::MessagePumpObserver: - virtual base::EventStatus WillProcessEvent( - const base::NativeEvent& event) OVERRIDE; - virtual void DidProcessEvent( - const base::NativeEvent& event) OVERRIDE {} + // ui::PlatformEventObserver: + virtual void WillProcessEvent(const ui::PlatformEvent& event) OVERRIDE; + virtual void DidProcessEvent(const ui::PlatformEvent& event) OVERRIDE {} int event_base_; Atom clipboard_atom_; @@ -106,20 +110,19 @@ SelectionChangeObserver::SelectionChangeObserver() XFixesSelectionWindowDestroyNotifyMask | XFixesSelectionClientCloseNotifyMask); - base::MessagePumpX11::Current()->AddObserver(this); + ui::PlatformEventSource::GetInstance()->AddPlatformEventObserver(this); } } SelectionChangeObserver::~SelectionChangeObserver() { - // We are a singleton; we will outlive our message pump. + // We are a singleton; we will outlive the event source. } SelectionChangeObserver* SelectionChangeObserver::GetInstance() { return Singleton<SelectionChangeObserver>::get(); } -base::EventStatus SelectionChangeObserver::WillProcessEvent( - const base::NativeEvent& event) { +void SelectionChangeObserver::WillProcessEvent(const ui::PlatformEvent& event) { if (event->type == event_base_ + XFixesSelectionNotify) { XFixesSelectionNotifyEvent* ev = reinterpret_cast<XFixesSelectionNotifyEvent*>(event); @@ -131,7 +134,6 @@ base::EventStatus SelectionChangeObserver::WillProcessEvent( DLOG(ERROR) << "Unexpected selection atom: " << ev->selection; } } - return base::EVENT_CONTINUE; } /////////////////////////////////////////////////////////////////////////////// @@ -224,7 +226,7 @@ bool Clipboard::FormatType::Equals(const FormatType& other) const { // Private implementation of our X11 integration. Keeps X11 headers out of the // majority of chrome, which break badly. -class Clipboard::AuraX11Details : public base::MessagePumpDispatcher { +class Clipboard::AuraX11Details : public PlatformEventDispatcher { public: AuraX11Details(); virtual ~AuraX11Details(); @@ -235,6 +237,10 @@ class Clipboard::AuraX11Details : public base::MessagePumpDispatcher { // given type. ::Atom LookupSelectionForClipboardType(ClipboardType type) const; + // Returns the X11 type that we pass to various XSelection functions for + // CLIPBOARD_TYPE_COPY_PASTE. + ::Atom GetCopyPasteSelection() const; + // Returns the object which is responsible for communication on |type|. SelectionRequestor* GetSelectionRequestorForClipboardType(ClipboardType type); @@ -278,12 +284,17 @@ class Clipboard::AuraX11Details : public base::MessagePumpDispatcher { // Returns a vector with a |format| converted to an X11 atom. std::vector< ::Atom> GetAtomsForFormat(const Clipboard::FormatType& format); - // Clears a certain clipboard type. + // Clears a certain clipboard type, whether we own it or not. void Clear(ClipboardType type); + // If we own the CLIPBOARD selection, requests the clipboard manager to take + // ownership of it. + void StoreCopyPasteDataAndWait(); + private: - // Overridden from base::MessagePumpDispatcher: - virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; + // PlatformEventDispatcher: + virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE; + virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE; // Our X11 state. Display* x_display_; @@ -297,6 +308,7 @@ class Clipboard::AuraX11Details : public base::MessagePumpDispatcher { // Objects which request and receive selection data. SelectionRequestor clipboard_requestor_; SelectionRequestor primary_requestor_; + SelectionRequestor clipboard_manager_requestor_; // Temporary target map that we write to during DispatchObects. SelectionFormatMap clipboard_data_; @@ -322,8 +334,11 @@ Clipboard::AuraX11Details::AuraX11Details() NULL)), atom_cache_(x_display_, kAtomsToCache), clipboard_requestor_(x_display_, x_window_, - atom_cache_.GetAtom(kClipboard)), - primary_requestor_(x_display_, x_window_, XA_PRIMARY), + atom_cache_.GetAtom(kClipboard), this), + primary_requestor_(x_display_, x_window_, XA_PRIMARY, this), + clipboard_manager_requestor_(x_display_, x_window_, + atom_cache_.GetAtom(kClipboardManager), + this), clipboard_owner_(x_display_, x_window_, atom_cache_.GetAtom(kClipboard)), primary_owner_(x_display_, x_window_, XA_PRIMARY) { // We don't know all possible MIME types at compile time. @@ -332,11 +347,13 @@ Clipboard::AuraX11Details::AuraX11Details() XStoreName(x_display_, x_window_, "Chromium clipboard"); XSelectInput(x_display_, x_window_, PropertyChangeMask); - base::MessagePumpX11::Current()->AddDispatcherForWindow(this, x_window_); + if (PlatformEventSource::GetInstance()) + PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); } Clipboard::AuraX11Details::~AuraX11Details() { - base::MessagePumpX11::Current()->RemoveDispatcherForWindow(x_window_); + if (PlatformEventSource::GetInstance()) + PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); XDestroyWindow(x_display_, x_window_); } @@ -344,17 +361,21 @@ Clipboard::AuraX11Details::~AuraX11Details() { ::Atom Clipboard::AuraX11Details::LookupSelectionForClipboardType( ClipboardType type) const { if (type == CLIPBOARD_TYPE_COPY_PASTE) - return atom_cache_.GetAtom(kClipboard); + return GetCopyPasteSelection(); return XA_PRIMARY; } +::Atom Clipboard::AuraX11Details::GetCopyPasteSelection() const { + return atom_cache_.GetAtom(kClipboard); +} + const SelectionFormatMap& Clipboard::AuraX11Details::LookupStorageForAtom( ::Atom atom) { if (atom == XA_PRIMARY) return primary_owner_.selection_format_map(); - DCHECK_EQ(atom_cache_.GetAtom(kClipboard), atom); + DCHECK_EQ(GetCopyPasteSelection(), atom); return clipboard_owner_.selection_format_map(); } @@ -435,9 +456,13 @@ TargetList Clipboard::AuraX11Details::WaitAndGetTargetsList( NULL, &out_data_items, &out_type)) { - const ::Atom* atom_array = reinterpret_cast<const ::Atom*>(data->front()); - for (size_t i = 0; i < out_data_items; ++i) - out.push_back(atom_array[i]); + // Some apps return an |out_type| of "TARGETS". (crbug.com/377893) + if (out_type == XA_ATOM || out_type == atom_cache_.GetAtom(kTargets)) { + const ::Atom* atom_array = + reinterpret_cast<const ::Atom*>(data->front()); + for (size_t i = 0; i < out_data_items; ++i) + out.push_back(atom_array[i]); + } } else { // There was no target list. Most Java apps doesn't offer a TARGETS list, // even though they AWT to. They will offer individual text types if you @@ -477,41 +502,75 @@ std::vector< ::Atom> Clipboard::AuraX11Details::GetAtomsForFormat( void Clipboard::AuraX11Details::Clear(ClipboardType type) { if (type == CLIPBOARD_TYPE_COPY_PASTE) - return clipboard_owner_.Clear(); + clipboard_owner_.ClearSelectionOwner(); else - return primary_owner_.Clear(); + primary_owner_.ClearSelectionOwner(); +} + +void Clipboard::AuraX11Details::StoreCopyPasteDataAndWait() { + ::Atom selection = GetCopyPasteSelection(); + if (XGetSelectionOwner(x_display_, selection) != x_window_) + return; + + ::Atom clipboard_manager_atom = atom_cache_.GetAtom(kClipboardManager); + if (XGetSelectionOwner(x_display_, clipboard_manager_atom) == None) + return; + + const SelectionFormatMap& format_map = LookupStorageForAtom(selection); + if (format_map.size() == 0) + return; + std::vector<Atom> targets = format_map.GetTypes(); + + base::TimeTicks start = base::TimeTicks::Now(); + clipboard_manager_requestor_.PerformBlockingConvertSelectionWithParameter( + atom_cache_.GetAtom(kSaveTargets), targets); + UMA_HISTOGRAM_TIMES("Clipboard.X11StoreCopyPasteDuration", + base::TimeTicks::Now() - start); } -bool Clipboard::AuraX11Details::Dispatch(const base::NativeEvent& event) { - XEvent* xev = event; +bool Clipboard::AuraX11Details::CanDispatchEvent(const PlatformEvent& event) { + return event->xany.window == x_window_; +} +uint32_t Clipboard::AuraX11Details::DispatchEvent(const PlatformEvent& xev) { switch (xev->type) { case SelectionRequest: { - if (xev->xselectionrequest.selection == XA_PRIMARY) + if (xev->xselectionrequest.selection == XA_PRIMARY) { primary_owner_.OnSelectionRequest(xev->xselectionrequest); - else + } else { + // We should not get requests for the CLIPBOARD_MANAGER selection + // because we never take ownership of it. + DCHECK_EQ(GetCopyPasteSelection(), xev->xselectionrequest.selection); clipboard_owner_.OnSelectionRequest(xev->xselectionrequest); + } break; } case SelectionNotify: { - if (xev->xselection.selection == XA_PRIMARY) + ::Atom selection = xev->xselection.selection; + if (selection == XA_PRIMARY) primary_requestor_.OnSelectionNotify(xev->xselection); - else + else if (selection == GetCopyPasteSelection()) clipboard_requestor_.OnSelectionNotify(xev->xselection); + else if (selection == atom_cache_.GetAtom(kClipboardManager)) + clipboard_manager_requestor_.OnSelectionNotify(xev->xselection); break; } case SelectionClear: { - if (xev->xselectionclear.selection == XA_PRIMARY) + if (xev->xselectionclear.selection == XA_PRIMARY) { primary_owner_.OnSelectionClear(xev->xselectionclear); - else + } else { + // We should not get requests for the CLIPBOARD_MANAGER selection + // because we never take ownership of it. + DCHECK_EQ(GetCopyPasteSelection(), xev->xselection.selection); clipboard_owner_.OnSelectionClear(xev->xselectionclear); + } break; } default: break; } - return true; + return POST_DISPATCH_NONE; } /////////////////////////////////////////////////////////////////////////////// @@ -525,9 +584,7 @@ Clipboard::Clipboard() Clipboard::~Clipboard() { DCHECK(CalledOnValidThread()); - // TODO(erg): We need to do whatever the equivalent of - // gtk_clipboard_store(clipboard_) is here. When we shut down, we want the - // current selection to live on. + aurax11_details_->StoreCopyPasteDataAndWait(); } void Clipboard::WriteObjects(ClipboardType type, const ObjectMap& objects) { @@ -545,8 +602,12 @@ void Clipboard::WriteObjects(ClipboardType type, const ObjectMap& objects) { ObjectMap::const_iterator text_iter = objects.find(CBF_TEXT); if (text_iter != objects.end()) { aurax11_details_->CreateNewClipboardData(); - const ObjectMapParam& char_vector = text_iter->second[0]; - WriteText(&char_vector.front(), char_vector.size()); + const ObjectMapParams& params_vector = text_iter->second; + if (params_vector.size()) { + const ObjectMapParam& char_vector = params_vector[0]; + if (char_vector.size()) + WriteText(&char_vector.front(), char_vector.size()); + } aurax11_details_->TakeOwnershipOfSelection(CLIPBOARD_TYPE_SELECTION); } } @@ -558,6 +619,10 @@ bool Clipboard::IsFormatAvailable(const FormatType& format, DCHECK(IsSupportedClipboardType(type)); TargetList target_list = aurax11_details_->WaitAndGetTargetsList(type); + if (format.Equals(GetPlainTextFormatType()) || + format.Equals(GetUrlFormatType())) { + return target_list.ContainsText(); + } return target_list.ContainsFormat(format); } @@ -568,7 +633,7 @@ void Clipboard::Clear(ClipboardType type) { } void Clipboard::ReadAvailableTypes(ClipboardType type, - std::vector<string16>* types, + std::vector<base::string16>* types, bool* contains_filenames) const { DCHECK(CalledOnValidThread()); if (!types || !contains_filenames) { @@ -581,13 +646,13 @@ void Clipboard::ReadAvailableTypes(ClipboardType type, types->clear(); if (target_list.ContainsText()) - types->push_back(UTF8ToUTF16(kMimeTypeText)); + types->push_back(base::UTF8ToUTF16(kMimeTypeText)); if (target_list.ContainsFormat(GetHtmlFormatType())) - types->push_back(UTF8ToUTF16(kMimeTypeHTML)); + types->push_back(base::UTF8ToUTF16(kMimeTypeHTML)); if (target_list.ContainsFormat(GetRtfFormatType())) - types->push_back(UTF8ToUTF16(kMimeTypeRTF)); + types->push_back(base::UTF8ToUTF16(kMimeTypeRTF)); if (target_list.ContainsFormat(GetBitmapFormatType())) - types->push_back(UTF8ToUTF16(kMimeTypePNG)); + types->push_back(base::UTF8ToUTF16(kMimeTypePNG)); *contains_filenames = false; SelectionData data(aurax11_details_->RequestAndWaitForTypes( @@ -596,14 +661,14 @@ void Clipboard::ReadAvailableTypes(ClipboardType type, ReadCustomDataTypes(data.GetData(), data.GetSize(), types); } -void Clipboard::ReadText(ClipboardType type, string16* result) const { +void Clipboard::ReadText(ClipboardType type, base::string16* result) const { DCHECK(CalledOnValidThread()); SelectionData data(aurax11_details_->RequestAndWaitForTypes( type, aurax11_details_->GetTextAtoms())); if (data.IsValid()) { std::string text = data.GetText(); - *result = UTF8ToUTF16(text); + *result = base::UTF8ToUTF16(text); } } @@ -619,7 +684,7 @@ void Clipboard::ReadAsciiText(ClipboardType type, std::string* result) const { // TODO(estade): handle different charsets. // TODO(port): set *src_url. void Clipboard::ReadHTML(ClipboardType type, - string16* markup, + base::string16* markup, std::string* src_url, uint32* fragment_start, uint32* fragment_end) const { @@ -665,8 +730,8 @@ SkBitmap Clipboard::ReadImage(ClipboardType type) const { } void Clipboard::ReadCustomData(ClipboardType clipboard_type, - const string16& type, - string16* result) const { + const base::string16& type, + base::string16* result) const { DCHECK(CalledOnValidThread()); SelectionData data(aurax11_details_->RequestAndWaitForTypes( @@ -676,7 +741,7 @@ void Clipboard::ReadCustomData(ClipboardType clipboard_type, ReadCustomDataForType(data.GetData(), data.GetSize(), type, result); } -void Clipboard::ReadBookmark(string16* title, std::string* url) const { +void Clipboard::ReadBookmark(base::string16* title, std::string* url) const { DCHECK(CalledOnValidThread()); // TODO(erg): This was left NOTIMPLEMENTED() in the gtk port too. NOTIMPLEMENTED(); @@ -736,8 +801,8 @@ void Clipboard::WriteBookmark(const char* title_data, const char* url_data, size_t url_len) { // Write as a mozilla url (UTF16: URL, newline, title). - string16 url = UTF8ToUTF16(std::string(url_data, url_len) + "\n"); - string16 title = UTF8ToUTF16(std::string(title_data, title_len)); + base::string16 url = base::UTF8ToUTF16(std::string(url_data, url_len) + "\n"); + base::string16 title = base::UTF8ToUTF16(std::string(title_data, title_len)); std::vector<unsigned char> data; ui::AddString16ToVector(url, &data); @@ -751,8 +816,11 @@ void Clipboard::WriteBookmark(const char* title_data, // Write an extra flavor that signifies WebKit was the last to modify the // pasteboard. This flavor has no data. void Clipboard::WriteWebSmartPaste() { - aurax11_details_->InsertMapping(kMimeTypeWebkitSmartPaste, - scoped_refptr<base::RefCountedMemory>()); + std::string empty; + aurax11_details_->InsertMapping( + kMimeTypeWebkitSmartPaste, + scoped_refptr<base::RefCountedMemory>( + base::RefCountedString::TakeString(&empty))); } void Clipboard::WriteBitmap(const SkBitmap& bitmap) { diff --git a/chromium/ui/base/clipboard/clipboard_gtk.cc b/chromium/ui/base/clipboard/clipboard_gtk.cc deleted file mode 100644 index eebcc5e39c1..00000000000 --- a/chromium/ui/base/clipboard/clipboard_gtk.cc +++ /dev/null @@ -1,676 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/clipboard/clipboard.h" - -#include <gtk/gtk.h> -#include <X11/extensions/Xfixes.h> -#include <X11/Xatom.h> -#include <map> -#include <set> -#include <string> -#include <utility> - -#include "base/basictypes.h" -#include "base/files/file_path.h" -#include "base/logging.h" -#include "base/memory/singleton.h" -#include "base/strings/utf_string_conversions.h" -#include "third_party/skia/include/core/SkBitmap.h" -#include "ui/base/clipboard/custom_data_helper.h" -#include "ui/base/gtk/gtk_signal.h" -#include "ui/base/x/x11_util.h" -#include "ui/gfx/canvas.h" -#include "ui/gfx/gtk_util.h" -#include "ui/gfx/scoped_gobject.h" -#include "ui/gfx/size.h" - -namespace ui { - -namespace { - -class SelectionChangeObserver { - public: - static SelectionChangeObserver* GetInstance(); - - uint64 clipboard_sequence_number() const { - return clipboard_sequence_number_; - } - uint64 primary_sequence_number() const { return primary_sequence_number_; } - - private: - friend struct DefaultSingletonTraits<SelectionChangeObserver>; - - SelectionChangeObserver(); - ~SelectionChangeObserver(); - - CHROMEG_CALLBACK_1(SelectionChangeObserver, GdkFilterReturn, OnXEvent, - GdkXEvent*, GdkEvent*); - - int event_base_; - Atom clipboard_atom_; - uint64 clipboard_sequence_number_; - uint64 primary_sequence_number_; - - DISALLOW_COPY_AND_ASSIGN(SelectionChangeObserver); -}; - -SelectionChangeObserver::SelectionChangeObserver() - : event_base_(-1), - clipboard_atom_(None), - clipboard_sequence_number_(0), - primary_sequence_number_(0) { - int ignored; - if (XFixesQueryExtension(gfx::GetXDisplay(), &event_base_, &ignored)) { - clipboard_atom_ = XInternAtom(gfx::GetXDisplay(), "CLIPBOARD", false); - XFixesSelectSelectionInput(gfx::GetXDisplay(), GetX11RootWindow(), - clipboard_atom_, - XFixesSetSelectionOwnerNotifyMask | - XFixesSelectionWindowDestroyNotifyMask | - XFixesSelectionClientCloseNotifyMask); - // This seems to be semi-optional. For some reason, registering for any - // selection notify events seems to subscribe us to events for both the - // primary and the clipboard buffers. Register anyway just to be safe. - XFixesSelectSelectionInput(gfx::GetXDisplay(), GetX11RootWindow(), - XA_PRIMARY, - XFixesSetSelectionOwnerNotifyMask | - XFixesSelectionWindowDestroyNotifyMask | - XFixesSelectionClientCloseNotifyMask); - gdk_window_add_filter(NULL, &SelectionChangeObserver::OnXEventThunk, this); - } -} - -SelectionChangeObserver::~SelectionChangeObserver() { -} - -SelectionChangeObserver* SelectionChangeObserver::GetInstance() { - return Singleton<SelectionChangeObserver>::get(); -} - -GdkFilterReturn SelectionChangeObserver::OnXEvent(GdkXEvent* xevent, - GdkEvent* event) { - XEvent* xev = static_cast<XEvent*>(xevent); - - if (xev->type == event_base_ + XFixesSelectionNotify) { - XFixesSelectionNotifyEvent* ev = - reinterpret_cast<XFixesSelectionNotifyEvent*>(xev); - if (ev->selection == clipboard_atom_) { - clipboard_sequence_number_++; - } else if (ev->selection == XA_PRIMARY) { - primary_sequence_number_++; - } else { - DLOG(ERROR) << "Unexpected selection atom: " << ev->selection; - } - } - return GDK_FILTER_CONTINUE; -} - -const char kMimeTypeBitmap[] = "image/bmp"; -const char kMimeTypeMozillaURL[] = "text/x-moz-url"; -const char kMimeTypePepperCustomData[] = "chromium/x-pepper-custom-data"; -const char kMimeTypeWebkitSmartPaste[] = "chromium/x-webkit-paste"; - -std::string GdkAtomToString(const GdkAtom& atom) { - gchar* name = gdk_atom_name(atom); - std::string rv(name); - g_free(name); - return rv; -} - -GdkAtom StringToGdkAtom(const std::string& str) { - return gdk_atom_intern(str.c_str(), FALSE); -} - -// GtkClipboardGetFunc callback. -// GTK will call this when an application wants data we copied to the clipboard. -void GetData(GtkClipboard* clipboard, - GtkSelectionData* selection_data, - guint info, - gpointer user_data) { - Clipboard::TargetMap* data_map = - reinterpret_cast<Clipboard::TargetMap*>(user_data); - - std::string target_string = GdkAtomToString( - gtk_selection_data_get_target(selection_data)); - Clipboard::TargetMap::iterator iter = data_map->find(target_string); - - if (iter == data_map->end()) - return; - - if (target_string == kMimeTypeBitmap) { - gtk_selection_data_set_pixbuf(selection_data, - reinterpret_cast<GdkPixbuf*>(iter->second.first)); - } else { - gtk_selection_data_set(selection_data, - gtk_selection_data_get_target(selection_data), 8, - reinterpret_cast<guchar*>(iter->second.first), - iter->second.second); - } -} - -// GtkClipboardClearFunc callback. -// We are guaranteed this will be called exactly once for each call to -// gtk_clipboard_set_with_data. -void ClearData(GtkClipboard* /*clipboard*/, - gpointer user_data) { - Clipboard::TargetMap* map = - reinterpret_cast<Clipboard::TargetMap*>(user_data); - // The same data may be inserted under multiple keys, so use a set to - // uniq them. - std::set<char*> ptrs; - - for (Clipboard::TargetMap::iterator iter = map->begin(); - iter != map->end(); ++iter) { - if (iter->first == kMimeTypeBitmap) - g_object_unref(reinterpret_cast<GdkPixbuf*>(iter->second.first)); - else - ptrs.insert(iter->second.first); - } - - for (std::set<char*>::iterator iter = ptrs.begin(); - iter != ptrs.end(); ++iter) { - delete[] *iter; - } - - delete map; -} - -} // namespace - -Clipboard::FormatType::FormatType() : data_(GDK_NONE) { -} - -Clipboard::FormatType::FormatType(const std::string& format_string) - : data_(StringToGdkAtom(format_string)) { -} - -Clipboard::FormatType::FormatType(const GdkAtom& native_format) - : data_(native_format) { -} - -Clipboard::FormatType::~FormatType() { -} - -std::string Clipboard::FormatType::Serialize() const { - return GdkAtomToString(data_); -} - -// static -Clipboard::FormatType Clipboard::FormatType::Deserialize( - const std::string& serialization) { - return FormatType(serialization); -} - -bool Clipboard::FormatType::Equals(const FormatType& other) const { - return data_ == other.data_; -} - -Clipboard::Clipboard() : clipboard_data_(NULL) { - DCHECK(CalledOnValidThread()); - clipboard_ = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); - primary_selection_ = gtk_clipboard_get(GDK_SELECTION_PRIMARY); -} - -Clipboard::~Clipboard() { - DCHECK(CalledOnValidThread()); - gtk_clipboard_store(clipboard_); -} - -void Clipboard::WriteObjects(ClipboardType type, const ObjectMap& objects) { - DCHECK(CalledOnValidThread()); - clipboard_data_ = new TargetMap(); - - for (ObjectMap::const_iterator iter = objects.begin(); - iter != objects.end(); ++iter) { - DispatchObject(static_cast<ObjectType>(iter->first), iter->second); - } - SetGtkClipboard(type); - - if (type == CLIPBOARD_TYPE_COPY_PASTE) { - ObjectMap::const_iterator text_iter = objects.find(CBF_TEXT); - if (text_iter != objects.end()) { - // Copy text and SourceTag to the selection clipboard. - ObjectMap::const_iterator next_iter = text_iter; - WriteObjects(CLIPBOARD_TYPE_SELECTION, ObjectMap(text_iter, ++next_iter)); - } - } -} - -// Take ownership of the GTK clipboard and inform it of the targets we support. -void Clipboard::SetGtkClipboard(ClipboardType type) { - scoped_ptr<GtkTargetEntry[]> targets( - new GtkTargetEntry[clipboard_data_->size()]); - - int i = 0; - for (Clipboard::TargetMap::iterator iter = clipboard_data_->begin(); - iter != clipboard_data_->end(); ++iter, ++i) { - targets[i].target = const_cast<char*>(iter->first.c_str()); - targets[i].flags = 0; - targets[i].info = 0; - } - - GtkClipboard *clipboard = LookupBackingClipboard(type); - - if (gtk_clipboard_set_with_data(clipboard, targets.get(), - clipboard_data_->size(), - GetData, ClearData, - clipboard_data_)) { - gtk_clipboard_set_can_store(clipboard, - targets.get(), - clipboard_data_->size()); - } - - // clipboard_data_ now owned by the GtkClipboard. - clipboard_data_ = NULL; -} - -void Clipboard::WriteText(const char* text_data, size_t text_len) { - char* data = new char[text_len]; - memcpy(data, text_data, text_len); - - InsertMapping(kMimeTypeText, data, text_len); - InsertMapping("TEXT", data, text_len); - InsertMapping("STRING", data, text_len); - InsertMapping("UTF8_STRING", data, text_len); - InsertMapping("COMPOUND_TEXT", data, text_len); -} - -void Clipboard::WriteHTML(const char* markup_data, - size_t markup_len, - const char* url_data, - size_t url_len) { - // TODO(estade): We need to expand relative links with |url_data|. - static const char* html_prefix = "<meta http-equiv=\"content-type\" " - "content=\"text/html; charset=utf-8\">"; - size_t html_prefix_len = strlen(html_prefix); - size_t total_len = html_prefix_len + markup_len + 1; - - char* data = new char[total_len]; - snprintf(data, total_len, "%s", html_prefix); - memcpy(data + html_prefix_len, markup_data, markup_len); - // Some programs expect NULL-terminated data. See http://crbug.com/42624 - data[total_len - 1] = '\0'; - - InsertMapping(kMimeTypeHTML, data, total_len); -} - -void Clipboard::WriteRTF(const char* rtf_data, size_t data_len) { - WriteData(GetRtfFormatType(), rtf_data, data_len); -} - -// Write an extra flavor that signifies WebKit was the last to modify the -// pasteboard. This flavor has no data. -void Clipboard::WriteWebSmartPaste() { - InsertMapping(kMimeTypeWebkitSmartPaste, NULL, 0); -} - -void Clipboard::WriteBitmap(const SkBitmap& bitmap) { - GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(bitmap); - - // We store the GdkPixbuf*, and the size_t half of the pair is meaningless. - // Note that this contrasts with the vast majority of entries in our target - // map, which directly store the data and its length. - InsertMapping(kMimeTypeBitmap, reinterpret_cast<char*>(pixbuf), 0); -} - -void Clipboard::WriteBookmark(const char* title_data, size_t title_len, - const char* url_data, size_t url_len) { - // Write as a mozilla url (UTF16: URL, newline, title). - base::string16 url = UTF8ToUTF16(std::string(url_data, url_len) + "\n"); - base::string16 title = UTF8ToUTF16(std::string(title_data, title_len)); - if (title.length() >= std::numeric_limits<size_t>::max() / 4 || - url.length() >= std::numeric_limits<size_t>::max() / 4) - return; - size_t data_len = 2 * (title.length() + url.length()); - - char* data = new char[data_len]; - memcpy(data, url.data(), 2 * url.length()); - memcpy(data + 2 * url.length(), title.data(), 2 * title.length()); - InsertMapping(kMimeTypeMozillaURL, data, data_len); -} - -void Clipboard::WriteData(const FormatType& format, - const char* data_data, - size_t data_len) { - // We assume that certain mapping types are only written by trusted code. - // Therefore we must upkeep their integrity. - if (format.Equals(GetBitmapFormatType())) - return; - char* data = new char[data_len]; - memcpy(data, data_data, data_len); - // TODO(dcheng): Maybe this map should use GdkAtoms... - InsertMapping(GdkAtomToString(format.ToGdkAtom()).c_str(), data, data_len); -} - -// We do not use gtk_clipboard_wait_is_target_available because of -// a bug with the gtk clipboard. It caches the available targets -// and does not always refresh the cache when it is appropriate. -bool Clipboard::IsFormatAvailable(const Clipboard::FormatType& format, - ClipboardType type) const { - DCHECK(CalledOnValidThread()); - GtkClipboard* clipboard = LookupBackingClipboard(type); - if (clipboard == NULL) - return false; - - bool retval = false; - GtkSelectionData* data = gtk_clipboard_wait_for_contents( - clipboard, gdk_atom_intern_static_string("TARGETS")); - - bool format_is_plain_text = GetPlainTextFormatType().Equals(format); - if (format_is_plain_text) { - // This tries a number of common text targets. - if (data) { - retval = gtk_selection_data_targets_include_text(data); - } - // Some programs like Java decide to set an empty TARGETS list, so even if - // data is not NULL, we still have to fall back. - if (!retval) { - // Some programs post data to the clipboard without any targets. If this - // is the case we attempt to make sense of the contents as text. This is - // pretty unfortunate since it means we have to actually copy the data to - // see if it is available, but at least this path shouldn't be hit for - // conforming programs. - gchar* text = gtk_clipboard_wait_for_text(clipboard); - if (text) { - g_free(text); - retval = true; - } - } - } else if (data) { - GdkAtom* targets = NULL; - int num = 0; - gtk_selection_data_get_targets(data, &targets, &num); - - for (int i = 0; i < num; i++) { - if (targets[i] == format.ToGdkAtom()) { - retval = true; - break; - } - } - - g_free(targets); - } - - if (data) - gtk_selection_data_free(data); - - return retval; -} - -void Clipboard::Clear(ClipboardType type) { - DCHECK(CalledOnValidThread()); - GtkClipboard* clipboard = LookupBackingClipboard(type); - if (clipboard == NULL) - return; - gtk_clipboard_clear(clipboard); -} - -void Clipboard::ReadAvailableTypes(ClipboardType type, - std::vector<base::string16>* types, - bool* contains_filenames) const { - DCHECK(CalledOnValidThread()); - if (!types || !contains_filenames) { - NOTREACHED(); - return; - } - - types->clear(); - if (IsFormatAvailable(GetPlainTextFormatType(), type)) - types->push_back(UTF8ToUTF16(kMimeTypeText)); - if (IsFormatAvailable(GetHtmlFormatType(), type)) - types->push_back(UTF8ToUTF16(kMimeTypeHTML)); - if (IsFormatAvailable(GetRtfFormatType(), type)) - types->push_back(UTF8ToUTF16(kMimeTypeRTF)); - if (IsFormatAvailable(GetBitmapFormatType(), type)) - types->push_back(UTF8ToUTF16(kMimeTypePNG)); - *contains_filenames = false; - - GtkClipboard* clipboard = LookupBackingClipboard(type); - if (!clipboard) - return; - - GtkSelectionData* data = gtk_clipboard_wait_for_contents( - clipboard, GetWebCustomDataFormatType().ToGdkAtom()); - if (!data) - return; - ReadCustomDataTypes(gtk_selection_data_get_data(data), - gtk_selection_data_get_length(data), - types); - gtk_selection_data_free(data); -} - - -void Clipboard::ReadText(ClipboardType type, base::string16* result) const { - DCHECK(CalledOnValidThread()); - GtkClipboard* clipboard = LookupBackingClipboard(type); - if (clipboard == NULL) - return; - - result->clear(); - gchar* text = gtk_clipboard_wait_for_text(clipboard); - - if (text == NULL) - return; - - // TODO(estade): do we want to handle the possible error here? - UTF8ToUTF16(text, strlen(text), result); - g_free(text); -} - -void Clipboard::ReadAsciiText(ClipboardType type, - std::string* result) const { - DCHECK(CalledOnValidThread()); - GtkClipboard* clipboard = LookupBackingClipboard(type); - if (clipboard == NULL) - return; - - result->clear(); - gchar* text = gtk_clipboard_wait_for_text(clipboard); - - if (text == NULL) - return; - - result->assign(text); - g_free(text); -} - -// TODO(estade): handle different charsets. -// TODO(port): set *src_url. -void Clipboard::ReadHTML(ClipboardType type, - base::string16* markup, - std::string* src_url, - uint32* fragment_start, - uint32* fragment_end) const { - DCHECK(CalledOnValidThread()); - markup->clear(); - if (src_url) - src_url->clear(); - *fragment_start = 0; - *fragment_end = 0; - - GtkClipboard* clipboard = LookupBackingClipboard(type); - if (clipboard == NULL) - return; - GtkSelectionData* data = gtk_clipboard_wait_for_contents(clipboard, - GetHtmlFormatType().ToGdkAtom()); - - if (!data) - return; - - // If the data starts with 0xFEFF, i.e., Byte Order Mark, assume it is - // UTF-16, otherwise assume UTF-8. - gint data_length = gtk_selection_data_get_length(data); - const guchar* raw_data = gtk_selection_data_get_data(data); - - if (data_length >= 2 && - reinterpret_cast<const uint16_t*>(raw_data)[0] == 0xFEFF) { - markup->assign(reinterpret_cast<const uint16_t*>(raw_data) + 1, - (data_length / 2) - 1); - } else { - UTF8ToUTF16(reinterpret_cast<const char*>(raw_data), data_length, markup); - } - - // If there is a terminating NULL, drop it. - if (!markup->empty() && markup->at(markup->length() - 1) == '\0') - markup->resize(markup->length() - 1); - - *fragment_start = 0; - DCHECK(markup->length() <= kuint32max); - *fragment_end = static_cast<uint32>(markup->length()); - - gtk_selection_data_free(data); -} - -void Clipboard::ReadRTF(ClipboardType type, std::string* result) const { - DCHECK(CalledOnValidThread()); - ReadData(GetRtfFormatType(), result); -} - -SkBitmap Clipboard::ReadImage(ClipboardType type) const { - DCHECK(CalledOnValidThread()); - ScopedGObject<GdkPixbuf>::Type pixbuf( - gtk_clipboard_wait_for_image(clipboard_)); - if (!pixbuf.get()) - return SkBitmap(); - - gfx::Canvas canvas(gfx::Size(gdk_pixbuf_get_width(pixbuf.get()), - gdk_pixbuf_get_height(pixbuf.get())), - 1.0f, false); - { - skia::ScopedPlatformPaint scoped_platform_paint(canvas.sk_canvas()); - cairo_t* context = scoped_platform_paint.GetPlatformSurface(); - gdk_cairo_set_source_pixbuf(context, pixbuf.get(), 0.0, 0.0); - cairo_paint(context); - } - return canvas.ExtractImageRep().sk_bitmap(); -} - -void Clipboard::ReadCustomData(ClipboardType clipboard_type, - const base::string16& type, - base::string16* result) const { - DCHECK(CalledOnValidThread()); - GtkClipboard* clipboard = LookupBackingClipboard(clipboard_type); - if (!clipboard) - return; - - GtkSelectionData* data = gtk_clipboard_wait_for_contents( - clipboard, GetWebCustomDataFormatType().ToGdkAtom()); - if (!data) - return; - ReadCustomDataForType(gtk_selection_data_get_data(data), - gtk_selection_data_get_length(data), - type, result); - gtk_selection_data_free(data); -} - -void Clipboard::ReadBookmark(base::string16* title, std::string* url) const { - // TODO(estade): implement this. - NOTIMPLEMENTED(); -} - -void Clipboard::ReadData(const FormatType& format, std::string* result) const { - DCHECK(CalledOnValidThread()); - result->clear(); - GtkSelectionData* data = - gtk_clipboard_wait_for_contents(clipboard_, format.ToGdkAtom()); - if (!data) - return; - result->assign(reinterpret_cast<const char*>( - gtk_selection_data_get_data(data)), - gtk_selection_data_get_length(data)); - gtk_selection_data_free(data); -} - -uint64 Clipboard::GetSequenceNumber(ClipboardType type) { - DCHECK(CalledOnValidThread()); - if (type == CLIPBOARD_TYPE_COPY_PASTE) - return SelectionChangeObserver::GetInstance()->clipboard_sequence_number(); - else - return SelectionChangeObserver::GetInstance()->primary_sequence_number(); -} - -//static -Clipboard::FormatType Clipboard::GetFormatType( - const std::string& format_string) { - return FormatType::Deserialize(format_string); -} - -// static -const Clipboard::FormatType& Clipboard::GetPlainTextFormatType() { - CR_DEFINE_STATIC_LOCAL( - FormatType, type, (GDK_TARGET_STRING)); - return type; -} - -// static -const Clipboard::FormatType& Clipboard::GetPlainTextWFormatType() { - return GetPlainTextFormatType(); -} - -// static -const Clipboard::FormatType& Clipboard::GetUrlFormatType() { - return GetPlainTextFormatType(); -} - -// static -const Clipboard::FormatType& Clipboard::GetUrlWFormatType() { - return GetPlainTextWFormatType(); -} - -// static -const Clipboard::FormatType& Clipboard::GetHtmlFormatType() { - CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeHTML)); - return type; -} - -// static -const Clipboard::FormatType& Clipboard::GetRtfFormatType() { - CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeRTF)); - return type; -} - -// static -const Clipboard::FormatType& Clipboard::GetBitmapFormatType() { - CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeBitmap)); - return type; -} - -// static -const Clipboard::FormatType& Clipboard::GetWebKitSmartPasteFormatType() { - CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeWebkitSmartPaste)); - return type; -} - -// static -const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() { - CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeWebCustomData)); - return type; -} - -// static -const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() { - CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypePepperCustomData)); - return type; -} - -void Clipboard::InsertMapping(const char* key, - char* data, - size_t data_len) { - DCHECK(clipboard_data_->find(key) == clipboard_data_->end()); - (*clipboard_data_)[key] = std::make_pair(data, data_len); -} - -GtkClipboard* Clipboard::LookupBackingClipboard(ClipboardType type) const { - switch (type) { - case CLIPBOARD_TYPE_COPY_PASTE: - return clipboard_; - case CLIPBOARD_TYPE_SELECTION: - return primary_selection_; - default: - NOTREACHED(); - return NULL; - } -} - -} // namespace ui diff --git a/chromium/ui/base/clipboard/clipboard_mac.mm b/chromium/ui/base/clipboard/clipboard_mac.mm index c4b69e804ef..0b6d3a709ae 100644 --- a/chromium/ui/base/clipboard/clipboard_mac.mm +++ b/chromium/ui/base/clipboard/clipboard_mac.mm @@ -227,18 +227,18 @@ void Clipboard::Clear(ClipboardType type) { } void Clipboard::ReadAvailableTypes(ClipboardType type, - std::vector<string16>* types, + std::vector<base::string16>* types, bool* contains_filenames) const { DCHECK(CalledOnValidThread()); types->clear(); if (IsFormatAvailable(Clipboard::GetPlainTextFormatType(), type)) - types->push_back(UTF8ToUTF16(kMimeTypeText)); + types->push_back(base::UTF8ToUTF16(kMimeTypeText)); if (IsFormatAvailable(Clipboard::GetHtmlFormatType(), type)) - types->push_back(UTF8ToUTF16(kMimeTypeHTML)); + types->push_back(base::UTF8ToUTF16(kMimeTypeHTML)); if (IsFormatAvailable(Clipboard::GetRtfFormatType(), type)) - types->push_back(UTF8ToUTF16(kMimeTypeRTF)); + types->push_back(base::UTF8ToUTF16(kMimeTypeRTF)); if ([NSImage canInitWithPasteboard:GetPasteboard()]) - types->push_back(UTF8ToUTF16(kMimeTypePNG)); + types->push_back(base::UTF8ToUTF16(kMimeTypePNG)); *contains_filenames = false; NSPasteboard* pb = GetPasteboard(); @@ -249,15 +249,13 @@ void Clipboard::ReadAvailableTypes(ClipboardType type, } } -void Clipboard::ReadText(ClipboardType type, string16* result) const { +void Clipboard::ReadText(ClipboardType type, base::string16* result) const { DCHECK(CalledOnValidThread()); DCHECK_EQ(type, CLIPBOARD_TYPE_COPY_PASTE); NSPasteboard* pb = GetPasteboard(); NSString* contents = [pb stringForType:NSStringPboardType]; - UTF8ToUTF16([contents UTF8String], - [contents lengthOfBytesUsingEncoding:NSUTF8StringEncoding], - result); + *result = base::SysNSStringToUTF16(contents); } void Clipboard::ReadAsciiText(ClipboardType type, std::string* result) const { @@ -273,7 +271,7 @@ void Clipboard::ReadAsciiText(ClipboardType type, std::string* result) const { } void Clipboard::ReadHTML(ClipboardType type, - string16* markup, + base::string16* markup, std::string* src_url, uint32* fragment_start, uint32* fragment_end) const { @@ -295,9 +293,7 @@ void Clipboard::ReadHTML(ClipboardType type, NSString* contents = [pb stringForType:bestType]; if ([bestType isEqualToString:NSRTFPboardType]) contents = [pb htmlFromRtf]; - UTF8ToUTF16([contents UTF8String], - [contents lengthOfBytesUsingEncoding:NSUTF8StringEncoding], - markup); + *markup = base::SysNSStringToUTF16(contents); } *fragment_start = 0; @@ -331,8 +327,8 @@ SkBitmap Clipboard::ReadImage(ClipboardType type) const { } void Clipboard::ReadCustomData(ClipboardType clipboard_type, - const string16& type, - string16* result) const { + const base::string16& type, + base::string16* result) const { DCHECK(CalledOnValidThread()); DCHECK_EQ(clipboard_type, CLIPBOARD_TYPE_COPY_PASTE); @@ -344,15 +340,13 @@ void Clipboard::ReadCustomData(ClipboardType clipboard_type, } } -void Clipboard::ReadBookmark(string16* title, std::string* url) const { +void Clipboard::ReadBookmark(base::string16* title, std::string* url) const { DCHECK(CalledOnValidThread()); NSPasteboard* pb = GetPasteboard(); if (title) { NSString* contents = [pb stringForType:kUTTypeURLName]; - UTF8ToUTF16([contents UTF8String], - [contents lengthOfBytesUsingEncoding:NSUTF8StringEncoding], - title); + *title = base::SysNSStringToUTF16(contents); } if (url) { diff --git a/chromium/ui/base/clipboard/clipboard_types.h b/chromium/ui/base/clipboard/clipboard_types.h index 68e44fea627..8929d921348 100644 --- a/chromium/ui/base/clipboard/clipboard_types.h +++ b/chromium/ui/base/clipboard/clipboard_types.h @@ -13,7 +13,8 @@ namespace ui { enum ClipboardType { CLIPBOARD_TYPE_COPY_PASTE, CLIPBOARD_TYPE_SELECTION, - CLIPBOARD_TYPE_DRAG + CLIPBOARD_TYPE_DRAG, + CLIPBOARD_TYPE_LAST = CLIPBOARD_TYPE_DRAG }; } // namespace ui diff --git a/chromium/ui/base/clipboard/clipboard_unittest.cc b/chromium/ui/base/clipboard/clipboard_unittest.cc index 324663aec15..72c07cf2c8a 100644 --- a/chromium/ui/base/clipboard/clipboard_unittest.cc +++ b/chromium/ui/base/clipboard/clipboard_unittest.cc @@ -10,6 +10,7 @@ #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/pickle.h" +#include "base/run_loop.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" @@ -31,22 +32,49 @@ #include "base/android/jni_string.h" #endif +#if defined(USE_AURA) +#include "ui/events/platform/platform_event_source.h" +#endif + +using base::ASCIIToUTF16; +using base::UTF8ToUTF16; +using base::UTF16ToUTF8; + namespace ui { class ClipboardTest : public PlatformTest { + public: +#if defined(USE_AURA) + ClipboardTest() : event_source_(ui::PlatformEventSource::CreateDefault()) {} +#else + ClipboardTest() {} +#endif + + static void WriteObjectsToClipboard(ui::Clipboard* clipboard, + const Clipboard::ObjectMap& objects) { + clipboard->WriteObjects(ui::CLIPBOARD_TYPE_COPY_PASTE, objects); + } + protected: Clipboard& clipboard() { return clipboard_; } + void WriteObjectsToClipboard(const Clipboard::ObjectMap& objects) { + WriteObjectsToClipboard(&clipboard(), objects); + } + private: base::MessageLoopForUI message_loop_; +#if defined(USE_AURA) + scoped_ptr<PlatformEventSource> event_source_; +#endif Clipboard clipboard_; }; namespace { -bool MarkupMatches(const string16& expected_markup, - const string16& actual_markup) { - return actual_markup.find(expected_markup) != string16::npos; +bool MarkupMatches(const base::string16& expected_markup, + const base::string16& actual_markup) { + return actual_markup.find(expected_markup) != base::string16::npos; } } // namespace @@ -67,7 +95,7 @@ TEST_F(ClipboardTest, ClearTest) { } TEST_F(ClipboardTest, TextTest) { - string16 text(ASCIIToUTF16("This is a string16!#$")), text_result; + base::string16 text(ASCIIToUTF16("This is a base::string16!#$")), text_result; std::string ascii_text; { @@ -88,8 +116,8 @@ TEST_F(ClipboardTest, TextTest) { } TEST_F(ClipboardTest, HTMLTest) { - string16 markup(ASCIIToUTF16("<string>Hi!</string>")), markup_result; - string16 plain(ASCIIToUTF16("Hi!")), plain_result; + base::string16 markup(ASCIIToUTF16("<string>Hi!</string>")), markup_result; + base::string16 plain(ASCIIToUTF16("Hi!")), plain_result; std::string url("http://www.example.com/"), url_result; { @@ -131,10 +159,12 @@ TEST_F(ClipboardTest, RTFTest) { EXPECT_EQ(rtf, result); } -#if defined(TOOLKIT_GTK) +// TODO(dnicoara) Enable test once Ozone implements clipboard support: +// crbug.com/361707 +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(USE_OZONE) TEST_F(ClipboardTest, MultipleBufferTest) { - string16 text(ASCIIToUTF16("Standard")), text_result; - string16 markup(ASCIIToUTF16("<string>Selection</string>")), markup_result; + base::string16 text(ASCIIToUTF16("Standard")), text_result; + base::string16 markup(ASCIIToUTF16("<string>Selection</string>")); std::string url("http://www.example.com/"), url_result; { @@ -164,6 +194,7 @@ TEST_F(ClipboardTest, MultipleBufferTest) { EXPECT_EQ(text, text_result); uint32 ignored; + base::string16 markup_result; clipboard().ReadHTML(CLIPBOARD_TYPE_SELECTION, &markup_result, &url_result, @@ -174,10 +205,10 @@ TEST_F(ClipboardTest, MultipleBufferTest) { #endif TEST_F(ClipboardTest, TrickyHTMLTest) { - string16 markup(ASCIIToUTF16("<em>Bye!<!--EndFragment --></em>")), + base::string16 markup(ASCIIToUTF16("<em>Bye!<!--EndFragment --></em>")), markup_result; std::string url, url_result; - string16 plain(ASCIIToUTF16("Bye!")), plain_result; + base::string16 plain(ASCIIToUTF16("Bye!")), plain_result; { ScopedClipboardWriter clipboard_writer(&clipboard(), @@ -201,7 +232,7 @@ TEST_F(ClipboardTest, TrickyHTMLTest) { #if defined(OS_WIN) TEST_F(ClipboardTest, UniodeHTMLTest) { - string16 markup(UTF8ToUTF16("<div>A \xc3\xb8 \xe6\xb0\xb4</div>")), + base::string16 markup(UTF8ToUTF16("<div>A \xc3\xb8 \xe6\xb0\xb4</div>")), markup_result; std::string url, url_result; @@ -225,31 +256,10 @@ TEST_F(ClipboardTest, UniodeHTMLTest) { } #endif // defined(OS_WIN) -#if defined(TOOLKIT_GTK) -// Regression test for crbug.com/56298 (pasting empty HTML crashes Linux). -TEST_F(ClipboardTest, EmptyHTMLTest) { - // ScopedClipboardWriter doesn't let us write empty data to the clipboard. - clipboard().clipboard_data_ = new Clipboard::TargetMap(); - // The 1 is so the compiler doesn't warn about allocating an empty array. - char* empty = new char[1]; - clipboard().InsertMapping("text/html", empty, 0U); - clipboard().SetGtkClipboard(CLIPBOARD_TYPE_COPY_PASTE); - - EXPECT_TRUE(clipboard().IsFormatAvailable(Clipboard::GetHtmlFormatType(), - CLIPBOARD_TYPE_COPY_PASTE)); - string16 markup_result; - std::string url_result; - uint32 ignored; - clipboard().ReadHTML(CLIPBOARD_TYPE_COPY_PASTE, &markup_result, &url_result, - &ignored, &ignored); - EXPECT_PRED2(MarkupMatches, string16(), markup_result); -} -#endif - // TODO(estade): Port the following test (decide what target we use for urls) #if !defined(OS_POSIX) || defined(OS_MACOSX) TEST_F(ClipboardTest, BookmarkTest) { - string16 title(ASCIIToUTF16("The Example Company")), title_result; + base::string16 title(ASCIIToUTF16("The Example Company")), title_result; std::string url("http://www.example.com/"), url_result; { @@ -267,8 +277,8 @@ TEST_F(ClipboardTest, BookmarkTest) { #endif // defined(OS_WIN) TEST_F(ClipboardTest, MultiFormatTest) { - string16 text(ASCIIToUTF16("Hi!")), text_result; - string16 markup(ASCIIToUTF16("<strong>Hi!</string>")), markup_result; + base::string16 text(ASCIIToUTF16("Hi!")), text_result; + base::string16 markup(ASCIIToUTF16("<strong>Hi!</string>")), markup_result; std::string url("http://www.example.com/"), url_result; std::string ascii_text; @@ -301,7 +311,7 @@ TEST_F(ClipboardTest, MultiFormatTest) { } TEST_F(ClipboardTest, URLTest) { - string16 url(ASCIIToUTF16("http://www.google.com/")); + base::string16 url(ASCIIToUTF16("http://www.google.com/")); { ScopedClipboardWriter clipboard_writer(&clipboard(), @@ -313,7 +323,7 @@ TEST_F(ClipboardTest, URLTest) { Clipboard::GetPlainTextWFormatType(), CLIPBOARD_TYPE_COPY_PASTE)); EXPECT_TRUE(clipboard().IsFormatAvailable(Clipboard::GetPlainTextFormatType(), CLIPBOARD_TYPE_COPY_PASTE)); - string16 text_result; + base::string16 text_result; clipboard().ReadText(CLIPBOARD_TYPE_COPY_PASTE, &text_result); EXPECT_EQ(text_result, url); @@ -329,6 +339,9 @@ TEST_F(ClipboardTest, URLTest) { #endif } +// TODO(dcheng): The tests for copying to the clipboard also test IPC +// interaction... consider moving them to a different layer so we can +// consolidate the validation logic. // Note that |bitmap_data| is not premultiplied! static void TestBitmapWrite(Clipboard* clipboard, const uint32* bitmap_data, @@ -370,7 +383,7 @@ static void TestBitmapWrite(Clipboard* clipboard, ASSERT_TRUE(Clipboard::ReplaceSharedMemHandle( &objects, handle_to_share, current_process)); - clipboard->WriteObjects(CLIPBOARD_TYPE_COPY_PASTE, objects); + ClipboardTest::WriteObjectsToClipboard(clipboard, objects); EXPECT_TRUE(clipboard->IsFormatAvailable(Clipboard::GetBitmapFormatType(), CLIPBOARD_TYPE_COPY_PASTE)); @@ -382,19 +395,8 @@ static void TestBitmapWrite(Clipboard* clipboard, for (int i = 0; i < image.width(); ++i) { int offset = i + j * image.width(); uint32 pixel = SkPreMultiplyColor(bitmap_data[offset]); -#if defined(TOOLKIT_GTK) - // Non-Aura GTK doesn't support alpha transparency. Instead, the alpha - // channel is always set to 0xFF - see http://crbug.com/154573. - // However, since we premultiplied above, we must also premultiply here - // before unpremultiplying and setting alpha to 0xFF; otherwise, the - // results will not match GTK's. - EXPECT_EQ( - SkUnPreMultiply::PMColorToColor(pixel) | 0xFF000000, row_address[i]) - << "i = " << i << ", j = " << j; -#else EXPECT_EQ(pixel, row_address[i]) << "i = " << i << ", j = " << j; -#endif // defined(TOOLKIT_GTK) } } } @@ -455,7 +457,7 @@ TEST_F(ClipboardTest, SharedBitmapWithTwoNegativeSizes) { Clipboard::ObjectMap objects; objects[Clipboard::CBF_SMBITMAP] = params; - clipboard().WriteObjects(CLIPBOARD_TYPE_COPY_PASTE, objects); + WriteObjectsToClipboard(objects); EXPECT_FALSE(clipboard().IsFormatAvailable(Clipboard::GetBitmapFormatType(), CLIPBOARD_TYPE_COPY_PASTE)); } @@ -478,7 +480,7 @@ TEST_F(ClipboardTest, SharedBitmapWithOneNegativeSize) { Clipboard::ObjectMap objects; objects[Clipboard::CBF_SMBITMAP] = params; - clipboard().WriteObjects(CLIPBOARD_TYPE_COPY_PASTE, objects); + WriteObjectsToClipboard(objects); EXPECT_FALSE(clipboard().IsFormatAvailable(Clipboard::GetBitmapFormatType(), CLIPBOARD_TYPE_COPY_PASTE)); } @@ -503,7 +505,7 @@ TEST_F(ClipboardTest, BitmapWithSuperSize) { Clipboard::ObjectMap objects; objects[Clipboard::CBF_SMBITMAP] = params; - clipboard().WriteObjects(CLIPBOARD_TYPE_COPY_PASTE, objects); + WriteObjectsToClipboard(objects); EXPECT_FALSE(clipboard().IsFormatAvailable(Clipboard::GetBitmapFormatType(), CLIPBOARD_TYPE_COPY_PASTE)); } @@ -527,7 +529,7 @@ TEST_F(ClipboardTest, BitmapWithSuperSize2) { Clipboard::ObjectMap objects; objects[Clipboard::CBF_SMBITMAP] = params; - clipboard().WriteObjects(CLIPBOARD_TYPE_COPY_PASTE, objects); + WriteObjectsToClipboard(objects); EXPECT_FALSE(clipboard().IsFormatAvailable(Clipboard::GetBitmapFormatType(), CLIPBOARD_TYPE_COPY_PASTE)); } @@ -625,7 +627,7 @@ TEST_F(ClipboardTest, HyperlinkTest) { "The <Example> Company's "home page"</a>"); std::string url_result; - string16 html_result; + base::string16 html_result; { ScopedClipboardWriter clipboard_writer(&clipboard(), CLIPBOARD_TYPE_COPY_PASTE); @@ -712,6 +714,34 @@ TEST_F(ClipboardTest, WriteEverything) { // Passes if we don't crash. } +// TODO(dcheng): Fix this test for Android. It's rather involved, since the +// clipboard change listener is posted to the Java message loop, and spinning +// that loop from C++ to trigger the callback in the test requires a non-trivial +// amount of additional work. +#if !defined(OS_ANDROID) +// Simple test that the sequence number appears to change when the clipboard is +// written to. +// TODO(dcheng): Add a version to test CLIPBOARD_TYPE_SELECTION. +TEST_F(ClipboardTest, GetSequenceNumber) { + const uint64 first_sequence_number = + clipboard().GetSequenceNumber(CLIPBOARD_TYPE_COPY_PASTE); + + { + ScopedClipboardWriter writer(&clipboard(), CLIPBOARD_TYPE_COPY_PASTE); + writer.WriteText(UTF8ToUTF16("World")); + } + + // On some platforms, the sequence number is updated by a UI callback so pump + // the message loop to make sure we get the notification. + base::RunLoop().RunUntilIdle(); + + const uint64 second_sequence_number = + clipboard().GetSequenceNumber(CLIPBOARD_TYPE_COPY_PASTE); + + EXPECT_NE(first_sequence_number, second_sequence_number); +} +#endif + #if defined(OS_ANDROID) // Test that if another application writes some text to the pasteboard the diff --git a/chromium/ui/base/clipboard/clipboard_util_win.cc b/chromium/ui/base/clipboard/clipboard_util_win.cc index b1bf562756a..aa61e6a43d6 100644 --- a/chromium/ui/base/clipboard/clipboard_util_win.cc +++ b/chromium/ui/base/clipboard/clipboard_util_win.cc @@ -10,7 +10,6 @@ #include "base/basictypes.h" #include "base/logging.h" -#include "base/memory/scoped_handle.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" @@ -34,7 +33,9 @@ bool GetData(IDataObject* data_object, return SUCCEEDED(data_object->GetData(&format_etc, medium)); } -bool GetUrlFromHDrop(IDataObject* data_object, string16* url, string16* title) { +bool GetUrlFromHDrop(IDataObject* data_object, + base::string16* url, + base::string16* title) { DCHECK(data_object && url && title); STGMEDIUM medium; @@ -67,22 +68,22 @@ bool GetUrlFromHDrop(IDataObject* data_object, string16* url, string16* title) { return success; } -void SplitUrlAndTitle(const string16& str, - string16* url, - string16* title) { +void SplitUrlAndTitle(const base::string16& str, + base::string16* url, + base::string16* title) { DCHECK(url && title); size_t newline_pos = str.find('\n'); - if (newline_pos != string16::npos) { + if (newline_pos != base::string16::npos) { url->assign(str, 0, newline_pos); - title->assign(str, newline_pos + 1, string16::npos); + title->assign(str, newline_pos + 1, base::string16::npos); } else { url->assign(str); title->assign(str); } } -bool GetFileUrl(IDataObject* data_object, string16* url, - string16* title) { +bool GetFileUrl(IDataObject* data_object, base::string16* url, + base::string16* title) { STGMEDIUM store; if (GetData(data_object, Clipboard::GetFilenameWFormatType(), &store)) { bool success = false; @@ -117,7 +118,7 @@ bool GetFileUrl(IDataObject* data_object, string16* url, DWORD file_url_len = arraysize(file_url); if (SUCCEEDED(::UrlCreateFromPathA(data.get(), file_url, &file_url_len, 0))) { - url->assign(UTF8ToWide(file_url)); + url->assign(base::UTF8ToWide(file_url)); title->assign(*url); success = true; } @@ -132,13 +133,14 @@ bool GetFileUrl(IDataObject* data_object, string16* url, } // namespace -bool ClipboardUtil::HasUrl(IDataObject* data_object) { +bool ClipboardUtil::HasUrl(IDataObject* data_object, bool convert_filenames) { DCHECK(data_object); return HasData(data_object, Clipboard::GetMozUrlFormatType()) || HasData(data_object, Clipboard::GetUrlWFormatType()) || HasData(data_object, Clipboard::GetUrlFormatType()) || - HasData(data_object, Clipboard::GetFilenameWFormatType()) || - HasData(data_object, Clipboard::GetFilenameFormatType()); + (convert_filenames && ( + HasData(data_object, Clipboard::GetFilenameWFormatType()) || + HasData(data_object, Clipboard::GetFilenameFormatType()))); } bool ClipboardUtil::HasFilenames(IDataObject* data_object) { @@ -164,9 +166,9 @@ bool ClipboardUtil::HasPlainText(IDataObject* data_object) { } bool ClipboardUtil::GetUrl(IDataObject* data_object, - string16* url, string16* title, bool convert_filenames) { + base::string16* url, base::string16* title, bool convert_filenames) { DCHECK(data_object && url && title); - if (!HasUrl(data_object)) + if (!HasUrl(data_object, convert_filenames)) return false; // Try to extract a URL from |data_object| in a variety of formats. @@ -189,7 +191,7 @@ bool ClipboardUtil::GetUrl(IDataObject* data_object, { // URL using ascii base::win::ScopedHGlobal<char> data(store.hGlobal); - SplitUrlAndTitle(UTF8ToWide(data.get()), url, title); + SplitUrlAndTitle(base::UTF8ToWide(data.get()), url, title); } ReleaseStgMedium(&store); return true; @@ -203,7 +205,7 @@ bool ClipboardUtil::GetUrl(IDataObject* data_object, } bool ClipboardUtil::GetFilenames(IDataObject* data_object, - std::vector<string16>* filenames) { + std::vector<base::string16>* filenames) { DCHECK(data_object && filenames); if (!HasFilenames(data_object)) return false; @@ -233,7 +235,7 @@ bool ClipboardUtil::GetFilenames(IDataObject* data_object, } bool ClipboardUtil::GetPlainText(IDataObject* data_object, - string16* plain_text) { + base::string16* plain_text) { DCHECK(data_object && plain_text); if (!HasPlainText(data_object)) return false; @@ -253,7 +255,7 @@ bool ClipboardUtil::GetPlainText(IDataObject* data_object, { // ascii text base::win::ScopedHGlobal<char> data(store.hGlobal); - plain_text->assign(UTF8ToWide(data.get())); + plain_text->assign(base::UTF8ToWide(data.get())); } ReleaseStgMedium(&store); return true; @@ -261,12 +263,12 @@ bool ClipboardUtil::GetPlainText(IDataObject* data_object, // If a file is dropped on the window, it does not provide either of the // plain text formats, so here we try to forcibly get a url. - string16 title; + base::string16 title; return GetUrl(data_object, plain_text, &title, false); } bool ClipboardUtil::GetHtml(IDataObject* data_object, - string16* html, std::string* base_url) { + base::string16* html, std::string* base_url) { DCHECK(data_object && html && base_url); STGMEDIUM store; @@ -278,7 +280,7 @@ bool ClipboardUtil::GetHtml(IDataObject* data_object, std::string html_utf8; CFHtmlToHtml(std::string(data.get(), data.Size()), &html_utf8, base_url); - html->assign(UTF8ToWide(html_utf8)); + html->assign(base::UTF8ToWide(html_utf8)); } ReleaseStgMedium(&store); return true; @@ -300,7 +302,7 @@ bool ClipboardUtil::GetHtml(IDataObject* data_object, } bool ClipboardUtil::GetFileContents(IDataObject* data_object, - string16* filename, std::string* file_contents) { + base::string16* filename, std::string* file_contents) { DCHECK(data_object && filename && file_contents); if (!HasData(data_object, Clipboard::GetFileContentZeroFormatType()) && !HasData(data_object, Clipboard::GetFileDescriptorFormatType())) @@ -334,7 +336,8 @@ bool ClipboardUtil::GetFileContents(IDataObject* data_object, } bool ClipboardUtil::GetWebCustomData( - IDataObject* data_object, std::map<string16, string16>* custom_data) { + IDataObject* data_object, + std::map<base::string16, base::string16>* custom_data) { DCHECK(data_object && custom_data); if (!HasData(data_object, Clipboard::GetWebCustomDataFormatType())) @@ -452,7 +455,7 @@ void ClipboardUtil::CFHtmlToHtml(const std::string& cf_html, fragment_start != std::string::npos && fragment_end != std::string::npos) { *html = cf_html.substr(fragment_start, fragment_end - fragment_start); - TrimWhitespace(*html, TRIM_ALL, html); + base::TrimWhitespace(*html, base::TRIM_ALL, html); } } @@ -470,7 +473,7 @@ void ClipboardUtil::CFHtmlExtractMetadata(const std::string& cf_html, size_t src_start = line_start + src_url_str.length(); if (src_end != std::string::npos && src_start != std::string::npos) { *base_url = cf_html.substr(src_start, src_end - src_start); - TrimWhitespace(*base_url, TRIM_ALL, base_url); + base::TrimWhitespace(*base_url, base::TRIM_ALL, base_url); } } } diff --git a/chromium/ui/base/clipboard/clipboard_util_win.h b/chromium/ui/base/clipboard/clipboard_util_win.h index f55853dd327..12e668f079e 100644 --- a/chromium/ui/base/clipboard/clipboard_util_win.h +++ b/chromium/ui/base/clipboard/clipboard_util_win.h @@ -13,16 +13,16 @@ #include <vector> #include "base/strings/string16.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { -class UI_EXPORT ClipboardUtil { +class UI_BASE_EXPORT ClipboardUtil { public: ///////////////////////////////////////////////////////////////////////////// // These methods check to see if |data_object| has the requested type. // Returns true if it does. - static bool HasUrl(IDataObject* data_object); + static bool HasUrl(IDataObject* data_object, bool convert_filenames); static bool HasFilenames(IDataObject* data_object); static bool HasPlainText(IDataObject* data_object); static bool HasFileContents(IDataObject* data_object); @@ -32,24 +32,26 @@ class UI_EXPORT ClipboardUtil { // Helper methods to extract information from an IDataObject. These methods // return true if the requested data type is found in |data_object|. static bool GetUrl(IDataObject* data_object, - string16* url, - string16* title, + base::string16* url, + base::string16* title, bool convert_filenames); static bool GetFilenames(IDataObject* data_object, - std::vector<string16>* filenames); - static bool GetPlainText(IDataObject* data_object, string16* plain_text); + std::vector<base::string16>* filenames); + static bool GetPlainText(IDataObject* data_object, + base::string16* plain_text); static bool GetHtml(IDataObject* data_object, - string16* text_html, + base::string16* text_html, std::string* base_url); static bool GetFileContents(IDataObject* data_object, - string16* filename, + base::string16* filename, std::string* file_contents); // This represents custom MIME types a web page might set to transport its // own types of data for drag and drop. It is sandboxed in its own CLIPFORMAT // to avoid polluting the ::RegisterClipboardFormat() namespace with random // strings from web content. - static bool GetWebCustomData(IDataObject* data_object, - std::map<string16, string16>* custom_data); + static bool GetWebCustomData( + IDataObject* data_object, + std::map<base::string16, base::string16>* custom_data); // Helper method for converting between MS CF_HTML format and plain // text/html. diff --git a/chromium/ui/base/clipboard/clipboard_win.cc b/chromium/ui/base/clipboard/clipboard_win.cc index 24875aae013..36d042d7abc 100644 --- a/chromium/ui/base/clipboard/clipboard_win.cc +++ b/chromium/ui/base/clipboard/clipboard_win.cc @@ -7,8 +7,8 @@ #include "ui/base/clipboard/clipboard.h" -#include <shlobj.h> #include <shellapi.h> +#include <shlobj.h> #include "base/basictypes.h" #include "base/bind.h" @@ -16,7 +16,7 @@ #include "base/logging.h" #include "base/memory/shared_memory.h" #include "base/message_loop/message_loop.h" -#include "base/safe_numerics.h" +#include "base/numerics/safe_conversions.h" #include "base/stl_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" @@ -208,7 +208,7 @@ bool Clipboard::FormatType::Equals(const FormatType& other) const { } Clipboard::Clipboard() { - if (base::MessageLoop::current()->type() == base::MessageLoop::TYPE_UI) + if (base::MessageLoopForUI::IsCurrent()) clipboard_owner_.reset(new base::win::MessageWindow()); } @@ -231,8 +231,8 @@ void Clipboard::WriteObjects(ClipboardType type, const ObjectMap& objects) { } void Clipboard::WriteText(const char* text_data, size_t text_len) { - string16 text; - UTF8ToUTF16(text_data, text_len, &text); + base::string16 text; + base::UTF8ToUTF16(text_data, text_len, &text); HGLOBAL glob = CreateGlobalData(text); WriteToClipboard(CF_UNICODETEXT, glob); @@ -266,7 +266,7 @@ void Clipboard::WriteBookmark(const char* title_data, bookmark.append(1, L'\n'); bookmark.append(url_data, url_len); - string16 wide_bookmark = UTF8ToWide(bookmark); + base::string16 wide_bookmark = base::UTF8ToWide(bookmark); HGLOBAL glob = CreateGlobalData(wide_bookmark); WriteToClipboard(GetUrlWFormatType().ToUINT(), glob); @@ -399,7 +399,7 @@ void Clipboard::Clear(ClipboardType type) { } void Clipboard::ReadAvailableTypes(ClipboardType type, - std::vector<string16>* types, + std::vector<base::string16>* types, bool* contains_filenames) const { if (!types || !contains_filenames) { NOTREACHED(); @@ -408,13 +408,13 @@ void Clipboard::ReadAvailableTypes(ClipboardType type, types->clear(); if (::IsClipboardFormatAvailable(GetPlainTextFormatType().ToUINT())) - types->push_back(UTF8ToUTF16(kMimeTypeText)); + types->push_back(base::UTF8ToUTF16(kMimeTypeText)); if (::IsClipboardFormatAvailable(GetHtmlFormatType().ToUINT())) - types->push_back(UTF8ToUTF16(kMimeTypeHTML)); + types->push_back(base::UTF8ToUTF16(kMimeTypeHTML)); if (::IsClipboardFormatAvailable(GetRtfFormatType().ToUINT())) - types->push_back(UTF8ToUTF16(kMimeTypeRTF)); + types->push_back(base::UTF8ToUTF16(kMimeTypeRTF)); if (::IsClipboardFormatAvailable(CF_DIB)) - types->push_back(UTF8ToUTF16(kMimeTypePNG)); + types->push_back(base::UTF8ToUTF16(kMimeTypePNG)); *contains_filenames = false; // Acquire the clipboard. @@ -430,7 +430,7 @@ void Clipboard::ReadAvailableTypes(ClipboardType type, ::GlobalUnlock(hdata); } -void Clipboard::ReadText(ClipboardType type, string16* result) const { +void Clipboard::ReadText(ClipboardType type, base::string16* result) const { DCHECK_EQ(type, CLIPBOARD_TYPE_COPY_PASTE); if (!result) { NOTREACHED(); @@ -448,7 +448,7 @@ void Clipboard::ReadText(ClipboardType type, string16* result) const { if (!data) return; - result->assign(static_cast<const char16*>(::GlobalLock(data))); + result->assign(static_cast<const base::char16*>(::GlobalLock(data))); ::GlobalUnlock(data); } @@ -475,7 +475,7 @@ void Clipboard::ReadAsciiText(ClipboardType type, std::string* result) const { } void Clipboard::ReadHTML(ClipboardType type, - string16* markup, + base::string16* markup, std::string* src_url, uint32* fragment_start, uint32* fragment_end) const { @@ -522,8 +522,8 @@ void Clipboard::ReadHTML(ClipboardType type, offsets.push_back(end_index - html_start); markup->assign(base::UTF8ToUTF16AndAdjustOffsets(cf_html.data() + html_start, &offsets)); - *fragment_start = base::checked_numeric_cast<uint32>(offsets[0]); - *fragment_end = base::checked_numeric_cast<uint32>(offsets[1]); + *fragment_start = base::checked_cast<uint32>(offsets[0]); + *fragment_end = base::checked_cast<uint32>(offsets[1]); } void Clipboard::ReadRTF(ClipboardType type, std::string* result) const { @@ -603,8 +603,8 @@ SkBitmap Clipboard::ReadImage(ClipboardType type) const { } void Clipboard::ReadCustomData(ClipboardType clipboard_type, - const string16& type, - string16* result) const { + const base::string16& type, + base::string16* result) const { DCHECK_EQ(clipboard_type, CLIPBOARD_TYPE_COPY_PASTE); // Acquire the clipboard. @@ -620,7 +620,7 @@ void Clipboard::ReadCustomData(ClipboardType clipboard_type, ::GlobalUnlock(hdata); } -void Clipboard::ReadBookmark(string16* title, std::string* url) const { +void Clipboard::ReadBookmark(base::string16* title, std::string* url) const { if (title) title->clear(); @@ -636,7 +636,7 @@ void Clipboard::ReadBookmark(string16* title, std::string* url) const { if (!data) return; - string16 bookmark(static_cast<const char16*>(::GlobalLock(data))); + base::string16 bookmark(static_cast<const base::char16*>(::GlobalLock(data))); ::GlobalUnlock(data); ParseBookmarkClipboardFormat(bookmark, title, url); @@ -662,10 +662,10 @@ void Clipboard::ReadData(const FormatType& format, std::string* result) const { } // static -void Clipboard::ParseBookmarkClipboardFormat(const string16& bookmark, - string16* title, +void Clipboard::ParseBookmarkClipboardFormat(const base::string16& bookmark, + base::string16* title, std::string* url) { - const string16 kDelim = ASCIIToUTF16("\r\n"); + const base::string16 kDelim = base::ASCIIToUTF16("\r\n"); const size_t title_end = bookmark.find_first_of(kDelim); if (title) @@ -673,8 +673,10 @@ void Clipboard::ParseBookmarkClipboardFormat(const string16& bookmark, if (url) { const size_t url_start = bookmark.find_first_not_of(kDelim, title_end); - if (url_start != string16::npos) - *url = UTF16ToUTF8(bookmark.substr(url_start, string16::npos)); + if (url_start != base::string16::npos) { + *url = base::UTF16ToUTF8( + bookmark.substr(url_start, base::string16::npos)); + } } } @@ -682,7 +684,7 @@ void Clipboard::ParseBookmarkClipboardFormat(const string16& bookmark, Clipboard::FormatType Clipboard::GetFormatType( const std::string& format_string) { return FormatType( - ::RegisterClipboardFormat(ASCIIToWide(format_string).c_str())); + ::RegisterClipboardFormat(base::ASCIIToWide(format_string).c_str())); } // static diff --git a/chromium/ui/base/clipboard/custom_data_helper.cc b/chromium/ui/base/clipboard/custom_data_helper.cc index f0b3aa30846..a6ac8d2b107 100644 --- a/chromium/ui/base/clipboard/custom_data_helper.cc +++ b/chromium/ui/base/clipboard/custom_data_helper.cc @@ -4,7 +4,7 @@ // // TODO(dcheng): For efficiency reasons, consider passing custom data around // as a vector instead. It allows us to append a -// std::pair<string16, string16> and swap the deserialized values in. +// std::pair<base::string16, base::string16> and swap the deserialized values. #include "ui/base/clipboard/custom_data_helper.h" diff --git a/chromium/ui/base/clipboard/custom_data_helper.h b/chromium/ui/base/clipboard/custom_data_helper.h index 55e7dce3829..8c927aaecc5 100644 --- a/chromium/ui/base/clipboard/custom_data_helper.h +++ b/chromium/ui/base/clipboard/custom_data_helper.h @@ -14,7 +14,7 @@ #include <vector> #include "base/strings/string16.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" class Pickle; @@ -28,25 +28,25 @@ class NSString; namespace ui { -#if defined(OS_MACOSX) -UI_EXPORT extern NSString* const kWebCustomDataPboardType; -#elif (!defined(OS_WIN) && defined(USE_AURA)) || defined(TOOLKIT_GTK) -UI_EXPORT extern const char kMimeTypeWebCustomData[]; +#if defined(OS_MACOSX) && !defined(USE_AURA) +UI_BASE_EXPORT extern NSString* const kWebCustomDataPboardType; +#elif !defined(OS_WIN) && defined(USE_AURA) +UI_BASE_EXPORT extern const char kMimeTypeWebCustomData[]; #endif -UI_EXPORT void ReadCustomDataTypes(const void* data, - size_t data_length, - std::vector<base::string16>* types); -UI_EXPORT void ReadCustomDataForType(const void* data, - size_t data_length, - const base::string16& type, - base::string16* result); -UI_EXPORT void ReadCustomDataIntoMap( +UI_BASE_EXPORT void ReadCustomDataTypes(const void* data, + size_t data_length, + std::vector<base::string16>* types); +UI_BASE_EXPORT void ReadCustomDataForType(const void* data, + size_t data_length, + const base::string16& type, + base::string16* result); +UI_BASE_EXPORT void ReadCustomDataIntoMap( const void* data, size_t data_length, std::map<base::string16, base::string16>* result); -UI_EXPORT void WriteCustomDataToPickle( +UI_BASE_EXPORT void WriteCustomDataToPickle( const std::map<base::string16, base::string16>& data, Pickle* pickle); diff --git a/chromium/ui/base/clipboard/custom_data_helper_linux.cc b/chromium/ui/base/clipboard/custom_data_helper_linux.cc index 87ebd394b86..d8cc89edff5 100644 --- a/chromium/ui/base/clipboard/custom_data_helper_linux.cc +++ b/chromium/ui/base/clipboard/custom_data_helper_linux.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "build/build_config.h" #include "ui/base/clipboard/custom_data_helper.h" namespace ui { diff --git a/chromium/ui/base/clipboard/custom_data_helper_mac.mm b/chromium/ui/base/clipboard/custom_data_helper_mac.mm index 5447ae30347..ae4362194f8 100644 --- a/chromium/ui/base/clipboard/custom_data_helper_mac.mm +++ b/chromium/ui/base/clipboard/custom_data_helper_mac.mm @@ -9,6 +9,10 @@ namespace ui { // TODO(dcheng): This name is temporary. See crbug.com/106449. +#if defined(USE_AURA) +const char kMimeTypeWebCustomData[] = "chromium/x-web-custom-data"; +#else NSString* const kWebCustomDataPboardType = @"org.chromium.web-custom-data"; +#endif } // namespace ui diff --git a/chromium/ui/base/clipboard/custom_data_helper_unittest.cc b/chromium/ui/base/clipboard/custom_data_helper_unittest.cc index 3183b2bd25d..bc79d907513 100644 --- a/chromium/ui/base/clipboard/custom_data_helper_unittest.cc +++ b/chromium/ui/base/clipboard/custom_data_helper_unittest.cc @@ -10,18 +10,20 @@ #include "base/strings/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" +using base::ASCIIToUTF16; + namespace ui { namespace { void PrepareEmptyTestData(Pickle* pickle) { - std::map<string16, string16> data; + std::map<base::string16, base::string16> data; WriteCustomDataToPickle(data, pickle); } void PrepareTestData(Pickle* pickle) { - std::map<string16, string16> data; - data.insert(std::make_pair(ASCIIToUTF16("abc"), string16())); + std::map<base::string16, base::string16> data; + data.insert(std::make_pair(ASCIIToUTF16("abc"), base::string16())); data.insert(std::make_pair(ASCIIToUTF16("de"), ASCIIToUTF16("1"))); data.insert(std::make_pair(ASCIIToUTF16("f"), ASCIIToUTF16("23"))); WriteCustomDataToPickle(data, pickle); @@ -31,7 +33,7 @@ TEST(CustomDataHelperTest, EmptyReadTypes) { Pickle pickle; PrepareEmptyTestData(&pickle); - std::vector<string16> types; + std::vector<base::string16> types; ReadCustomDataTypes(pickle.data(), pickle.size(), &types); EXPECT_EQ(0u, types.size()); } @@ -40,19 +42,19 @@ TEST(CustomDataHelperTest, EmptyReadSingleType) { Pickle pickle; PrepareEmptyTestData(&pickle); - string16 result; + base::string16 result; ReadCustomDataForType(pickle.data(), pickle.size(), ASCIIToUTF16("f"), &result); - EXPECT_EQ(string16(), result); + EXPECT_EQ(base::string16(), result); } TEST(CustomDataHelperTest, EmptyReadMap) { Pickle pickle; PrepareEmptyTestData(&pickle); - std::map<string16, string16> result; + std::map<base::string16, base::string16> result; ReadCustomDataIntoMap(pickle.data(), pickle.size(), &result); EXPECT_EQ(0u, result.size()); } @@ -61,10 +63,10 @@ TEST(CustomDataHelperTest, ReadTypes) { Pickle pickle; PrepareTestData(&pickle); - std::vector<string16> types; + std::vector<base::string16> types; ReadCustomDataTypes(pickle.data(), pickle.size(), &types); - std::vector<string16> expected; + std::vector<base::string16> expected; expected.push_back(ASCIIToUTF16("abc")); expected.push_back(ASCIIToUTF16("de")); expected.push_back(ASCIIToUTF16("f")); @@ -75,12 +77,12 @@ TEST(CustomDataHelperTest, ReadSingleType) { Pickle pickle; PrepareTestData(&pickle); - string16 result; + base::string16 result; ReadCustomDataForType(pickle.data(), pickle.size(), ASCIIToUTF16("abc"), &result); - EXPECT_EQ(string16(), result); + EXPECT_EQ(base::string16(), result); ReadCustomDataForType(pickle.data(), pickle.size(), @@ -99,11 +101,11 @@ TEST(CustomDataHelperTest, ReadMap) { Pickle pickle; PrepareTestData(&pickle); - std::map<string16, string16> result; + std::map<base::string16, base::string16> result; ReadCustomDataIntoMap(pickle.data(), pickle.size(), &result); - std::map<string16, string16> expected; - expected.insert(std::make_pair(ASCIIToUTF16("abc"), string16())); + std::map<base::string16, base::string16> expected; + expected.insert(std::make_pair(ASCIIToUTF16("abc"), base::string16())); expected.insert(std::make_pair(ASCIIToUTF16("de"), ASCIIToUTF16("1"))); expected.insert(std::make_pair(ASCIIToUTF16("f"), ASCIIToUTF16("23"))); EXPECT_EQ(expected, result); @@ -112,7 +114,7 @@ TEST(CustomDataHelperTest, ReadMap) { TEST(CustomDataHelperTest, BadReadTypes) { // ReadCustomDataTypes makes the additional guarantee that the contents of the // result vector will not change if the input is malformed. - std::vector<string16> expected; + std::vector<base::string16> expected; expected.push_back(ASCIIToUTF16("abc")); expected.push_back(ASCIIToUTF16("de")); expected.push_back(ASCIIToUTF16("f")); @@ -121,21 +123,21 @@ TEST(CustomDataHelperTest, BadReadTypes) { malformed.WriteUInt64(1000); malformed.WriteString16(ASCIIToUTF16("hello")); malformed.WriteString16(ASCIIToUTF16("world")); - std::vector<string16> actual(expected); + std::vector<base::string16> actual(expected); ReadCustomDataTypes(malformed.data(), malformed.size(), &actual); EXPECT_EQ(expected, actual); Pickle malformed2; malformed2.WriteUInt64(1); malformed2.WriteString16(ASCIIToUTF16("hello")); - std::vector<string16> actual2(expected); + std::vector<base::string16> actual2(expected); ReadCustomDataTypes(malformed2.data(), malformed2.size(), &actual2); EXPECT_EQ(expected, actual2); } TEST(CustomDataHelperTest, BadPickle) { - string16 result_data; - std::map<string16, string16> result_map; + base::string16 result_data; + std::map<base::string16, base::string16> result_map; Pickle malformed; malformed.WriteUInt64(1000); diff --git a/chromium/ui/base/clipboard/scoped_clipboard_writer.cc b/chromium/ui/base/clipboard/scoped_clipboard_writer.cc index 120832f4a4f..380b8d2fb84 100644 --- a/chromium/ui/base/clipboard/scoped_clipboard_writer.cc +++ b/chromium/ui/base/clipboard/scoped_clipboard_writer.cc @@ -36,7 +36,7 @@ void ScopedClipboardWriter::WriteURL(const base::string16& text) { void ScopedClipboardWriter::WriteHTML(const base::string16& markup, const std::string& source_url) { - std::string utf8_markup = UTF16ToUTF8(markup); + std::string utf8_markup = base::UTF16ToUTF8(markup); Clipboard::ObjectMapParams parameters; parameters.push_back( @@ -62,7 +62,7 @@ void ScopedClipboardWriter::WriteBookmark(const base::string16& bookmark_title, if (bookmark_title.empty() || url.empty()) return; - std::string utf8_markup = UTF16ToUTF8(bookmark_title); + std::string utf8_markup = base::UTF16ToUTF8(bookmark_title); Clipboard::ObjectMapParams parameters; parameters.push_back(Clipboard::ObjectMapParam(utf8_markup.begin(), @@ -80,9 +80,9 @@ void ScopedClipboardWriter::WriteHyperlink(const base::string16& anchor_text, std::string html("<a href=\""); html.append(net::EscapeForHTML(url)); html.append("\">"); - html.append(net::EscapeForHTML(UTF16ToUTF8(anchor_text))); + html.append(net::EscapeForHTML(base::UTF16ToUTF8(anchor_text))); html.append("</a>"); - WriteHTML(UTF8ToUTF16(html), std::string()); + WriteHTML(base::UTF8ToUTF16(html), std::string()); } void ScopedClipboardWriter::WriteWebSmartPaste() { @@ -113,7 +113,7 @@ void ScopedClipboardWriter::Reset() { void ScopedClipboardWriter::WriteTextOrURL(const base::string16& text, bool is_url) { - std::string utf8_text = UTF16ToUTF8(text); + std::string utf8_text = base::UTF16ToUTF8(text); Clipboard::ObjectMapParams parameters; parameters.push_back(Clipboard::ObjectMapParam(utf8_text.begin(), diff --git a/chromium/ui/base/clipboard/scoped_clipboard_writer.h b/chromium/ui/base/clipboard/scoped_clipboard_writer.h index 8c7bb1a668b..504d2e3c13e 100644 --- a/chromium/ui/base/clipboard/scoped_clipboard_writer.h +++ b/chromium/ui/base/clipboard/scoped_clipboard_writer.h @@ -15,7 +15,7 @@ #include "base/strings/string16.h" #include "ui/base/clipboard/clipboard.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" class Pickle; @@ -25,7 +25,7 @@ namespace ui { // into a Clipboard::ObjectMap. // NB: You should probably NOT be using this class if you include // webkit_glue.h. Use ScopedClipboardWriterGlue instead. -class UI_EXPORT ScopedClipboardWriter { +class UI_BASE_EXPORT ScopedClipboardWriter { public: // Create an instance that is a simple wrapper around clipboard. ScopedClipboardWriter(Clipboard* clipboard, ClipboardType type); diff --git a/chromium/ui/base/cocoa/appkit_utils.h b/chromium/ui/base/cocoa/appkit_utils.h index 159921bd136..18f1fdfa368 100644 --- a/chromium/ui/base/cocoa/appkit_utils.h +++ b/chromium/ui/base/cocoa/appkit_utils.h @@ -7,7 +7,7 @@ #import <Cocoa/Cocoa.h> -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { @@ -23,12 +23,17 @@ struct NinePartImageIds { int bottom_right; }; +// A macro to define arrays of IDR constants used with DrawNinePartImage. +#define IMAGE_GRID(x) { x ## _TOP_LEFT, x ## _TOP, x ## _TOP_RIGHT, \ + x ## _LEFT, x ## _CENTER, x ## _RIGHT, \ + x ## _BOTTOM_LEFT, x ## _BOTTOM, x ## _BOTTOM_RIGHT, } + // Utility method to draw a nine part image using image ids. -UI_EXPORT void DrawNinePartImage(NSRect frame, - const NinePartImageIds& image_ids, - NSCompositingOperation operation, - CGFloat alpha, - BOOL flipped); +UI_BASE_EXPORT void DrawNinePartImage(NSRect frame, + const NinePartImageIds& image_ids, + NSCompositingOperation operation, + CGFloat alpha, + BOOL flipped); } // namespace ui diff --git a/chromium/ui/base/cocoa/base_view.h b/chromium/ui/base/cocoa/base_view.h index 60f0c39d30d..ac7bba42175 100644 --- a/chromium/ui/base/cocoa/base_view.h +++ b/chromium/ui/base/cocoa/base_view.h @@ -9,14 +9,14 @@ #include "base/mac/scoped_nsobject.h" #import "ui/base/cocoa/tracking_area.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/rect.h" // A view that provides common functionality that many views will need: // - Automatic registration for mouse-moved events. // - Funneling of mouse and key events to two methods // - Coordinate conversion utilities -UI_EXPORT +UI_BASE_EXPORT @interface BaseView : NSView { @public enum EventHandled { @@ -47,7 +47,7 @@ UI_EXPORT // The name is |kViewDidBecomeFirstResponder|, the object is the view, and the // NSSelectionDirection is wrapped in an NSNumber under the key // |kSelectionDirection|. -UI_EXPORT extern NSString* kViewDidBecomeFirstResponder; -UI_EXPORT extern NSString* kSelectionDirection; +UI_BASE_EXPORT extern NSString* kViewDidBecomeFirstResponder; +UI_BASE_EXPORT extern NSString* kSelectionDirection; #endif // UI_BASE_COCOA_BASE_VIEW_H_ diff --git a/chromium/ui/base/cocoa/base_view_unittest.mm b/chromium/ui/base/cocoa/base_view_unittest.mm index f9b06904e03..ceb1c656a90 100644 --- a/chromium/ui/base/cocoa/base_view_unittest.mm +++ b/chromium/ui/base/cocoa/base_view_unittest.mm @@ -8,7 +8,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" #include "ui/base/cocoa/base_view.h" -#import "ui/base/test/ui_cocoa_test_helper.h" +#import "ui/gfx/test/ui_cocoa_test_helper.h" namespace { diff --git a/chromium/ui/base/cocoa/cocoa_base_utils.h b/chromium/ui/base/cocoa/cocoa_base_utils.h new file mode 100644 index 00000000000..c479f72f2a5 --- /dev/null +++ b/chromium/ui/base/cocoa/cocoa_base_utils.h @@ -0,0 +1,31 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_COCOA_COCOA_BASE_UTILS_H_ +#define UI_BASE_COCOA_COCOA_BASE_UTILS_H_ + +#import <Cocoa/Cocoa.h> + +#include "ui/base/ui_base_export.h" +#include "ui/base/window_open_disposition.h" + +namespace ui { + +// Retrieves the WindowOpenDisposition used to open a link from a user gesture +// represented by |event|. For example, a Cmd+Click would mean open the +// associated link in a background tab. +UI_BASE_EXPORT WindowOpenDisposition + WindowOpenDispositionFromNSEvent(NSEvent* event); + +// Retrieves the WindowOpenDisposition used to open a link from a user gesture +// represented by |event|, but instead use the modifier flags given by |flags|, +// which is the same format as |-NSEvent modifierFlags|. This allows +// substitution of the modifiers without having to create a new event from +// scratch. +UI_BASE_EXPORT WindowOpenDisposition + WindowOpenDispositionFromNSEventWithFlags(NSEvent* event, NSUInteger flags); + +} // namespace ui + +#endif // UI_BASE_COCOA_COCOA_BASE_UTILS_H_ diff --git a/chromium/ui/base/cocoa/cocoa_base_utils.mm b/chromium/ui/base/cocoa/cocoa_base_utils.mm new file mode 100644 index 00000000000..0830f3488a8 --- /dev/null +++ b/chromium/ui/base/cocoa/cocoa_base_utils.mm @@ -0,0 +1,22 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/cocoa/cocoa_base_utils.h" + +#include "ui/events/cocoa/cocoa_event_utils.h" + +namespace ui { + +WindowOpenDisposition WindowOpenDispositionFromNSEvent(NSEvent* event) { + NSUInteger modifiers = [event modifierFlags]; + return WindowOpenDispositionFromNSEventWithFlags(event, modifiers); +} + +WindowOpenDisposition WindowOpenDispositionFromNSEventWithFlags( + NSEvent* event, NSUInteger modifiers) { + int event_flags = EventFlagsFromNSEventWithModifiers(event, modifiers); + return DispositionFromEventFlags(event_flags); +} + +} // namespace ui diff --git a/chromium/ui/base/cocoa/cocoa_base_utils_unittest.mm b/chromium/ui/base/cocoa/cocoa_base_utils_unittest.mm new file mode 100644 index 00000000000..5749e2d176c --- /dev/null +++ b/chromium/ui/base/cocoa/cocoa_base_utils_unittest.mm @@ -0,0 +1,68 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/cocoa/cocoa_base_utils.h" + +#import <objc/objc-class.h> + +#include "testing/gtest/include/gtest/gtest.h" +#include "testing/platform_test.h" +#include "ui/events/event_constants.h" +#import "ui/events/test/cocoa_test_event_utils.h" +#import "ui/gfx/test/ui_cocoa_test_helper.h" + +// We provide a donor class with a specially modified |modifierFlags| +// implementation that we swap with NSEvent's. This is because we can't create a +// NSEvent that represents a middle click with modifiers. +@interface TestEvent : NSObject +@end +@implementation TestEvent +- (NSUInteger)modifierFlags { return NSShiftKeyMask; } +@end + +namespace ui { + +namespace { + +class CocoaBaseUtilsTest : public CocoaTest { +}; + +TEST_F(CocoaBaseUtilsTest, WindowOpenDispositionFromNSEvent) { + // Left Click = same tab. + NSEvent* me = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, 0); + EXPECT_EQ(CURRENT_TAB, WindowOpenDispositionFromNSEvent(me)); + + // Middle Click = new background tab. + me = cocoa_test_event_utils::MouseEventWithType(NSOtherMouseUp, 0); + EXPECT_EQ(NEW_BACKGROUND_TAB, WindowOpenDispositionFromNSEvent(me)); + + // Shift+Middle Click = new foreground tab. + { + ScopedClassSwizzler swizzler([NSEvent class], [TestEvent class], + @selector(modifierFlags)); + me = cocoa_test_event_utils::MouseEventWithType(NSOtherMouseUp, + NSShiftKeyMask); + EXPECT_EQ(NEW_FOREGROUND_TAB, WindowOpenDispositionFromNSEvent(me)); + } + + // Cmd+Left Click = new background tab. + me = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, + NSCommandKeyMask); + EXPECT_EQ(NEW_BACKGROUND_TAB, WindowOpenDispositionFromNSEvent(me)); + + // Cmd+Shift+Left Click = new foreground tab. + me = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, + NSCommandKeyMask | + NSShiftKeyMask); + EXPECT_EQ(NEW_FOREGROUND_TAB, WindowOpenDispositionFromNSEvent(me)); + + // Shift+Left Click = new window + me = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, + NSShiftKeyMask); + EXPECT_EQ(NEW_WINDOW, WindowOpenDispositionFromNSEvent(me)); +} + +} // namespace + +} // namespace ui diff --git a/chromium/ui/base/cocoa/cocoa_event_utils.h b/chromium/ui/base/cocoa/cocoa_event_utils.h deleted file mode 100644 index 1432f2dd6bd..00000000000 --- a/chromium/ui/base/cocoa/cocoa_event_utils.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_COCOA_COCOA_EVENT_UTILS_H_ -#define UI_BASE_COCOA_COCOA_EVENT_UTILS_H_ - -#import <Cocoa/Cocoa.h> - -#include "ui/base/ui_export.h" -#include "ui/base/window_open_disposition.h" - -namespace ui { - -// Retrieves a bitsum of ui::EventFlags represented by |event|, -UI_EXPORT int EventFlagsFromNSEvent(NSEvent* event); - -// Retrieves a bitsum of ui::EventFlags represented by |event|, -// but instead use the modifier flags given by |modifiers|, -// which is the same format as |-NSEvent modifierFlags|. This allows -// substitution of the modifiers without having to create a new event from -// scratch. -UI_EXPORT int EventFlagsFromNSEventWithModifiers(NSEvent* event, - NSUInteger modifiers); - -// Retrieves the WindowOpenDisposition used to open a link from a user gesture -// represented by |event|. For example, a Cmd+Click would mean open the -// associated link in a background tab. -UI_EXPORT WindowOpenDisposition WindowOpenDispositionFromNSEvent( - NSEvent* event); - -// Retrieves the WindowOpenDisposition used to open a link from a user gesture -// represented by |event|, but instead use the modifier flags given by |flags|, -// which is the same format as |-NSEvent modifierFlags|. This allows -// substitution of the modifiers without having to create a new event from -// scratch. -UI_EXPORT WindowOpenDisposition WindowOpenDispositionFromNSEventWithFlags( - NSEvent* event, NSUInteger flags); - -} // namespace ui - -#endif // UI_BASE_COCOA_COCOA_EVENT_UTILS_H_ diff --git a/chromium/ui/base/cocoa/cocoa_event_utils.mm b/chromium/ui/base/cocoa/cocoa_event_utils.mm deleted file mode 100644 index a8fd8c38a1c..00000000000 --- a/chromium/ui/base/cocoa/cocoa_event_utils.mm +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import "ui/base/cocoa/cocoa_event_utils.h" - -#include "ui/events/event_constants.h" -#include "ui/base/window_open_disposition.h" - -namespace { - -bool isLeftButtonEvent(NSEvent* event) { - NSEventType type = [event type]; - return type == NSLeftMouseDown || - type == NSLeftMouseDragged || - type == NSLeftMouseUp; -} - -bool isRightButtonEvent(NSEvent* event) { - NSEventType type = [event type]; - return type == NSRightMouseDown || - type == NSRightMouseDragged || - type == NSRightMouseUp; -} - -bool isMiddleButtonEvent(NSEvent* event) { - if ([event buttonNumber] != 2) - return false; - - NSEventType type = [event type]; - return type == NSOtherMouseDown || - type == NSOtherMouseDragged || - type == NSOtherMouseUp; -} - -} // namespace - -namespace ui { - -// Retrieves a bitsum of ui::EventFlags from NSEvent. -int EventFlagsFromNSEvent(NSEvent* event) { - NSUInteger modifiers = [event modifierFlags]; - return EventFlagsFromNSEventWithModifiers(event, modifiers); -} - -int EventFlagsFromNSEventWithModifiers(NSEvent* event, NSUInteger modifiers) { - int flags = 0; - flags |= (modifiers & NSAlphaShiftKeyMask) ? ui::EF_CAPS_LOCK_DOWN : 0; - flags |= (modifiers & NSShiftKeyMask) ? ui::EF_SHIFT_DOWN : 0; - flags |= (modifiers & NSControlKeyMask) ? ui::EF_CONTROL_DOWN : 0; - flags |= (modifiers & NSAlternateKeyMask) ? ui::EF_ALT_DOWN : 0; - flags |= (modifiers & NSCommandKeyMask) ? ui::EF_COMMAND_DOWN : 0; - flags |= isLeftButtonEvent(event) ? ui::EF_LEFT_MOUSE_BUTTON : 0; - flags |= isRightButtonEvent(event) ? ui::EF_RIGHT_MOUSE_BUTTON : 0; - flags |= isMiddleButtonEvent(event) ? ui::EF_MIDDLE_MOUSE_BUTTON : 0; - return flags; -} - -WindowOpenDisposition WindowOpenDispositionFromNSEvent(NSEvent* event) { - NSUInteger modifiers = [event modifierFlags]; - return WindowOpenDispositionFromNSEventWithFlags(event, modifiers); -} - -WindowOpenDisposition WindowOpenDispositionFromNSEventWithFlags( - NSEvent* event, NSUInteger modifiers) { - int event_flags = EventFlagsFromNSEventWithModifiers(event, modifiers); - return ui::DispositionFromEventFlags(event_flags); -} - -} // namespace ui diff --git a/chromium/ui/base/cocoa/cocoa_event_utils_unittest.mm b/chromium/ui/base/cocoa/cocoa_event_utils_unittest.mm deleted file mode 100644 index 5ec3936fdcb..00000000000 --- a/chromium/ui/base/cocoa/cocoa_event_utils_unittest.mm +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import <objc/objc-class.h> - -#include "testing/gtest/include/gtest/gtest.h" -#include "testing/platform_test.h" -#include "ui/base/cocoa/cocoa_event_utils.h" -#include "ui/events/event_constants.h" -#import "ui/base/test/cocoa_test_event_utils.h" -#import "ui/base/test/ui_cocoa_test_helper.h" - -// We provide a donor class with a specially modified |modifierFlags| -// implementation that we swap with NSEvent's. This is because we can't create a -// NSEvent that represents a middle click with modifiers. -@interface TestEvent : NSObject -@end -@implementation TestEvent -- (NSUInteger)modifierFlags { return NSShiftKeyMask; } -@end - -namespace ui { - -namespace { - -class EventUtilsTest : public CocoaTest { -}; - -TEST_F(EventUtilsTest, TestWindowOpenDispositionFromNSEvent) { - // Left Click = same tab. - NSEvent* me = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, 0); - EXPECT_EQ(CURRENT_TAB, WindowOpenDispositionFromNSEvent(me)); - - // Middle Click = new background tab. - me = cocoa_test_event_utils::MouseEventWithType(NSOtherMouseUp, 0); - EXPECT_EQ(NEW_BACKGROUND_TAB, WindowOpenDispositionFromNSEvent(me)); - - // Shift+Middle Click = new foreground tab. - { - ScopedClassSwizzler swizzler([NSEvent class], [TestEvent class], - @selector(modifierFlags)); - me = cocoa_test_event_utils::MouseEventWithType(NSOtherMouseUp, - NSShiftKeyMask); - EXPECT_EQ(NEW_FOREGROUND_TAB, WindowOpenDispositionFromNSEvent(me)); - } - - // Cmd+Left Click = new background tab. - me = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, - NSCommandKeyMask); - EXPECT_EQ(NEW_BACKGROUND_TAB, WindowOpenDispositionFromNSEvent(me)); - - // Cmd+Shift+Left Click = new foreground tab. - me = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, - NSCommandKeyMask | - NSShiftKeyMask); - EXPECT_EQ(NEW_FOREGROUND_TAB, WindowOpenDispositionFromNSEvent(me)); - - // Shift+Left Click = new window - me = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, - NSShiftKeyMask); - EXPECT_EQ(NEW_WINDOW, WindowOpenDispositionFromNSEvent(me)); -} - - -TEST_F(EventUtilsTest, TestEventFlagsFromNSEvent) { - // Left click. - NSEvent* left = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, 0); - EXPECT_EQ(EF_LEFT_MOUSE_BUTTON, EventFlagsFromNSEvent(left)); - - // Right click. - NSEvent* right = cocoa_test_event_utils::MouseEventWithType(NSRightMouseUp, - 0); - EXPECT_EQ(EF_RIGHT_MOUSE_BUTTON, EventFlagsFromNSEvent(right)); - - // Middle click. - NSEvent* middle = cocoa_test_event_utils::MouseEventWithType(NSOtherMouseUp, - 0); - EXPECT_EQ(EF_MIDDLE_MOUSE_BUTTON, EventFlagsFromNSEvent(middle)); - - // Caps + Left - NSEvent* caps = - cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, - NSAlphaShiftKeyMask); - EXPECT_EQ(EF_LEFT_MOUSE_BUTTON | EF_CAPS_LOCK_DOWN, - EventFlagsFromNSEvent(caps)); - - // Shift + Left - NSEvent* shift = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, - NSShiftKeyMask); - EXPECT_EQ(EF_LEFT_MOUSE_BUTTON | EF_SHIFT_DOWN, EventFlagsFromNSEvent(shift)); - - // Ctrl + Left - NSEvent* ctrl = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, - NSControlKeyMask); - EXPECT_EQ(EF_LEFT_MOUSE_BUTTON | EF_CONTROL_DOWN, - EventFlagsFromNSEvent(ctrl)); - - // Alt + Left - NSEvent* alt = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, - NSAlternateKeyMask); - EXPECT_EQ(EF_LEFT_MOUSE_BUTTON | EF_ALT_DOWN, EventFlagsFromNSEvent(alt)); - - // Cmd + Left - NSEvent* cmd = cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, - NSCommandKeyMask); - EXPECT_EQ(EF_LEFT_MOUSE_BUTTON | EF_COMMAND_DOWN, EventFlagsFromNSEvent(cmd)); - - // Shift + Ctrl + Left - NSEvent* shiftctrl = - cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, - NSShiftKeyMask | - NSControlKeyMask); - EXPECT_EQ(EF_LEFT_MOUSE_BUTTON | EF_SHIFT_DOWN | EF_CONTROL_DOWN, - EventFlagsFromNSEvent(shiftctrl)); - - // Cmd + Alt + Right - NSEvent* cmdalt = - cocoa_test_event_utils::MouseEventWithType(NSLeftMouseUp, - NSCommandKeyMask | - NSAlternateKeyMask); - EXPECT_EQ(EF_LEFT_MOUSE_BUTTON | EF_COMMAND_DOWN | EF_ALT_DOWN, - EventFlagsFromNSEvent(cmdalt)); -} - -} // namespace - -} // namespace ui diff --git a/chromium/ui/base/cocoa/controls/blue_label_button.h b/chromium/ui/base/cocoa/controls/blue_label_button.h index a8d66dbf989..d6d38ec1110 100644 --- a/chromium/ui/base/cocoa/controls/blue_label_button.h +++ b/chromium/ui/base/cocoa/controls/blue_label_button.h @@ -8,12 +8,12 @@ #import <Cocoa/Cocoa.h> #import "ui/base/cocoa/hover_button.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" // A rectangular blue NSButton that reacts to hover, focus and lit states. It // can contain an arbitrary single-line text label, and will be sized to fit the // font height and label width. -UI_EXPORT +UI_BASE_EXPORT @interface BlueLabelButton : HoverButton @end diff --git a/chromium/ui/base/cocoa/controls/blue_label_button.mm b/chromium/ui/base/cocoa/controls/blue_label_button.mm index 495b60d6812..fad0a013bda 100644 --- a/chromium/ui/base/cocoa/controls/blue_label_button.mm +++ b/chromium/ui/base/cocoa/controls/blue_label_button.mm @@ -12,9 +12,8 @@ const CGFloat kCornerRadius = 2; -const CGFloat kButtonFontSizeDelta = -1; -const CGFloat kTopBottomTextPadding = 8; -const CGFloat kLeftRightTextPadding = 16; +const CGFloat kTopBottomTextPadding = 7; +const CGFloat kLeftRightTextPadding = 15; const SkColor kTextShadowColor = SkColorSetRGB(0x53, 0x8c, 0xea); const SkColor kShadowColor = SkColorSetRGB(0xe9, 0xe9, 0xe9); @@ -54,16 +53,22 @@ const SkColor kPressOuterRingColor = SkColorSetRGB(0x23, 0x52, 0xa2); + (NSAttributedString*)generateAttributedString:(NSString*)buttonText { ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); - NSFont* buttonFont = rb.GetFont(ui::ResourceBundle::BaseFont). - DeriveFont(kButtonFontSizeDelta).GetNativeFont(); + NSFont* buttonFont = rb.GetFontList(ui::ResourceBundle::SmallFont). + GetPrimaryFont().GetNativeFont(); base::scoped_nsobject<NSMutableParagraphStyle> buttonTextParagraphStyle( [[NSMutableParagraphStyle alloc] init]); [buttonTextParagraphStyle setAlignment:NSCenterTextAlignment]; + base::scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]); + [shadow setShadowOffset:NSMakeSize(0, -1)]; + [shadow setShadowBlurRadius:0]; + [shadow setShadowColor:gfx::SkColorToSRGBNSColor(kTextShadowColor)]; + NSDictionary* buttonTextAttributes = @{ NSParagraphStyleAttributeName : buttonTextParagraphStyle, NSFontAttributeName : buttonFont, - NSForegroundColorAttributeName : [NSColor whiteColor] + NSForegroundColorAttributeName : [NSColor whiteColor], + NSShadowAttributeName : shadow.get() }; base::scoped_nsobject<NSAttributedString> attributedButtonText( [[NSAttributedString alloc] initWithString:buttonText @@ -75,7 +80,9 @@ const SkColor kPressOuterRingColor = SkColorSetRGB(0x23, 0x52, 0xa2); NSAttributedString* attributedTitle = [[self class] generateAttributedString:[self title]]; NSSize textSize = [attributedTitle size]; - textSize.height += 2 * kTopBottomTextPadding; + + // Add 1 to maintain identical height w/ previous drawing code. + textSize.height += 2 * kTopBottomTextPadding + 1; textSize.width += 2 * kLeftRightTextPadding; return textSize; } @@ -83,15 +90,12 @@ const SkColor kPressOuterRingColor = SkColorSetRGB(0x23, 0x52, 0xa2); - (NSRect)drawTitle:(NSAttributedString*)title withFrame:(NSRect)frame inView:(NSView*)controlView { + // Fuzz factor to adjust for the drop shadow. Based on visual inspection. + frame.origin.y -= 1; + NSAttributedString* attributedTitle = [[self class] generateAttributedString:[self title]]; - // Draw the text with a drop shadow. - base::scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]); gfx::ScopedNSGraphicsContextSaveGState context; - [shadow setShadowOffset:NSMakeSize(0, -1)]; - [shadow setShadowBlurRadius:0]; - [shadow setShadowColor:gfx::SkColorToSRGBNSColor(kTextShadowColor)]; - [shadow set]; [attributedTitle drawInRect:frame]; return frame; } @@ -103,6 +107,8 @@ const SkColor kPressOuterRingColor = SkColorSetRGB(0x23, 0x52, 0xa2); NSColor* outerColor; HoverState hoverState = [base::mac::ObjCCastStrict<HoverButton>(controlView) hoverState]; + // Leave a sliver of height 1 for the button drop shadow. + frame.size.height -= 1; if (hoverState == kHoverStateMouseDown && [self isHighlighted]) { centerColor = gfx::SkColorToSRGBNSColor(kPressedColor); @@ -126,18 +132,17 @@ const SkColor kPressOuterRingColor = SkColorSetRGB(0x23, 0x52, 0xa2); [shadow set]; [outerColor set]; - // Inset by 1 initially for the button drop shadow. - [[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(frame, 1, 1) + [[NSBezierPath bezierPathWithRoundedRect:frame xRadius:kCornerRadius yRadius:kCornerRadius] fill]; } [innerColor set]; - [[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(frame, 2, 2) + [[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(frame, 1, 1) xRadius:kCornerRadius yRadius:kCornerRadius] fill]; [centerColor set]; - [[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(frame, 3, 3) + [[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(frame, 2, 2) xRadius:kCornerRadius yRadius:kCornerRadius] fill]; } diff --git a/chromium/ui/base/cocoa/controls/blue_label_button_unittest.mm b/chromium/ui/base/cocoa/controls/blue_label_button_unittest.mm index 48342e87e98..1e2a8f8c135 100644 --- a/chromium/ui/base/cocoa/controls/blue_label_button_unittest.mm +++ b/chromium/ui/base/cocoa/controls/blue_label_button_unittest.mm @@ -6,7 +6,7 @@ #include "base/mac/scoped_nsobject.h" #import "testing/gtest_mac.h" -#import "ui/base/test/ui_cocoa_test_helper.h" +#import "ui/gfx/test/ui_cocoa_test_helper.h" namespace ui { namespace test { diff --git a/chromium/ui/base/cocoa/controls/hover_image_menu_button.h b/chromium/ui/base/cocoa/controls/hover_image_menu_button.h index f6af7bf894c..86914192e02 100644 --- a/chromium/ui/base/cocoa/controls/hover_image_menu_button.h +++ b/chromium/ui/base/cocoa/controls/hover_image_menu_button.h @@ -8,7 +8,7 @@ #import <Cocoa/Cocoa.h> #import "ui/base/cocoa/tracking_area.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" @class HoverImageMenuButtonCell; @@ -16,7 +16,7 @@ // [[self cell] setHovered:flag] when the hover state changes. Uses // HoverImageMenuButtonCell as the default cellClass. Note that the menu item at // index 0 is ignored and client code should populate it with a dummy item. -UI_EXPORT +UI_BASE_EXPORT @interface HoverImageMenuButton : NSPopUpButton { @private ui::ScopedCrTrackingArea trackingArea_; diff --git a/chromium/ui/base/cocoa/controls/hover_image_menu_button_cell.h b/chromium/ui/base/cocoa/controls/hover_image_menu_button_cell.h index fad48fe2e53..249a74d78e4 100644 --- a/chromium/ui/base/cocoa/controls/hover_image_menu_button_cell.h +++ b/chromium/ui/base/cocoa/controls/hover_image_menu_button_cell.h @@ -8,13 +8,13 @@ #import <Cocoa/Cocoa.h> #include "base/mac/scoped_nsobject.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" // A custom NSPopUpButtonCell that permits a hover image, and draws only an // image in its frame; no border, bezel or drop-down arrow. Use setDefaultImage: // to set the default image, setAlternateImage: to set the button shown while // the menu is active, and setHoverImage: for the mouseover hover image. -UI_EXPORT +UI_BASE_EXPORT @interface HoverImageMenuButtonCell : NSPopUpButtonCell { @private base::scoped_nsobject<NSImage> hoverImage_; diff --git a/chromium/ui/base/cocoa/controls/hover_image_menu_button_unittest.mm b/chromium/ui/base/cocoa/controls/hover_image_menu_button_unittest.mm index bf64f403636..ad5b2da7470 100644 --- a/chromium/ui/base/cocoa/controls/hover_image_menu_button_unittest.mm +++ b/chromium/ui/base/cocoa/controls/hover_image_menu_button_unittest.mm @@ -7,7 +7,7 @@ #include "base/mac/foundation_util.h" #import "testing/gtest_mac.h" #import "ui/base/cocoa/controls/hover_image_menu_button_cell.h" -#import "ui/base/test/ui_cocoa_test_helper.h" +#import "ui/gfx/test/ui_cocoa_test_helper.h" namespace ui { diff --git a/chromium/ui/base/cocoa/controls/hyperlink_button_cell.h b/chromium/ui/base/cocoa/controls/hyperlink_button_cell.h index 944f0ed4407..6e3b74d437b 100644 --- a/chromium/ui/base/cocoa/controls/hyperlink_button_cell.h +++ b/chromium/ui/base/cocoa/controls/hyperlink_button_cell.h @@ -8,7 +8,7 @@ #import <Cocoa/Cocoa.h> #include "base/mac/scoped_nsobject.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" // A HyperlinkButtonCell is used to create an NSButton that looks and acts // like a hyperlink. The default styling is to look like blue, underlined text @@ -23,7 +23,7 @@ // // Use this if all of your text is a link. If you need text that contains // embedded links but also regular text, use HyperlinkTextView. -UI_EXPORT +UI_BASE_EXPORT @interface HyperlinkButtonCell : NSButtonCell { base::scoped_nsobject<NSColor> textColor_; BOOL shouldUnderline_; diff --git a/chromium/ui/base/cocoa/controls/hyperlink_button_cell_unittest.mm b/chromium/ui/base/cocoa/controls/hyperlink_button_cell_unittest.mm index 3d24f01fa90..3e7c6110110 100644 --- a/chromium/ui/base/cocoa/controls/hyperlink_button_cell_unittest.mm +++ b/chromium/ui/base/cocoa/controls/hyperlink_button_cell_unittest.mm @@ -8,10 +8,10 @@ #include "base/mac/foundation_util.h" #include "base/mac/scoped_nsobject.h" -#import "testing/gtest_mac.h" #include "testing/gtest/include/gtest/gtest.h" +#import "testing/gtest_mac.h" #include "testing/platform_test.h" -#import "ui/base/test/ui_cocoa_test_helper.h" +#import "ui/gfx/test/ui_cocoa_test_helper.h" namespace ui { diff --git a/chromium/ui/base/cocoa/events_mac_unittest.mm b/chromium/ui/base/cocoa/events_mac_unittest.mm deleted file mode 100644 index 63f5319067e..00000000000 --- a/chromium/ui/base/cocoa/events_mac_unittest.mm +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import <Cocoa/Cocoa.h> - -#include "testing/gtest/include/gtest/gtest.h" -#include "ui/events/event_constants.h" -#include "ui/events/event_utils.h" -#include "ui/base/test/cocoa_test_event_utils.h" -#import "ui/base/test/ui_cocoa_test_helper.h" -#include "ui/gfx/point.h" - -using namespace cocoa_test_event_utils; - -namespace { - -class EventsMacTest : public ui::CocoaTest { - public: - EventsMacTest() {} - - private: - DISALLOW_COPY_AND_ASSIGN(EventsMacTest); -}; - -TEST_F(EventsMacTest, EventTypeFromNative) { - NSEvent* native_event = nil; - ui::EventType type = ui::ET_UNKNOWN; - - native_event = MouseEventWithType(NSLeftMouseDown, 0); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_MOUSE_PRESSED, type); - - native_event = MouseEventWithType(NSLeftMouseUp, 0); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_MOUSE_RELEASED, type); - - native_event = MouseEventWithType(NSRightMouseDown, 0); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_MOUSE_PRESSED, type); - - native_event = MouseEventWithType(NSRightMouseUp, 0); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_MOUSE_RELEASED, type); - - native_event = MouseEventWithType(NSMouseMoved, 0); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_MOUSE_MOVED, type); - - native_event = MouseEventWithType(NSLeftMouseDragged, 0); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_MOUSE_DRAGGED, type); - - native_event = MouseEventWithType(NSRightMouseDragged, 0); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_MOUSE_DRAGGED, type); - - native_event = EnterExitEventWithType(NSMouseEntered); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_MOUSE_ENTERED, type); - - native_event = EnterExitEventWithType(NSMouseExited); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_MOUSE_EXITED, type); - - native_event = KeyEventWithType(NSKeyDown, 0); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_KEY_PRESSED, type); - - native_event = KeyEventWithType(NSKeyUp, 0); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_KEY_RELEASED, type); - - native_event = KeyEventWithType(NSFlagsChanged, 0); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_KEY_PRESSED, type); - - native_event = OtherEventWithType(NSAppKitDefined); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_UNKNOWN, type); - - native_event = OtherEventWithType(NSSystemDefined); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_UNKNOWN, type); - - native_event = OtherEventWithType(NSApplicationDefined); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_UNKNOWN, type); - - native_event = OtherEventWithType(NSPeriodic); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_UNKNOWN, type); - - native_event = EnterExitEventWithType(NSCursorUpdate); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_UNKNOWN, type); - - native_event = MouseEventWithType(NSOtherMouseDown, 0); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_MOUSE_PRESSED, type); - - native_event = MouseEventWithType(NSOtherMouseUp, 0); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_MOUSE_RELEASED, type); - - native_event = MouseEventWithType(NSOtherMouseDragged, 0); - type = ui::EventTypeFromNative(native_event); - EXPECT_EQ(ui::ET_MOUSE_DRAGGED, type); -} - -TEST_F(EventsMacTest, EventFlagsFromNative) { - NSEvent* native_event = nil; - int flags = 0; - - // No key flags. - native_event = KeyEventWithType(NSKeyDown, 0); - flags = ui::EventFlagsFromNative(native_event); - EXPECT_EQ(0, flags); - - // All key flags. - native_event = KeyEventWithType(NSKeyDown, - NSAlphaShiftKeyMask | - NSShiftKeyMask | - NSControlKeyMask | - NSAlternateKeyMask | - NSCommandKeyMask); - flags = ui::EventFlagsFromNative(native_event); - EXPECT_EQ(ui::EF_CAPS_LOCK_DOWN | - ui::EF_SHIFT_DOWN | - ui::EF_CONTROL_DOWN | - ui::EF_ALT_DOWN | - ui::EF_COMMAND_DOWN, - flags); - - // Left mouse flags. - native_event = MouseEventWithType(NSLeftMouseDown, 0); - flags = ui::EventFlagsFromNative(native_event); - EXPECT_EQ(ui::EF_LEFT_MOUSE_BUTTON, flags); - - // Right mouse flags. - native_event = MouseEventWithType(NSRightMouseDown, 0); - flags = ui::EventFlagsFromNative(native_event); - EXPECT_EQ(ui::EF_RIGHT_MOUSE_BUTTON, flags); - - // Center mouse flags. - native_event = MouseEventWithType(NSOtherMouseDown, 0); - flags = ui::EventFlagsFromNative(native_event); - EXPECT_EQ(ui::EF_MIDDLE_MOUSE_BUTTON, flags); -} - -TEST_F(EventsMacTest, EventLocationFromNative) { - NSWindow* window = [[NSWindow alloc] - initWithContentRect:NSMakeRect(10, 25, 200, 205) - styleMask:NSTitledWindowMask - backing:NSBackingStoreBuffered - defer:NO]; - [window orderFront:nil]; - - // Construct mouse event from window number having position at bottom-left. - // Cocoa origin is at bottom-left. ui::Event origin is top-left. - NSEvent* native_event = - [NSEvent mouseEventWithType:NSLeftMouseDown - location:NSMakePoint(10, 15) - modifierFlags:0 - timestamp:[NSDate timeIntervalSinceReferenceDate] - windowNumber:[window windowNumber] - context:[window graphicsContext] - eventNumber:0 - clickCount:1 - pressure:0.0f]; - - // Expect resulting event to be positioned relative to top-left. - gfx::Point location = ui::EventLocationFromNative(native_event); - EXPECT_EQ(gfx::Point(10, 190), location); - - [window orderOut:nil]; - [window close]; -} - -TEST_F(EventsMacTest, KeyboardCodeFromNative) { - NSEvent* native_event = nil; - ui::KeyboardCode code = ui::VKEY_UNKNOWN; - - // Simple "x". No modifiers. - native_event = - [NSEvent keyEventWithType:NSKeyDown - location:NSZeroPoint - modifierFlags:0 - timestamp:[NSDate timeIntervalSinceReferenceDate] - windowNumber:0 - context:nil - characters:@"x" - charactersIgnoringModifiers:@"x" - isARepeat:NO - keyCode:0x58]; - code = ui::KeyboardCodeFromNative(native_event); - EXPECT_EQ(ui::VKEY_X, code); - - // Option/Alt "x". - native_event = - [NSEvent keyEventWithType:NSKeyDown - location:NSZeroPoint - modifierFlags:NSAlternateKeyMask - timestamp:[NSDate timeIntervalSinceReferenceDate] - windowNumber:0 - context:nil - characters:@"\0x2248" // opt-x - charactersIgnoringModifiers:@"x" - isARepeat:NO - keyCode:0x58]; - code = ui::KeyboardCodeFromNative(native_event); - EXPECT_EQ(ui::VKEY_X, code); - - // Option/Alt (alone). - native_event = - [NSEvent keyEventWithType:NSFlagsChanged - location:NSZeroPoint - modifierFlags:NSAlternateKeyMask - timestamp:[NSDate timeIntervalSinceReferenceDate] - windowNumber:0 - context:nil - characters:@"" - charactersIgnoringModifiers:@"" - isARepeat:NO - keyCode:0x3a]; - code = ui::KeyboardCodeFromNative(native_event); - EXPECT_EQ(ui::VKEY_MENU, code); -} - -TEST_F(EventsMacTest, IsMouseEvent) { - NSEvent* native_event = nil; - - native_event = MouseEventWithType(NSLeftMouseDown, 0); - EXPECT_TRUE(ui::IsMouseEvent(native_event)); - - native_event = MouseEventWithType(NSLeftMouseUp, 0); - EXPECT_TRUE(ui::IsMouseEvent(native_event)); - - native_event = MouseEventWithType(NSRightMouseDown, 0); - EXPECT_TRUE(ui::IsMouseEvent(native_event)); - - native_event = MouseEventWithType(NSRightMouseUp, 0); - EXPECT_TRUE(ui::IsMouseEvent(native_event)); - - native_event = MouseEventWithType(NSMouseMoved, 0); - EXPECT_TRUE(ui::IsMouseEvent(native_event)); - - native_event = MouseEventWithType(NSLeftMouseDragged, 0); - EXPECT_TRUE(ui::IsMouseEvent(native_event)); - - native_event = MouseEventWithType(NSRightMouseDragged, 0); - EXPECT_TRUE(ui::IsMouseEvent(native_event)); - - native_event = EnterExitEventWithType(NSMouseEntered); - EXPECT_TRUE(ui::IsMouseEvent(native_event)); - - native_event = EnterExitEventWithType(NSMouseExited); - EXPECT_TRUE(ui::IsMouseEvent(native_event)); - - native_event = KeyEventWithType(NSKeyDown, 0); - EXPECT_FALSE(ui::IsMouseEvent(native_event)); - - native_event = KeyEventWithType(NSKeyUp, 0); - EXPECT_FALSE(ui::IsMouseEvent(native_event)); - - native_event = KeyEventWithType(NSFlagsChanged, 0); - EXPECT_FALSE(ui::IsMouseEvent(native_event)); - - native_event = OtherEventWithType(NSAppKitDefined); - EXPECT_FALSE(ui::IsMouseEvent(native_event)); - - native_event = OtherEventWithType(NSSystemDefined); - EXPECT_FALSE(ui::IsMouseEvent(native_event)); - - native_event = OtherEventWithType(NSApplicationDefined); - EXPECT_FALSE(ui::IsMouseEvent(native_event)); - - native_event = OtherEventWithType(NSPeriodic); - EXPECT_FALSE(ui::IsMouseEvent(native_event)); - - native_event = EnterExitEventWithType(NSCursorUpdate); - EXPECT_FALSE(ui::IsMouseEvent(native_event)); - - native_event = MouseEventWithType(NSOtherMouseDown, 0); - EXPECT_TRUE(ui::IsMouseEvent(native_event)); - - native_event = MouseEventWithType(NSOtherMouseUp, 0); - EXPECT_TRUE(ui::IsMouseEvent(native_event)); - - native_event = MouseEventWithType(NSOtherMouseDragged, 0); - EXPECT_TRUE(ui::IsMouseEvent(native_event)); -} - -TEST_F(EventsMacTest, CreateNoopEvent) { - NSEvent* native_event = ui::CreateNoopEvent(); - EXPECT_TRUE(native_event != nil); -} - -} // namespace diff --git a/chromium/ui/base/cocoa/find_pasteboard.h b/chromium/ui/base/cocoa/find_pasteboard.h index aada8a792bb..863b398a9ce 100644 --- a/chromium/ui/base/cocoa/find_pasteboard.h +++ b/chromium/ui/base/cocoa/find_pasteboard.h @@ -12,9 +12,9 @@ #import <Cocoa/Cocoa.h> #include "base/mac/scoped_nsobject.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" -UI_EXPORT extern NSString* kFindPasteboardChangedNotification; +UI_BASE_EXPORT extern NSString* kFindPasteboardChangedNotification; // Manages the find pasteboard. Use this to copy text to the find pasteboard, // to get the text currently on the find pasteboard, and to receive @@ -25,7 +25,7 @@ UI_EXPORT extern NSString* kFindPasteboardChangedNotification; // This is not thread-safe and must be used on the main thread. // // This is supposed to be a singleton. -UI_EXPORT +UI_BASE_EXPORT @interface FindPasteboard : NSObject { @private base::scoped_nsobject<NSString> findText_; @@ -54,6 +54,6 @@ UI_EXPORT #endif // __OBJC__ // Also provide a c++ interface -UI_EXPORT string16 GetFindPboardText(); +UI_BASE_EXPORT base::string16 GetFindPboardText(); #endif // UI_BASE_COCOA_FIND_PASTEBOARD_H_ diff --git a/chromium/ui/base/cocoa/find_pasteboard.mm b/chromium/ui/base/cocoa/find_pasteboard.mm index a74fa78a341..536d8ccd767 100644 --- a/chromium/ui/base/cocoa/find_pasteboard.mm +++ b/chromium/ui/base/cocoa/find_pasteboard.mm @@ -77,6 +77,6 @@ NSString* kFindPasteboardChangedNotification = @end -string16 GetFindPboardText() { +base::string16 GetFindPboardText() { return base::SysNSStringToUTF16([[FindPasteboard sharedInstance] findText]); } diff --git a/chromium/ui/base/cocoa/flipped_view.h b/chromium/ui/base/cocoa/flipped_view.h index c05f38c6c0a..7bc117779d8 100644 --- a/chromium/ui/base/cocoa/flipped_view.h +++ b/chromium/ui/base/cocoa/flipped_view.h @@ -7,13 +7,13 @@ #import <Cocoa/Cocoa.h> -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" // A view where the Y axis is flipped such that the origin is at the top left // and Y value increases downwards. Drawing is flipped so that layout of the // sections is easier. Apple recommends flipping the coordinate origin when // doing a lot of text layout because it's more natural. -UI_EXPORT +UI_BASE_EXPORT @interface FlippedView : NSView @end diff --git a/chromium/ui/base/cocoa/focus_tracker.h b/chromium/ui/base/cocoa/focus_tracker.h index 6a0c3baf750..301a48f37fd 100644 --- a/chromium/ui/base/cocoa/focus_tracker.h +++ b/chromium/ui/base/cocoa/focus_tracker.h @@ -5,14 +5,14 @@ #import <Cocoa/Cocoa.h> #include "base/mac/scoped_nsobject.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" // A class that handles saving and restoring focus. An instance of // this class snapshots the currently focused view when it is // constructed, and callers can use restoreFocus to return focus to // that view. FocusTracker will not restore focus to views that are // no longer in the view hierarchy or are not in the correct window. -UI_EXPORT +UI_BASE_EXPORT @interface FocusTracker : NSObject { @private base::scoped_nsobject<NSView> focusedView_; diff --git a/chromium/ui/base/cocoa/focus_tracker_unittest.mm b/chromium/ui/base/cocoa/focus_tracker_unittest.mm index 0fb70c143fe..4e15f260d27 100644 --- a/chromium/ui/base/cocoa/focus_tracker_unittest.mm +++ b/chromium/ui/base/cocoa/focus_tracker_unittest.mm @@ -8,7 +8,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" #import "ui/base/cocoa/focus_tracker.h" -#import "ui/base/test/ui_cocoa_test_helper.h" +#import "ui/gfx/test/ui_cocoa_test_helper.h" namespace { diff --git a/chromium/ui/base/cocoa/focus_window_set.h b/chromium/ui/base/cocoa/focus_window_set.h index d43ff2acf97..e4b6d9f0471 100644 --- a/chromium/ui/base/cocoa/focus_window_set.h +++ b/chromium/ui/base/cocoa/focus_window_set.h @@ -7,7 +7,7 @@ #include <set> -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/native_widget_types.h" namespace ui { @@ -15,8 +15,17 @@ namespace ui { // Brings a group of windows to the front without changing their order, and // makes the frontmost one key and main. If none are visible, the frontmost // miniaturized window is deminiaturized. -UI_EXPORT void FocusWindowSet(const std::set<gfx::NativeWindow>& windows, - bool allow_workspace_switch); +UI_BASE_EXPORT void FocusWindowSet(const std::set<gfx::NativeWindow>& windows); + +// Brings a group of windows to the front without changing their +// order, and makes the frontmost one key and main. If none are +// visible, the frontmost miniaturized window is deminiaturized. This +// variant is meant to clean up after the system-default Dock icon +// behavior. Unlike FocusWindowSet, only windows on the current space +// are considered. It also ignores the hidden state of windows; the +// window system may be in the middle of unhiding the application. +UI_BASE_EXPORT void FocusWindowSetOnCurrentSpace( + const std::set<gfx::NativeWindow>& windows); } // namespace ui diff --git a/chromium/ui/base/cocoa/focus_window_set.mm b/chromium/ui/base/cocoa/focus_window_set.mm index fb6272730c9..abc5f92c40a 100644 --- a/chromium/ui/base/cocoa/focus_window_set.mm +++ b/chromium/ui/base/cocoa/focus_window_set.mm @@ -8,32 +8,14 @@ namespace ui { +namespace { + // This attempts to match OS X's native behavior, namely that a window // is only ever deminiaturized if ALL windows on ALL workspaces are -// miniaturized. (This callback runs before AppKit picks its own -// window to deminiaturize, so we get to pick one from the right set.) -// -// In addition, limit to the windows on the current -// workspace. Otherwise we jump spaces haphazardly. -// -// NOTE: If this is called in the -// applicationShouldHandleReopen:hasVisibleWindows: hook when clicking -// the dock icon, and that caused OS X to begin switch spaces, -// isOnActiveSpace gives the answer for the PREVIOUS space. This means -// that we actually raise and focus the wrong space's windows, leaving -// the new key window off-screen. To detect this, check if the key -// window prior to calling is on an active space. -// -// Also, if we decide to deminiaturize a window during a space switch, -// that can switch spaces and then switch back. Fortunately, this only -// happens if, say, space 1 contains an app, space 2 contains a -// miniaturized browser. We click the icon, OS X switches to space 1, -// we deminiaturize the browser, and that triggers switching back. -// -// TODO(davidben): To limit those cases, consider preferentially -// deminiaturizing a window on the current space. -void FocusWindowSet(const std::set<NSWindow*>& windows, - bool allow_workspace_switch) { +// miniaturized. +void FocusWindowSetHelper(const std::set<NSWindow*>& windows, + bool allow_workspace_switch, + bool visible_windows_only) { NSArray* ordered_windows = [NSApp orderedWindows]; NSWindow* frontmost_window = nil; NSWindow* frontmost_window_all_spaces = nil; @@ -41,16 +23,16 @@ void FocusWindowSet(const std::set<NSWindow*>& windows, bool all_miniaturized = true; for (int i = [ordered_windows count] - 1; i >= 0; i--) { NSWindow* win = [ordered_windows objectAtIndex:i]; - if (windows.find(win) != windows.end()) { - if ([win isMiniaturized]) { - frontmost_miniaturized_window = win; - } else if ([win isVisible]) { - all_miniaturized = false; - frontmost_window_all_spaces = win; - if ([win isOnActiveSpace]) { - [win orderFront:nil]; - frontmost_window = win; - } + if (windows.find(win) == windows.end()) + continue; + if ([win isMiniaturized]) { + frontmost_miniaturized_window = win; + } else if (!visible_windows_only || [win isVisible]) { + all_miniaturized = false; + frontmost_window_all_spaces = win; + if ([win isOnActiveSpace]) { + [win orderFront:nil]; + frontmost_window = win; } } } @@ -71,4 +53,39 @@ void FocusWindowSet(const std::set<NSWindow*>& windows, } } +} // namespace + +void FocusWindowSet(const std::set<NSWindow*>& windows) { + FocusWindowSetHelper(windows, true, true); +} + +void FocusWindowSetOnCurrentSpace(const std::set<NSWindow*>& windows) { + // This callback runs before AppKit picks its own window to + // deminiaturize, so we get to pick one from the right set. Limit to + // the windows on the current workspace. Otherwise we jump spaces + // haphazardly. + // + // Also consider both visible and hidden windows; this call races + // with the system unhiding the application. http://crbug.com/368238 + // + // NOTE: If this is called in the + // applicationShouldHandleReopen:hasVisibleWindows: hook when + // clicking the dock icon, and that caused OS X to begin switch + // spaces, isOnActiveSpace gives the answer for the PREVIOUS + // space. This means that we actually raise and focus the wrong + // space's windows, leaving the new key window off-screen. To detect + // this, check if the key window is on the active space prior to + // calling. + // + // Also, if we decide to deminiaturize a window during a space switch, + // that can switch spaces and then switch back. Fortunately, this only + // happens if, say, space 1 contains an app, space 2 contains a + // miniaturized browser. We click the icon, OS X switches to space 1, + // we deminiaturize the browser, and that triggers switching back. + // + // TODO(davidben): To limit those cases, consider preferentially + // deminiaturizing a window on the current space. + FocusWindowSetHelper(windows, false, false); +} + } // namespace ui diff --git a/chromium/ui/base/cocoa/fullscreen_window_manager.h b/chromium/ui/base/cocoa/fullscreen_window_manager.h index 1b18912cf6f..be59cad49c3 100644 --- a/chromium/ui/base/cocoa/fullscreen_window_manager.h +++ b/chromium/ui/base/cocoa/fullscreen_window_manager.h @@ -9,11 +9,11 @@ #include "base/mac/mac_util.h" #include "base/mac/scoped_nsobject.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" // A utility class to manage the fullscreen mode for a given window. This class // also updates the window frame if the screen changes. -UI_EXPORT +UI_BASE_EXPORT @interface FullscreenWindowManager : NSObject { @private base::scoped_nsobject<NSWindow> window_; diff --git a/chromium/ui/base/cocoa/fullscreen_window_manager_unittest.mm b/chromium/ui/base/cocoa/fullscreen_window_manager_unittest.mm index 5f9ff2f511b..c720a26f082 100644 --- a/chromium/ui/base/cocoa/fullscreen_window_manager_unittest.mm +++ b/chromium/ui/base/cocoa/fullscreen_window_manager_unittest.mm @@ -6,7 +6,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" -#import "ui/base/test/ui_cocoa_test_helper.h" +#import "ui/gfx/test/ui_cocoa_test_helper.h" typedef ui::CocoaTest FullscreenWindowManagerTest; diff --git a/chromium/ui/base/cocoa/hover_button.h b/chromium/ui/base/cocoa/hover_button.h index 4040c2c29fe..7a0e156660c 100644 --- a/chromium/ui/base/cocoa/hover_button.h +++ b/chromium/ui/base/cocoa/hover_button.h @@ -8,10 +8,10 @@ #import <Cocoa/Cocoa.h> #import "ui/base/cocoa/tracking_area.h" -#import "ui/base/ui_export.h" +#import "ui/base/ui_base_export.h" // A button that changes when you hover over it and click it. -UI_EXPORT +UI_BASE_EXPORT @interface HoverButton : NSButton { @protected // Enumeration of the hover states that the close button can be in at any one diff --git a/chromium/ui/base/cocoa/hover_image_button.h b/chromium/ui/base/cocoa/hover_image_button.h index d43a7fa78ac..a00163fb53b 100644 --- a/chromium/ui/base/cocoa/hover_image_button.h +++ b/chromium/ui/base/cocoa/hover_image_button.h @@ -9,10 +9,10 @@ #import "base/mac/scoped_nsobject.h" #import "ui/base/cocoa/hover_button.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" // A button that changes images when you hover over it and click it. -UI_EXPORT +UI_BASE_EXPORT @interface HoverImageButton : HoverButton { @private base::scoped_nsobject<NSImage> defaultImage_; diff --git a/chromium/ui/base/cocoa/hover_image_button_unittest.mm b/chromium/ui/base/cocoa/hover_image_button_unittest.mm index cc1cca0fab4..0dff3fc823c 100644 --- a/chromium/ui/base/cocoa/hover_image_button_unittest.mm +++ b/chromium/ui/base/cocoa/hover_image_button_unittest.mm @@ -5,7 +5,7 @@ #import "ui/base/cocoa/hover_image_button.h" #import "base/mac/scoped_nsobject.h" -#import "ui/base/test/ui_cocoa_test_helper.h" +#import "ui/gfx/test/ui_cocoa_test_helper.h" namespace { diff --git a/chromium/ui/base/cocoa/menu_controller.h b/chromium/ui/base/cocoa/menu_controller.h index a85640468a6..1da667491a6 100644 --- a/chromium/ui/base/cocoa/menu_controller.h +++ b/chromium/ui/base/cocoa/menu_controller.h @@ -9,7 +9,7 @@ #include "base/mac/scoped_nsobject.h" #include "base/strings/string16.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { class MenuModel; @@ -21,7 +21,7 @@ class MenuModel; // allow for hierarchical menus). The tag is the index into that model for // that particular item. It is important that the model outlives this object // as it only maintains weak references. -UI_EXPORT +UI_BASE_EXPORT @interface MenuController : NSObject<NSMenuDelegate> { @protected ui::MenuModel* model_; // weak @@ -35,8 +35,8 @@ UI_EXPORT // |-initWithModel:useWithPopUpButtonCell:| or after the first call to |-menu|. @property(nonatomic) BOOL useWithPopUpButtonCell; -+ (string16)elideMenuTitle:(const string16&)title - toWidth:(int)width; ++ (base::string16)elideMenuTitle:(const base::string16&)title + toWidth:(int)width; // NIB-based initializer. This does not create a menu. Clients can set the // properties of the object and the menu will be created upon the first call to diff --git a/chromium/ui/base/cocoa/menu_controller.mm b/chromium/ui/base/cocoa/menu_controller.mm index c7b8dff2fa3..9faa6071e44 100644 --- a/chromium/ui/base/cocoa/menu_controller.mm +++ b/chromium/ui/base/cocoa/menu_controller.mm @@ -8,10 +8,10 @@ #include "base/strings/sys_string_conversions.h" #include "ui/base/accelerators/accelerator.h" #include "ui/base/accelerators/platform_accelerator_cocoa.h" -#import "ui/base/cocoa/cocoa_event_utils.h" #include "ui/base/l10n/l10n_util_mac.h" #include "ui/base/models/simple_menu_model.h" -#include "ui/gfx/font.h" +#import "ui/events/event_utils.h" +#include "ui/gfx/font_list.h" #include "ui/gfx/image/image.h" #include "ui/gfx/text_elider.h" @@ -25,12 +25,11 @@ @synthesize model = model_; @synthesize useWithPopUpButtonCell = useWithPopUpButtonCell_; -+ (string16)elideMenuTitle:(const string16&)title - toWidth:(int)width { ++ (base::string16)elideMenuTitle:(const base::string16&)title + toWidth:(int)width { NSFont* nsfont = [NSFont menuBarFontOfSize:0]; // 0 means "default" - gfx::Font font(base::SysNSStringToUTF8([nsfont fontName]), - static_cast<int>([nsfont pointSize])); - return gfx::ElideText(title, font, width, gfx::ELIDE_AT_END); + return gfx::ElideText(title, gfx::FontList(gfx::Font(nsfont)), width, + gfx::ELIDE_TAIL); } - (id)init { @@ -102,7 +101,7 @@ - (void)addItemToMenu:(NSMenu*)menu atIndex:(NSInteger)index fromModel:(ui::MenuModel*)model { - string16 label16 = model->GetLabelAt(index); + base::string16 label16 = model->GetLabelAt(index); int maxWidth = [self maxWidthForMenuModel:model modelIndex:index]; if (maxWidth != -1) label16 = [MenuController elideMenuTitle:label16 toWidth:maxWidth]; @@ -180,10 +179,11 @@ model->GetIconAt(modelIndex, &icon); [(id)item setImage:icon.IsEmpty() ? nil : icon.ToNSImage()]; } - const gfx::Font* font = model->GetLabelFontAt(modelIndex); - if (font) { + const gfx::FontList* font_list = model->GetLabelFontListAt(modelIndex); + if (font_list) { NSDictionary *attributes = - [NSDictionary dictionaryWithObject:font->GetNativeFont() + [NSDictionary dictionaryWithObject:font_list->GetPrimaryFont(). + GetNativeFont() forKey:NSFontAttributeName]; base::scoped_nsobject<NSAttributedString> title( [[NSAttributedString alloc] initWithString:[(id)item title] @@ -204,7 +204,7 @@ [[sender representedObject] pointerValue]); DCHECK(model); if (model) { - int event_flags = ui::EventFlagsFromNSEvent([NSApp currentEvent]); + int event_flags = ui::EventFlagsFromNative([NSApp currentEvent]); model->ActivatedAt(modelIndex, event_flags); } } diff --git a/chromium/ui/base/cocoa/menu_controller_unittest.mm b/chromium/ui/base/cocoa/menu_controller_unittest.mm index 7cec6c6198a..43520ddda20 100644 --- a/chromium/ui/base/cocoa/menu_controller_unittest.mm +++ b/chromium/ui/base/cocoa/menu_controller_unittest.mm @@ -13,8 +13,10 @@ #import "ui/base/cocoa/menu_controller.h" #include "ui/base/models/simple_menu_model.h" #include "ui/base/resource/resource_bundle.h" -#import "ui/base/test/ui_cocoa_test_helper.h" #include "ui/gfx/image/image.h" +#import "ui/gfx/test/ui_cocoa_test_helper.h" + +using base::ASCIIToUTF16; namespace ui { @@ -87,7 +89,7 @@ class DynamicDelegate : public Delegate { virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE { return true; } - virtual string16 GetLabelForCommandId(int command_id) const OVERRIDE { + virtual base::string16 GetLabelForCommandId(int command_id) const OVERRIDE { return label_; } virtual bool GetIconForCommandId( @@ -100,30 +102,31 @@ class DynamicDelegate : public Delegate { return true; } } - void SetDynamicLabel(string16 label) { label_ = label; } + void SetDynamicLabel(base::string16 label) { label_ = label; } void SetDynamicIcon(const gfx::Image& icon) { icon_ = icon; } private: - string16 label_; + base::string16 label_; gfx::Image icon_; }; -// Menu model that returns a gfx::Font object for one of the items in the menu. -class FontMenuModel : public SimpleMenuModel { +// Menu model that returns a gfx::FontList object for one of the items in the +// menu. +class FontListMenuModel : public SimpleMenuModel { public: - FontMenuModel(SimpleMenuModel::Delegate* delegate, - const gfx::Font* font, int index) + FontListMenuModel(SimpleMenuModel::Delegate* delegate, + const gfx::FontList* font_list, int index) : SimpleMenuModel(delegate), - font_(font), + font_list_(font_list), index_(index) { } - virtual ~FontMenuModel() {} - virtual const gfx::Font* GetLabelFontAt(int index) const OVERRIDE { - return (index == index_) ? font_ : NULL; + virtual ~FontListMenuModel() {} + virtual const gfx::FontList* GetLabelFontListAt(int index) const OVERRIDE { + return (index == index_) ? font_list_ : NULL; } private: - const gfx::Font* font_; + const gfx::FontList* font_list_; const int index_; }; @@ -222,7 +225,7 @@ TEST_F(MenuControllerTest, PopUpButton) { [[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:YES]); EXPECT_EQ([[menu menu] numberOfItems], 4); EXPECT_EQ(base::SysNSStringToUTF16([[[menu menu] itemAtIndex:0] title]), - string16()); + base::string16()); // Make sure the tags are still correct (the index no longer matches the tag). NSMenuItem* itemTwo = [[menu menu] itemAtIndex:2]; @@ -270,10 +273,11 @@ TEST_F(MenuControllerTest, Validate) { } // Tests that items which have a font set actually use that font. -TEST_F(MenuControllerTest, LabelFont) { +TEST_F(MenuControllerTest, LabelFontList) { Delegate delegate; - gfx::Font bold = (gfx::Font()).DeriveFont(0, gfx::Font::BOLD); - FontMenuModel model(&delegate, &bold, 0); + const gfx::FontList& bold = ResourceBundle::GetSharedInstance().GetFontList( + ResourceBundle::BoldFont); + FontListMenuModel model(&delegate, &bold, 0); model.AddItem(1, ASCIIToUTF16("one")); model.AddItem(2, ASCIIToUTF16("two")); @@ -313,7 +317,7 @@ TEST_F(MenuControllerTest, Dynamic) { // Create a menu containing a single item whose label is "initial" and who has // no icon. - string16 initial = ASCIIToUTF16("initial"); + base::string16 initial = ASCIIToUTF16("initial"); delegate.SetDynamicLabel(initial); SimpleMenuModel model(&delegate); model.AddItem(1, ASCIIToUTF16("foo")); @@ -329,7 +333,7 @@ TEST_F(MenuControllerTest, Dynamic) { EXPECT_EQ(nil, [item image]); // Now update the item to have a label of "second" and an icon. - string16 second = ASCIIToUTF16("second"); + base::string16 second = ASCIIToUTF16("second"); delegate.SetDynamicLabel(second); const gfx::Image& icon = ResourceBundle::GetSharedInstance().GetNativeImageNamed(IDR_THROBBER); @@ -349,7 +353,7 @@ TEST_F(MenuControllerTest, Dynamic) { TEST_F(MenuControllerTest, OpenClose) { // SimpleMenuModel posts a task that calls Delegate::MenuClosed. Create // a MessageLoop for that purpose. - base::MessageLoop message_loop(base::MessageLoop::TYPE_UI); + base::MessageLoopForUI message_loop; // Create the model. Delegate delegate; diff --git a/chromium/ui/base/cocoa/nib_loading.h b/chromium/ui/base/cocoa/nib_loading.h index ab8e23f5343..263ac4883b9 100644 --- a/chromium/ui/base/cocoa/nib_loading.h +++ b/chromium/ui/base/cocoa/nib_loading.h @@ -7,13 +7,13 @@ #import <Cocoa/Cocoa.h> -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { // Given the name of a nib file, gets an unowned reference to the NSView in the // nib. Requires a nib with just a single root view. -UI_EXPORT NSView* GetViewFromNib(NSString* name); +UI_BASE_EXPORT NSView* GetViewFromNib(NSString* name); } // namespace ui diff --git a/chromium/ui/base/cocoa/nsgraphics_context_additions.mm b/chromium/ui/base/cocoa/nsgraphics_context_additions.mm index 3f70145c47c..9e85fad24f2 100644 --- a/chromium/ui/base/cocoa/nsgraphics_context_additions.mm +++ b/chromium/ui/base/cocoa/nsgraphics_context_additions.mm @@ -8,11 +8,14 @@ - (void)cr_setPatternPhase:(NSPoint)phase forView:(NSView*)view { - if ([view layer]) { + NSView* ancestorWithLayer = view; + while (ancestorWithLayer && ![ancestorWithLayer layer]) + ancestorWithLayer = [ancestorWithLayer superview]; + if (ancestorWithLayer) { NSPoint bottomLeft = NSZeroPoint; - if ([view isFlipped]) - bottomLeft.y = NSMaxY([view bounds]); - NSPoint offset = [view convertPoint:bottomLeft toView:nil]; + if ([ancestorWithLayer isFlipped]) + bottomLeft.y = NSMaxY([ancestorWithLayer bounds]); + NSPoint offset = [ancestorWithLayer convertPoint:bottomLeft toView:nil]; phase.x -= offset.x; phase.y -= offset.y; } diff --git a/chromium/ui/base/cocoa/nsgraphics_context_additions_unittest.mm b/chromium/ui/base/cocoa/nsgraphics_context_additions_unittest.mm index d4e958e9a99..bfa17611d3d 100644 --- a/chromium/ui/base/cocoa/nsgraphics_context_additions_unittest.mm +++ b/chromium/ui/base/cocoa/nsgraphics_context_additions_unittest.mm @@ -5,7 +5,7 @@ #import "ui/base/cocoa/nsgraphics_context_additions.h" #include "base/mac/scoped_nsobject.h" -#import "ui/base/test/ui_cocoa_test_helper.h" +#import "ui/gfx/test/ui_cocoa_test_helper.h" typedef ui::CocoaTest NSGraphicsContextCrAdditionsTest; diff --git a/chromium/ui/base/cocoa/tracking_area.h b/chromium/ui/base/cocoa/tracking_area.h index 782cdaea270..df37686bd97 100644 --- a/chromium/ui/base/cocoa/tracking_area.h +++ b/chromium/ui/base/cocoa/tracking_area.h @@ -8,13 +8,13 @@ #import <AppKit/AppKit.h> #include "base/mac/scoped_nsobject.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" @class CrTrackingAreaOwnerProxy; // The CrTrackingArea can be used in place of an NSTrackingArea to shut off // messaging to the |owner| at a specific point in time. -UI_EXPORT +UI_BASE_EXPORT @interface CrTrackingArea : NSTrackingArea { @private base::scoped_nsobject<CrTrackingAreaOwnerProxy> ownerProxy_; @@ -42,7 +42,7 @@ namespace ui { // Use an instance of this class to call |-clearOwner| on the |tracking_area_| // when this goes out of scope. -class UI_EXPORT ScopedCrTrackingArea { +class UI_BASE_EXPORT ScopedCrTrackingArea { public: // Takes ownership of |tracking_area| without retaining it. explicit ScopedCrTrackingArea(CrTrackingArea* tracking_area = nil); diff --git a/chromium/ui/base/cocoa/tracking_area_unittest.mm b/chromium/ui/base/cocoa/tracking_area_unittest.mm index b12c9d49b7e..cb2c82925bc 100644 --- a/chromium/ui/base/cocoa/tracking_area_unittest.mm +++ b/chromium/ui/base/cocoa/tracking_area_unittest.mm @@ -4,7 +4,7 @@ #include "base/mac/scoped_nsobject.h" #import "ui/base/cocoa/tracking_area.h" -#import "ui/base/test/ui_cocoa_test_helper.h" +#import "ui/gfx/test/ui_cocoa_test_helper.h" // A test object that counts the number of times a message is sent to it. @interface TestTrackingAreaOwner : NSObject { diff --git a/chromium/ui/base/cocoa/underlay_opengl_hosting_window.h b/chromium/ui/base/cocoa/underlay_opengl_hosting_window.h index fb9eba4bef7..25c81fd940a 100644 --- a/chromium/ui/base/cocoa/underlay_opengl_hosting_window.h +++ b/chromium/ui/base/cocoa/underlay_opengl_hosting_window.h @@ -7,12 +7,12 @@ #import <Cocoa/Cocoa.h> -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" // Common base class for windows that host a OpenGL surface that renders under // the window. Contains methods relating to hole punching so that the OpenGL // surface is visible through the window. -UI_EXPORT +UI_BASE_EXPORT @interface UnderlayOpenGLHostingWindow : NSWindow @end diff --git a/chromium/ui/base/cocoa/underlay_opengl_hosting_window.mm b/chromium/ui/base/cocoa/underlay_opengl_hosting_window.mm index 1e562e200b7..39a30360441 100644 --- a/chromium/ui/base/cocoa/underlay_opengl_hosting_window.mm +++ b/chromium/ui/base/cocoa/underlay_opengl_hosting_window.mm @@ -6,10 +6,12 @@ #import <objc/runtime.h> +#include "base/command_line.h" #include "base/logging.h" #include "base/mac/mac_util.h" #include "base/mac/scoped_nsautorelease_pool.h" #include "base/mac/scoped_nsobject.h" +#include "ui/base/ui_base_switches.h" @interface NSWindow (UndocumentedAPI) // Normally, punching a hole in a window by painting a subview with a @@ -30,6 +32,12 @@ namespace { +bool CoreAnimationIsEnabled() { + static bool is_enabled = !CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableCoreAnimation); + return is_enabled; +} + NSComparisonResult OpaqueViewsOnTop(id view1, id view2, void* context) { BOOL view_1_is_opaque_view = [view1 isKindOfClass:[OpaqueView class]]; BOOL view_2_is_opaque_view = [view2 isKindOfClass:[OpaqueView class]]; @@ -103,6 +111,14 @@ NSComparisonResult OpaqueViewsOnTop(id view1, id view2, void* context) { styleMask:windowStyle backing:bufferingType defer:deferCreation])) { + if (CoreAnimationIsEnabled()) { + // If CoreAnimation is used, then the hole punching technique won't be + // used. Bail now and don't play any special games with the shadow. + // TODO(avi): Rip all this shadow code out once CoreAnimation can't be + // turned off. http://crbug.com/336554 + return self; + } + // OpenGL-accelerated content works by punching holes in windows. Therefore // all windows hosting OpenGL content must not be opaque. [self setOpaque:NO]; diff --git a/chromium/ui/base/cocoa/window_size_constants.h b/chromium/ui/base/cocoa/window_size_constants.h index 11cf318a515..bb94018fd53 100644 --- a/chromium/ui/base/cocoa/window_size_constants.h +++ b/chromium/ui/base/cocoa/window_size_constants.h @@ -5,14 +5,14 @@ #ifndef UI_BASE_COCOA_WINDOW_SIZE_CONSTANTS_H_ #define UI_BASE_COCOA_WINDOW_SIZE_CONSTANTS_H_ -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #import <Foundation/Foundation.h> namespace ui { // It is not valid to make a zero-sized window. Use this constant instead. -UI_EXPORT extern const NSRect kWindowSizeDeterminedLater; +UI_BASE_EXPORT extern const NSRect kWindowSizeDeterminedLater; } // namespace ui diff --git a/chromium/ui/base/cursor/DEPS b/chromium/ui/base/cursor/DEPS new file mode 100644 index 00000000000..de08167e272 --- /dev/null +++ b/chromium/ui/base/cursor/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+ui/ozone/public", +] diff --git a/chromium/ui/base/cursor/cursor.h b/chromium/ui/base/cursor/cursor.h index bb832fa9631..72999d4c3be 100644 --- a/chromium/ui/base/cursor/cursor.h +++ b/chromium/ui/base/cursor/cursor.h @@ -6,7 +6,7 @@ #define UI_BASE_CURSOR_CURSOR_H_ #include "build/build_config.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace gfx { class Point; @@ -88,7 +88,7 @@ enum CursorSetType { }; // Ref-counted cursor that supports both default and custom cursors. -class UI_EXPORT Cursor { +class UI_BASE_EXPORT Cursor { public: Cursor(); diff --git a/chromium/ui/base/cursor/cursor_null.cc b/chromium/ui/base/cursor/cursor_android.cc index ffb3def6c7b..e33d739c2a5 100644 --- a/chromium/ui/base/cursor/cursor_null.cc +++ b/chromium/ui/base/cursor/cursor_android.cc @@ -1,15 +1,19 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/base/cursor/cursor.h" +#include "base/logging.h" + namespace ui { void Cursor::RefCustomCursor() { + NOTIMPLEMENTED(); } void Cursor::UnrefCustomCursor() { + NOTIMPLEMENTED(); } } // namespace ui diff --git a/chromium/ui/base/cursor/cursor_loader.h b/chromium/ui/base/cursor/cursor_loader.h index d54d2989127..d4a0c3d2da0 100644 --- a/chromium/ui/base/cursor/cursor_loader.h +++ b/chromium/ui/base/cursor/cursor_loader.h @@ -7,26 +7,24 @@ #include "base/logging.h" #include "base/strings/string16.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/display.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/point.h" namespace ui { -class UI_EXPORT CursorLoader { +class UI_BASE_EXPORT CursorLoader { public: - CursorLoader() : scale_(1.f) {} + CursorLoader() : scale_(1.f), rotation_(gfx::Display::ROTATE_0) {} virtual ~CursorLoader() {} - // Returns the display the loader loads images for. - const gfx::Display& display() const { - return display_; + gfx::Display::Rotation rotation() const { + return rotation_; } - // Sets the display the loader loads images for. - void set_display(const gfx::Display& display) { - display_ = display; + void set_rotation(gfx::Display::Rotation rotation) { + rotation_ = rotation; } // Returns the current scale of the mouse cursor icon. @@ -64,12 +62,12 @@ class UI_EXPORT CursorLoader { static CursorLoader* Create(); private: - // The display the loader loads images for. - gfx::Display display_; - // The current scale of the mouse cursor icon. float scale_; + // The current rotation of the mouse cursor icon. + gfx::Display::Rotation rotation_; + DISALLOW_COPY_AND_ASSIGN(CursorLoader); }; diff --git a/chromium/ui/base/cursor/cursor_loader_null.cc b/chromium/ui/base/cursor/cursor_loader_null.cc deleted file mode 100644 index 51ced4cde37..00000000000 --- a/chromium/ui/base/cursor/cursor_loader_null.cc +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/cursor/cursor_loader_null.h" - -namespace ui { - -CursorLoader* CursorLoader::Create() { - return new CursorLoaderNull; -} - -CursorLoaderNull::CursorLoaderNull() {} -CursorLoaderNull::~CursorLoaderNull() {} -void CursorLoaderNull::LoadImageCursor(int id, - int resource_id, - const gfx::Point& hot) {} -void CursorLoaderNull::LoadAnimatedCursor(int id, - int resource_id, - const gfx::Point& hot, - int frame_delay_ms) {} -void CursorLoaderNull::UnloadAll() {} -void CursorLoaderNull::SetPlatformCursor(gfx::NativeCursor* cursor) {} - -} // namespace ui diff --git a/chromium/ui/base/cursor/cursor_loader_ozone.cc b/chromium/ui/base/cursor/cursor_loader_ozone.cc new file mode 100644 index 00000000000..8309c2e4b2a --- /dev/null +++ b/chromium/ui/base/cursor/cursor_loader_ozone.cc @@ -0,0 +1,68 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/cursor/cursor_loader_ozone.h" + +#include "ui/base/cursor/cursor.h" +#include "ui/base/resource/resource_bundle.h" +#include "ui/gfx/image/image_skia.h" +#include "ui/ozone/public/cursor_factory_ozone.h" + +namespace ui { + +CursorLoaderOzone::CursorLoaderOzone() {} + +CursorLoaderOzone::~CursorLoaderOzone() {} + +void CursorLoaderOzone::LoadImageCursor(int id, + int resource_id, + const gfx::Point& hot) { + const gfx::ImageSkia* image = + ResourceBundle::GetSharedInstance().GetImageSkiaNamed(resource_id); + const gfx::ImageSkiaRep& image_rep = + image->GetRepresentation(scale()); + SkBitmap bitmap = image_rep.sk_bitmap(); + cursors_[id] = + CursorFactoryOzone::GetInstance()->CreateImageCursor(bitmap, hot); +} + +void CursorLoaderOzone::LoadAnimatedCursor(int id, + int resource_id, + const gfx::Point& hot, + int frame_delay_ms) { + // TODO(dnicoara) Add support: crbug.com/343245 + NOTIMPLEMENTED(); +} + +void CursorLoaderOzone::UnloadAll() { + for (ImageCursorMap::const_iterator it = cursors_.begin(); + it != cursors_.end(); + ++it) + CursorFactoryOzone::GetInstance()->UnrefImageCursor(it->second); + cursors_.clear(); +} + +void CursorLoaderOzone::SetPlatformCursor(gfx::NativeCursor* cursor) { + int native_type = cursor->native_type(); + PlatformCursor platform; + + if (cursors_.count(native_type)) { + // An image cursor is loaded for this type. + platform = cursors_[native_type]; + } else if (native_type == kCursorCustom) { + // The platform cursor was already set via WebCursor::GetPlatformCursor. + platform = cursor->platform(); + } else { + // Use default cursor of this type. + platform = CursorFactoryOzone::GetInstance()->GetDefaultCursor(native_type); + } + + cursor->SetPlatformCursor(platform); +} + +CursorLoader* CursorLoader::Create() { + return new CursorLoaderOzone(); +} + +} // namespace ui diff --git a/chromium/ui/base/cursor/cursor_loader_null.h b/chromium/ui/base/cursor/cursor_loader_ozone.h index 275030674b2..402cdc2bb6b 100644 --- a/chromium/ui/base/cursor/cursor_loader_null.h +++ b/chromium/ui/base/cursor/cursor_loader_ozone.h @@ -1,22 +1,23 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef UI_BASE_CURSOR_CURSOR_LOADER_NULL_H_ -#define UI_BASE_CURSOR_CURSOR_LOADER_NULL_H_ +#ifndef UI_BASE_CURSOR_CURSOR_LOADER_OZONE_H_ +#define UI_BASE_CURSOR_CURSOR_LOADER_OZONE_H_ -#include "base/compiler_specific.h" +#include <map> + +#include "ui/base/cursor/cursor.h" #include "ui/base/cursor/cursor_loader.h" -#include "ui/base/ui_export.h" namespace ui { -class UI_EXPORT CursorLoaderNull : public CursorLoader { +class UI_BASE_EXPORT CursorLoaderOzone : public CursorLoader { public: - CursorLoaderNull(); - virtual ~CursorLoaderNull(); + CursorLoaderOzone(); + virtual ~CursorLoaderOzone(); - // Overridden from CursorLoader: + // CursorLoader overrides: virtual void LoadImageCursor(int id, int resource_id, const gfx::Point& hot) OVERRIDE; @@ -28,9 +29,13 @@ class UI_EXPORT CursorLoaderNull : public CursorLoader { virtual void SetPlatformCursor(gfx::NativeCursor* cursor) OVERRIDE; private: - DISALLOW_COPY_AND_ASSIGN(CursorLoaderNull); + // Pointers are owned by ResourceBundle and must not be freed here. + typedef std::map<int, PlatformCursor> ImageCursorMap; + ImageCursorMap cursors_; + + DISALLOW_COPY_AND_ASSIGN(CursorLoaderOzone); }; } // namespace ui -#endif // UI_BASE_CURSOR_CURSOR_LOADER_NULL_H_ +#endif // UI_BASE_CURSOR_CURSOR_LOADER_OZONE_H_ diff --git a/chromium/ui/base/cursor/cursor_loader_win.cc b/chromium/ui/base/cursor/cursor_loader_win.cc index 6d35e554574..feb74e977f9 100644 --- a/chromium/ui/base/cursor/cursor_loader_win.cc +++ b/chromium/ui/base/cursor/cursor_loader_win.cc @@ -7,18 +7,13 @@ #include "base/lazy_instance.h" #include "base/strings/string16.h" #include "grit/ui_unscaled_resources.h" - -#if defined(USE_AURA) #include "ui/base/cursor/cursor.h" -#endif namespace ui { -#if defined(USE_AURA) - namespace { -base::LazyInstance<string16> g_cursor_resource_module_name; +base::LazyInstance<base::string16> g_cursor_resource_module_name; const wchar_t* GetCursorId(gfx::NativeCursor native_cursor) { switch (native_cursor.native_type()) { @@ -120,8 +115,6 @@ const wchar_t* GetCursorId(gfx::NativeCursor native_cursor) { } // namespace -#endif - CursorLoader* CursorLoader::Create() { return new CursorLoaderWin; } @@ -150,7 +143,6 @@ void CursorLoaderWin::UnloadAll() { } void CursorLoaderWin::SetPlatformCursor(gfx::NativeCursor* cursor) { -#if defined(USE_AURA) if (cursor->native_type() != kCursorCustom) { if (cursor->platform()) { cursor->SetPlatformCursor(cursor->platform()); @@ -165,14 +157,12 @@ void CursorLoaderWin::SetPlatformCursor(gfx::NativeCursor* cursor) { cursor->SetPlatformCursor(platform_cursor); } } -#endif } -#if defined(USE_AURA) // static -void CursorLoaderWin::SetCursorResourceModule(const string16& module_name) { +void CursorLoaderWin::SetCursorResourceModule( + const base::string16& module_name) { g_cursor_resource_module_name.Get() = module_name; } -#endif } // namespace ui diff --git a/chromium/ui/base/cursor/cursor_loader_win.h b/chromium/ui/base/cursor/cursor_loader_win.h index fcae566531a..adcc0aef7b1 100644 --- a/chromium/ui/base/cursor/cursor_loader_win.h +++ b/chromium/ui/base/cursor/cursor_loader_win.h @@ -10,7 +10,7 @@ namespace ui { -class UI_EXPORT CursorLoaderWin : public CursorLoader { +class UI_BASE_EXPORT CursorLoaderWin : public CursorLoader { public: CursorLoaderWin(); virtual ~CursorLoaderWin(); @@ -26,11 +26,9 @@ class UI_EXPORT CursorLoaderWin : public CursorLoader { virtual void UnloadAll() OVERRIDE; virtual void SetPlatformCursor(gfx::NativeCursor* cursor) OVERRIDE; -#if defined(USE_AURA) // Used to pass the cursor resource module name to the cursor loader. This is // typically used to load non system cursors. - static void SetCursorResourceModule(const string16& module_name); -#endif + static void SetCursorResourceModule(const base::string16& module_name); private: DISALLOW_COPY_AND_ASSIGN(CursorLoaderWin); diff --git a/chromium/ui/base/cursor/cursor_loader_x11.cc b/chromium/ui/base/cursor/cursor_loader_x11.cc index 8cfcce6e6f1..e0bb9eaeb70 100644 --- a/chromium/ui/base/cursor/cursor_loader_x11.cc +++ b/chromium/ui/base/cursor/cursor_loader_x11.cc @@ -12,6 +12,7 @@ #include "grit/ui_resources.h" #include "skia/ext/image_operations.h" #include "ui/base/cursor/cursor.h" +#include "ui/base/cursor/cursor_util.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/x/x11_util.h" #include "ui/gfx/image/image.h" @@ -158,12 +159,13 @@ void CursorLoaderX11::LoadImageCursor(int id, const gfx::Point& hot) { const gfx::ImageSkia* image = ResourceBundle::GetSharedInstance().GetImageSkiaNamed(resource_id); - const gfx::ImageSkiaRep& image_rep = image->GetRepresentation( - display().device_scale_factor()); + const gfx::ImageSkiaRep& image_rep = image->GetRepresentation(scale()); SkBitmap bitmap = image_rep.sk_bitmap(); gfx::Point hotpoint = hot; + // TODO(oshima): The cursor should use resource scale factor when + // fractional scale factor is enabled. crbug.com/372212 ScaleAndRotateCursorBitmapAndHotpoint( - scale(), display().rotation(), &bitmap, &hotpoint); + scale() / image_rep.scale(), rotation(), &bitmap, &hotpoint); XcursorImage* x_image = SkBitmapToXcursorImage(&bitmap, hotpoint); cursors_[id] = CreateReffedCustomXCursor(x_image); @@ -174,10 +176,10 @@ void CursorLoaderX11::LoadAnimatedCursor(int id, int resource_id, const gfx::Point& hot, int frame_delay_ms) { + // TODO(oshima|tdanderson): Support rotation and fractional scale factor. const gfx::ImageSkia* image = ResourceBundle::GetSharedInstance().GetImageSkiaNamed(resource_id); - const gfx::ImageSkiaRep& image_rep = image->GetRepresentation( - display().device_scale_factor()); + const gfx::ImageSkiaRep& image_rep = image->GetRepresentation(scale()); SkBitmap bitmap = image_rep.sk_bitmap(); int frame_width = bitmap.height(); int frame_height = frame_width; @@ -232,8 +234,7 @@ void CursorLoaderX11::SetPlatformCursor(gfx::NativeCursor* cursor) { xcursor = invisible_cursor_.get(); else if (*cursor == kCursorCustom) xcursor = cursor->platform(); - else if (display().device_scale_factor() == 1.0f && - display().rotation() == gfx::Display::ROTATE_0) { + else if (scale() == 1.0f && rotation() == gfx::Display::ROTATE_0) { xcursor = GetXCursor(CursorShapeFromNative(*cursor)); } else { xcursor = ImageCursorFromNative(kCursorPointer); @@ -242,6 +243,10 @@ void CursorLoaderX11::SetPlatformCursor(gfx::NativeCursor* cursor) { cursor->SetPlatformCursor(xcursor); } +const XcursorImage* CursorLoaderX11::GetXcursorImageForTest(int id) { + return test::GetCachedXcursorImage(cursors_[id]); +} + bool CursorLoaderX11::IsImageCursor(gfx::NativeCursor native_cursor) { int type = native_cursor.native_type(); return cursors_.count(type) || animated_cursors_.count(type); @@ -259,48 +264,4 @@ bool CursorLoaderX11::IsImageCursor(gfx::NativeCursor native_cursor) { return GetXCursor(CursorShapeFromNative(native_cursor)); } -void ScaleAndRotateCursorBitmapAndHotpoint(float scale, - gfx::Display::Rotation rotation, - SkBitmap* bitmap, - gfx::Point* hotpoint) { - switch (rotation) { - case gfx::Display::ROTATE_0: - break; - case gfx::Display::ROTATE_90: - hotpoint->SetPoint(bitmap->height() - hotpoint->y(), hotpoint->x()); - *bitmap = SkBitmapOperations::Rotate( - *bitmap, SkBitmapOperations::ROTATION_90_CW); - break; - case gfx::Display::ROTATE_180: - hotpoint->SetPoint( - bitmap->width() - hotpoint->x(), bitmap->height() - hotpoint->y()); - *bitmap = SkBitmapOperations::Rotate( - *bitmap, SkBitmapOperations::ROTATION_180_CW); - break; - case gfx::Display::ROTATE_270: - hotpoint->SetPoint(hotpoint->y(), bitmap->width() - hotpoint->x()); - *bitmap = SkBitmapOperations::Rotate( - *bitmap, SkBitmapOperations::ROTATION_270_CW); - break; - } - - if (scale < FLT_EPSILON) { - NOTREACHED() << "Scale must be larger than 0."; - scale = 1.0f; - } - - if (scale == 1.0f) - return; - - gfx::Size scaled_size = gfx::ToFlooredSize( - gfx::ScaleSize(gfx::Size(bitmap->width(), bitmap->height()), scale)); - - *bitmap = skia::ImageOperations::Resize( - *bitmap, - skia::ImageOperations::RESIZE_BETTER, - scaled_size.width(), - scaled_size.height()); - *hotpoint = gfx::ToFlooredPoint(gfx::ScalePoint(*hotpoint, scale)); -} - } // namespace ui diff --git a/chromium/ui/base/cursor/cursor_loader_x11.h b/chromium/ui/base/cursor/cursor_loader_x11.h index a0265ffe3ae..331529b3b2c 100644 --- a/chromium/ui/base/cursor/cursor_loader_x11.h +++ b/chromium/ui/base/cursor/cursor_loader_x11.h @@ -11,13 +11,13 @@ #include "base/compiler_specific.h" #include "ui/base/cursor/cursor.h" #include "ui/base/cursor/cursor_loader.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/base/x/x11_util.h" #include "ui/gfx/display.h" namespace ui { -class UI_EXPORT CursorLoaderX11 : public CursorLoader { +class UI_BASE_EXPORT CursorLoaderX11 : public CursorLoader { public: CursorLoaderX11(); virtual ~CursorLoaderX11(); @@ -33,6 +33,8 @@ class UI_EXPORT CursorLoaderX11 : public CursorLoader { virtual void UnloadAll() OVERRIDE; virtual void SetPlatformCursor(gfx::NativeCursor* cursor) OVERRIDE; + const XcursorImage* GetXcursorImageForTest(int id); + private: // Returns true if we have an image resource loaded for the |native_cursor|. bool IsImageCursor(gfx::NativeCursor native_cursor); @@ -56,15 +58,6 @@ class UI_EXPORT CursorLoaderX11 : public CursorLoader { DISALLOW_COPY_AND_ASSIGN(CursorLoaderX11); }; -// Scale and rotate the cursor's bitmap and hotpoint. -// |bitmap_in_out| and |hotpoint_in_out| are used as -// both input and output. -UI_EXPORT void ScaleAndRotateCursorBitmapAndHotpoint( - float scale, - gfx::Display::Rotation rotation, - SkBitmap* bitmap_in_out, - gfx::Point* hotpoint_in_out); - } // namespace ui #endif // UI_BASE_CURSOR_CURSOR_LOADER_X11_H_ diff --git a/chromium/ui/base/cursor/cursor_loader_x11_unittest.cc b/chromium/ui/base/cursor/cursor_loader_x11_unittest.cc index c2413b6acfa..9584cf12613 100644 --- a/chromium/ui/base/cursor/cursor_loader_x11_unittest.cc +++ b/chromium/ui/base/cursor/cursor_loader_x11_unittest.cc @@ -10,6 +10,7 @@ #include "base/logging.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/skia/include/core/SkBitmap.h" +#include "ui/base/cursor/cursor_util.h" namespace ui { @@ -17,6 +18,7 @@ TEST(CursorLoaderX11Test, ScaleAndRotate) { SkBitmap bitmap; bitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 5); bitmap.allocPixels(); + bitmap.eraseColor(SK_ColorBLACK); gfx::Point hotpoint(3,4); diff --git a/chromium/ui/base/cursor/cursor_ozone.cc b/chromium/ui/base/cursor/cursor_ozone.cc new file mode 100644 index 00000000000..c4ef8c4d45e --- /dev/null +++ b/chromium/ui/base/cursor/cursor_ozone.cc @@ -0,0 +1,21 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/cursor/cursor.h" + +#include "ui/ozone/public/cursor_factory_ozone.h" + +namespace ui { + +void Cursor::RefCustomCursor() { + if (platform_cursor_) + CursorFactoryOzone::GetInstance()->RefImageCursor(platform_cursor_); +} + +void Cursor::UnrefCustomCursor() { + if (platform_cursor_) + CursorFactoryOzone::GetInstance()->UnrefImageCursor(platform_cursor_); +} + +} // namespace ui diff --git a/chromium/ui/base/cursor/cursor_util.cc b/chromium/ui/base/cursor/cursor_util.cc new file mode 100644 index 00000000000..a17d9447959 --- /dev/null +++ b/chromium/ui/base/cursor/cursor_util.cc @@ -0,0 +1,60 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/cursor/cursor_util.h" + +#include "base/logging.h" +#include "skia/ext/image_operations.h" +#include "ui/gfx/point_conversions.h" +#include "ui/gfx/size_conversions.h" +#include "ui/gfx/skbitmap_operations.h" +#include "ui/gfx/skia_util.h" + +namespace ui { + +void ScaleAndRotateCursorBitmapAndHotpoint(float scale, + gfx::Display::Rotation rotation, + SkBitmap* bitmap, + gfx::Point* hotpoint) { + switch (rotation) { + case gfx::Display::ROTATE_0: + break; + case gfx::Display::ROTATE_90: + hotpoint->SetPoint(bitmap->height() - hotpoint->y(), hotpoint->x()); + *bitmap = SkBitmapOperations::Rotate( + *bitmap, SkBitmapOperations::ROTATION_90_CW); + break; + case gfx::Display::ROTATE_180: + hotpoint->SetPoint( + bitmap->width() - hotpoint->x(), bitmap->height() - hotpoint->y()); + *bitmap = SkBitmapOperations::Rotate( + *bitmap, SkBitmapOperations::ROTATION_180_CW); + break; + case gfx::Display::ROTATE_270: + hotpoint->SetPoint(hotpoint->y(), bitmap->width() - hotpoint->x()); + *bitmap = SkBitmapOperations::Rotate( + *bitmap, SkBitmapOperations::ROTATION_270_CW); + break; + } + + if (scale < FLT_EPSILON) { + NOTREACHED() << "Scale must be larger than 0."; + scale = 1.0f; + } + + if (scale == 1.0f) + return; + + gfx::Size scaled_size = gfx::ToFlooredSize( + gfx::ScaleSize(gfx::Size(bitmap->width(), bitmap->height()), scale)); + + *bitmap = skia::ImageOperations::Resize( + *bitmap, + skia::ImageOperations::RESIZE_BETTER, + scaled_size.width(), + scaled_size.height()); + *hotpoint = gfx::ToFlooredPoint(gfx::ScalePoint(*hotpoint, scale)); +} + +} // namespace ui diff --git a/chromium/ui/base/cursor/cursor_util.h b/chromium/ui/base/cursor/cursor_util.h new file mode 100644 index 00000000000..1625156e7a9 --- /dev/null +++ b/chromium/ui/base/cursor/cursor_util.h @@ -0,0 +1,27 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_CURSOR_CURSOR_UTIL_H_ +#define UI_BASE_CURSOR_CURSOR_UTIL_H_ + +#include "base/compiler_specific.h" +#include "third_party/skia/include/core/SkBitmap.h" +#include "ui/base/ui_base_export.h" +#include "ui/gfx/display.h" +#include "ui/gfx/geometry/point.h" + +namespace ui { + +// Scale and rotate the cursor's bitmap and hotpoint. +// |bitmap_in_out| and |hotpoint_in_out| are used as +// both input and output. +UI_BASE_EXPORT void ScaleAndRotateCursorBitmapAndHotpoint( + float scale, + gfx::Display::Rotation rotation, + SkBitmap* bitmap_in_out, + gfx::Point* hotpoint_in_out); + +} // namespace ui + +#endif // UI_BASE_CURSOR_CURSOR_UTIL_H_ diff --git a/chromium/ui/base/cursor/cursors_aura.h b/chromium/ui/base/cursor/cursors_aura.h index 7d098a1eee4..e8eae0ab2de 100644 --- a/chromium/ui/base/cursor/cursors_aura.h +++ b/chromium/ui/base/cursor/cursors_aura.h @@ -6,7 +6,7 @@ #define UI_BASE_CURSOR_CURSORS_AURA_H_ #include "ui/base/cursor/cursor.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" class SkBitmap; @@ -22,24 +22,23 @@ const int kAnimatedCursorFrameDelayMs = 25; // ui::kCursorHelp. The IDR will be placed in |resource_id| and the hotspots // for the different DPIs will be placed in |hot_1x| and |hot_2x|. Returns // false if |id| is invalid. -bool UI_EXPORT GetCursorDataFor(CursorSetType cursor_set_id, - int id, - float scale_factor, - int* resource_id, - gfx::Point* point); +bool UI_BASE_EXPORT GetCursorDataFor(CursorSetType cursor_set_id, + int id, + float scale_factor, + int* resource_id, + gfx::Point* point); // Like above, but for animated cursors. -bool UI_EXPORT GetAnimatedCursorDataFor(CursorSetType cursor_set_id, - int id, - float scale_factor, - int* resource_id, - gfx::Point* point); +bool UI_BASE_EXPORT GetAnimatedCursorDataFor(CursorSetType cursor_set_id, + int id, + float scale_factor, + int* resource_id, + gfx::Point* point); // Returns the cursor bitmap for |cursor|. Returns false if |cursor| is invalid. // The cursor hot point location is set in |point|. -bool UI_EXPORT GetCursorBitmap(const Cursor& cursor, - SkBitmap* bitmap, - gfx::Point* point); +bool UI_BASE_EXPORT + GetCursorBitmap(const Cursor& cursor, SkBitmap* bitmap, gfx::Point* point); } // namespace ui diff --git a/chromium/ui/base/cursor/image_cursors.cc b/chromium/ui/base/cursor/image_cursors.cc new file mode 100644 index 00000000000..b4c19fc837b --- /dev/null +++ b/chromium/ui/base/cursor/image_cursors.cc @@ -0,0 +1,150 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/cursor/image_cursors.h" + +#include <float.h> + +#include "base/logging.h" +#include "base/strings/string16.h" +#include "ui/base/cursor/cursor.h" +#include "ui/base/cursor/cursor_loader.h" +#include "ui/base/cursor/cursors_aura.h" +#include "ui/gfx/display.h" +#include "ui/gfx/point.h" + +namespace ui { + +namespace { + +const int kImageCursorIds[] = { + kCursorNull, + kCursorPointer, + kCursorNoDrop, + kCursorNotAllowed, + kCursorCopy, + kCursorHand, + kCursorMove, + kCursorNorthEastResize, + kCursorSouthWestResize, + kCursorSouthEastResize, + kCursorNorthWestResize, + kCursorNorthResize, + kCursorSouthResize, + kCursorEastResize, + kCursorWestResize, + kCursorIBeam, + kCursorAlias, + kCursorCell, + kCursorContextMenu, + kCursorCross, + kCursorHelp, + kCursorVerticalText, + kCursorZoomIn, + kCursorZoomOut, + kCursorRowResize, + kCursorColumnResize, + kCursorEastWestResize, + kCursorNorthSouthResize, + kCursorNorthEastSouthWestResize, + kCursorNorthWestSouthEastResize, + kCursorGrab, + kCursorGrabbing, +}; + +const int kAnimatedCursorIds[] = { + kCursorWait, + kCursorProgress +}; + +} // namespace + +ImageCursors::ImageCursors() : cursor_set_(CURSOR_SET_NORMAL) { +} + +ImageCursors::~ImageCursors() { +} + +float ImageCursors::GetScale() const { + if (!cursor_loader_) { + NOTREACHED(); + // Returning default on release build as it's not serious enough to crash + // even if this ever happens. + return 1.0f; + } + return cursor_loader_->scale(); +} + +gfx::Display::Rotation ImageCursors::GetRotation() const { + if (!cursor_loader_) { + NOTREACHED(); + // Returning default on release build as it's not serious enough to crash + // even if this ever happens. + return gfx::Display::ROTATE_0; + } + return cursor_loader_->rotation(); +} + +bool ImageCursors::SetDisplay(const gfx::Display& display, + float scale_factor) { + if (!cursor_loader_) { + cursor_loader_.reset(CursorLoader::Create()); + } else if (cursor_loader_->rotation() == display.rotation() && + cursor_loader_->scale() == scale_factor) { + return false; + } + + cursor_loader_->set_rotation(display.rotation()); + cursor_loader_->set_scale(scale_factor); + ReloadCursors(); + return true; +} + +void ImageCursors::ReloadCursors() { + float device_scale_factor = cursor_loader_->scale(); + + cursor_loader_->UnloadAll(); + + for (size_t i = 0; i < arraysize(kImageCursorIds); ++i) { + int resource_id = -1; + gfx::Point hot_point; + bool success = GetCursorDataFor(cursor_set_, + kImageCursorIds[i], + device_scale_factor, + &resource_id, + &hot_point); + DCHECK(success); + cursor_loader_->LoadImageCursor(kImageCursorIds[i], resource_id, hot_point); + } + for (size_t i = 0; i < arraysize(kAnimatedCursorIds); ++i) { + int resource_id = -1; + gfx::Point hot_point; + bool success = GetAnimatedCursorDataFor(cursor_set_, + kAnimatedCursorIds[i], + device_scale_factor, + &resource_id, + &hot_point); + DCHECK(success); + cursor_loader_->LoadAnimatedCursor(kAnimatedCursorIds[i], + resource_id, + hot_point, + kAnimatedCursorFrameDelayMs); + } +} + +void ImageCursors::SetCursorSet(CursorSetType cursor_set) { + if (cursor_set_ == cursor_set) + return; + + cursor_set_ = cursor_set; + + if (cursor_loader_.get()) + ReloadCursors(); +} + +void ImageCursors::SetPlatformCursor(gfx::NativeCursor* cursor) { + cursor_loader_->SetPlatformCursor(cursor); +} + +} // namespace ui diff --git a/chromium/ui/base/cursor/image_cursors.h b/chromium/ui/base/cursor/image_cursors.h new file mode 100644 index 00000000000..25676ca462f --- /dev/null +++ b/chromium/ui/base/cursor/image_cursors.h @@ -0,0 +1,52 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_CURSOR_IMAGE_CURSORS_H_ +#define UI_BASE_CURSOR_IMAGE_CURSORS_H_ + +#include "base/memory/scoped_ptr.h" +#include "base/strings/string16.h" +#include "ui/base/cursor/cursor.h" +#include "ui/base/ui_base_export.h" +#include "ui/gfx/display.h" +#include "ui/gfx/native_widget_types.h" + +namespace ui { + +class CursorLoader; + +// A utility class that provides cursors for NativeCursors for which we have +// image resources. +class UI_BASE_EXPORT ImageCursors { + public: + ImageCursors(); + ~ImageCursors(); + + // Returns the scale and rotation of the currently loaded cursor. + float GetScale() const; + gfx::Display::Rotation GetRotation() const; + + // Sets the display the cursors are loaded for. |scale_factor| determines the + // size of the image to load. Returns true if the cursor image is reloaded. + bool SetDisplay(const gfx::Display& display, float scale_factor); + + // Sets the type of the mouse cursor icon. + void SetCursorSet(CursorSetType cursor_set); + + // Sets the platform cursor based on the native type of |cursor|. + void SetPlatformCursor(gfx::NativeCursor* cursor); + + private: + // Reloads the all loaded cursors in the cursor loader. + void ReloadCursors(); + + scoped_ptr<CursorLoader> cursor_loader_; + CursorSetType cursor_set_; + + DISALLOW_COPY_AND_ASSIGN(ImageCursors); +}; + +} // namespace ui + +#endif // UI_BASE_CURSOR_IMAGE_CURSORS_H_ diff --git a/chromium/ui/base/cursor/ozone/OWNERS b/chromium/ui/base/cursor/ozone/OWNERS new file mode 100644 index 00000000000..479c4d806cc --- /dev/null +++ b/chromium/ui/base/cursor/ozone/OWNERS @@ -0,0 +1,2 @@ +rjkroege@chromium.org +spang@chromium.org diff --git a/chromium/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.cc b/chromium/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.cc new file mode 100644 index 00000000000..c24c80fd9c2 --- /dev/null +++ b/chromium/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.cc @@ -0,0 +1,73 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" + +#include "base/logging.h" +#include "third_party/skia/include/core/SkBitmap.h" +#include "ui/base/cursor/cursors_aura.h" + +namespace ui { + +namespace { + +BitmapCursorOzone* ToBitmapCursorOzone(PlatformCursor cursor) { + return static_cast<BitmapCursorOzone*>(cursor); +} + +PlatformCursor ToPlatformCursor(BitmapCursorOzone* cursor) { + return static_cast<PlatformCursor>(cursor); +} + +} // namespace + +BitmapCursorFactoryOzone::BitmapCursorFactoryOzone() {} + +BitmapCursorFactoryOzone::~BitmapCursorFactoryOzone() {} + +PlatformCursor BitmapCursorFactoryOzone::GetDefaultCursor(int type) { + if (type == kCursorNone) + return NULL; // NULL is used for hidden cursor. + + if (!default_cursors_.count(type)) { + // Create new owned image cursor from default aura bitmap for this type. + SkBitmap bitmap; + gfx::Point hotspot; + CHECK(GetCursorBitmap(type, &bitmap, &hotspot)); + default_cursors_[type] = new BitmapCursorOzone(bitmap, hotspot); + } + + // Returned owned default cursor for this type. + return default_cursors_[type]; +} + +PlatformCursor BitmapCursorFactoryOzone::CreateImageCursor( + const SkBitmap& bitmap, + const gfx::Point& hotspot) { + BitmapCursorOzone* cursor = new BitmapCursorOzone(bitmap, hotspot); + cursor->AddRef(); // Balanced by UnrefImageCursor. + return ToPlatformCursor(cursor); +} + +void BitmapCursorFactoryOzone::RefImageCursor(PlatformCursor cursor) { + ToBitmapCursorOzone(cursor)->AddRef(); +} + +void BitmapCursorFactoryOzone::UnrefImageCursor(PlatformCursor cursor) { + ToBitmapCursorOzone(cursor)->Release(); +} + +void BitmapCursorFactoryOzone::SetCursor(gfx::AcceleratedWidget widget, + PlatformCursor platform_cursor) { + BitmapCursorOzone* cursor = ToBitmapCursorOzone(platform_cursor); + SetBitmapCursor(widget, make_scoped_refptr(cursor)); +} + +void BitmapCursorFactoryOzone::SetBitmapCursor( + gfx::AcceleratedWidget widget, + scoped_refptr<BitmapCursorOzone>) { + NOTIMPLEMENTED(); +} + +} // namespace ui diff --git a/chromium/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h b/chromium/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h new file mode 100644 index 00000000000..916e1293f0a --- /dev/null +++ b/chromium/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h @@ -0,0 +1,75 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_CURSOR_OZONE_BITMAP_CURSOR_FACTORY_OZONE_H_ +#define UI_BASE_CURSOR_OZONE_BITMAP_CURSOR_FACTORY_OZONE_H_ + +#include <map> + +#include "base/memory/ref_counted.h" +#include "third_party/skia/include/core/SkBitmap.h" +#include "ui/base/cursor/cursor.h" +#include "ui/base/ui_base_export.h" +#include "ui/gfx/geometry/point.h" +#include "ui/ozone/public/cursor_factory_ozone.h" + +namespace ui { + +// A cursor that is an SkBitmap combined with a gfx::Point hotspot. +class UI_BASE_EXPORT BitmapCursorOzone + : public base::RefCounted<BitmapCursorOzone> { + public: + BitmapCursorOzone(const SkBitmap& bitmap, const gfx::Point& hotspot) + : bitmap_(bitmap), hotspot_(hotspot) {} + + const gfx::Point& hotspot() { return hotspot_; } + const SkBitmap& bitmap() { return bitmap_; } + + private: + friend class base::RefCounted<BitmapCursorOzone>; + ~BitmapCursorOzone() {} + + SkBitmap bitmap_; + gfx::Point hotspot_; + + DISALLOW_COPY_AND_ASSIGN(BitmapCursorOzone); +}; + +// CursorFactoryOzone implementation for bitmapped cursors. +// +// This is a base class for platforms where PlatformCursor is an SkBitmap +// combined with a gfx::Point for the hotspot. +// +// Subclasses need only implement SetBitmapCursor() as everything else is +// implemented here. +class UI_BASE_EXPORT BitmapCursorFactoryOzone : public CursorFactoryOzone { + public: + BitmapCursorFactoryOzone(); + virtual ~BitmapCursorFactoryOzone(); + + // CursorFactoryOzone: + virtual PlatformCursor GetDefaultCursor(int type) OVERRIDE; + virtual PlatformCursor CreateImageCursor(const SkBitmap& bitmap, + const gfx::Point& hotspot) OVERRIDE; + virtual void RefImageCursor(PlatformCursor cursor) OVERRIDE; + virtual void UnrefImageCursor(PlatformCursor cursor) OVERRIDE; + virtual void SetCursor(gfx::AcceleratedWidget widget, + PlatformCursor cursor) OVERRIDE; + + // Set a bitmap cursor for the given window. This must be overridden by + // subclasses. If the cursor is hidden (kCursorNone) then cursor is NULL. + virtual void SetBitmapCursor(gfx::AcceleratedWidget window, + scoped_refptr<BitmapCursorOzone> cursor); + + private: + // Default cursors are cached & owned by the factory. + typedef std::map<int, scoped_refptr<BitmapCursorOzone> > DefaultCursorMap; + DefaultCursorMap default_cursors_; + + DISALLOW_COPY_AND_ASSIGN(BitmapCursorFactoryOzone); +}; + +} // namespace ui + +#endif // UI_BASE_CURSOR_OZONE_BITMAP_CURSOR_FACTORY_OZONE_H_ diff --git a/chromium/ui/base/default_theme_provider.cc b/chromium/ui/base/default_theme_provider.cc index 9777b390729..210ff1899b9 100644 --- a/chromium/ui/base/default_theme_provider.cc +++ b/chromium/ui/base/default_theme_provider.cc @@ -7,16 +7,16 @@ #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/image/image_skia.h" -#if defined(OS_WIN) && !defined(USE_AURA) -#include "ui/base/win/shell.h" -#endif - namespace ui { DefaultThemeProvider::DefaultThemeProvider() {} DefaultThemeProvider::~DefaultThemeProvider() {} +bool DefaultThemeProvider::UsingSystemTheme() const { + return true; +} + gfx::ImageSkia* DefaultThemeProvider::GetImageSkiaNamed(int id) const { return ResourceBundle::GetSharedInstance().GetImageSkiaNamed(id); } @@ -31,11 +31,7 @@ int DefaultThemeProvider::GetDisplayProperty(int id) const { } bool DefaultThemeProvider::ShouldUseNativeFrame() const { -#if defined(OS_WIN) && !defined(USE_AURA) - return ui::win::IsAeroGlassEnabled(); -#else return false; -#endif } bool DefaultThemeProvider::HasCustomImage(int id) const { @@ -48,10 +44,4 @@ base::RefCountedMemory* DefaultThemeProvider::GetRawData( return NULL; } -#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(TOOLKIT_VIEWS) && !defined(OS_ANDROID) -GdkPixbuf* DefaultThemeProvider::GetRTLEnabledPixbufNamed(int id) const { - return NULL; -} -#endif - } // namespace ui diff --git a/chromium/ui/base/default_theme_provider.h b/chromium/ui/base/default_theme_provider.h index 15fa4a9f487..e2589c732e7 100644 --- a/chromium/ui/base/default_theme_provider.h +++ b/chromium/ui/base/default_theme_provider.h @@ -10,7 +10,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" #include "ui/base/theme_provider.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { class ResourceBundle; @@ -18,12 +18,13 @@ class ResourceBundle; namespace ui { -class UI_EXPORT DefaultThemeProvider : public ThemeProvider { +class UI_BASE_EXPORT DefaultThemeProvider : public ThemeProvider { public: DefaultThemeProvider(); virtual ~DefaultThemeProvider(); // Overridden from ui::ThemeProvider: + virtual bool UsingSystemTheme() const OVERRIDE; virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const OVERRIDE; virtual SkColor GetColor(int id) const OVERRIDE; virtual int GetDisplayProperty(int id) const OVERRIDE; @@ -39,8 +40,6 @@ class UI_EXPORT DefaultThemeProvider : public ThemeProvider { virtual NSColor* GetNSColor(int id) const OVERRIDE; virtual NSColor* GetNSColorTint(int id) const OVERRIDE; virtual NSGradient* GetNSGradient(int id) const OVERRIDE; -#elif defined(OS_POSIX) && !defined(TOOLKIT_VIEWS) && !defined(OS_ANDROID) - virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const OVERRIDE; #endif private: diff --git a/chromium/ui/base/device_form_factor.h b/chromium/ui/base/device_form_factor.h index 4b5cd576cd1..f87ceca159f 100644 --- a/chromium/ui/base/device_form_factor.h +++ b/chromium/ui/base/device_form_factor.h @@ -5,7 +5,7 @@ #ifndef UI_BASE_DEVICE_FORM_FACTOR_H_ #define UI_BASE_DEVICE_FORM_FACTOR_H_ -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { @@ -17,7 +17,7 @@ enum DeviceFormFactor { // Returns the form factor of current device. For platforms other than Android // and iOS, DEVICE_FORM_FACTOR_DESKTOP is always returned. -UI_EXPORT DeviceFormFactor GetDeviceFormFactor(); +UI_BASE_EXPORT DeviceFormFactor GetDeviceFormFactor(); } // namespace ui diff --git a/chromium/ui/base/device_form_factor_android.cc b/chromium/ui/base/device_form_factor_android.cc index 836a81f19f5..e7ed06b82f0 100644 --- a/chromium/ui/base/device_form_factor_android.cc +++ b/chromium/ui/base/device_form_factor_android.cc @@ -2,17 +2,22 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ui/base/device_form_factor.h" +#include "ui/base/device_form_factor_android.h" -#include "base/command_line.h" -#include "ui_base_switches.h" +#include "base/android/jni_android.h" +#include "jni/DeviceFormFactor_jni.h" namespace ui { DeviceFormFactor GetDeviceFormFactor() { - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTabletUI)) - return DEVICE_FORM_FACTOR_TABLET; - return DEVICE_FORM_FACTOR_PHONE; + bool is_tablet = Java_DeviceFormFactor_isTablet( + base::android::AttachCurrentThread(), + base::android::GetApplicationContext()); + return is_tablet ? DEVICE_FORM_FACTOR_TABLET : DEVICE_FORM_FACTOR_PHONE; +} + +bool RegisterDeviceFormFactorAndroid(JNIEnv* env) { + return RegisterNativesImpl(env); } } // namespace ui diff --git a/chromium/ui/base/device_form_factor_android.h b/chromium/ui/base/device_form_factor_android.h new file mode 100644 index 00000000000..7e2328d86c1 --- /dev/null +++ b/chromium/ui/base/device_form_factor_android.h @@ -0,0 +1,18 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_DEVICE_FORM_FACTOR_ANDROID_H_ +#define UI_BASE_DEVICE_FORM_FACTOR_ANDROID_H_ + +#include <jni.h> + +#include "ui/base/device_form_factor.h" + +namespace ui { + +bool RegisterDeviceFormFactorAndroid(JNIEnv* env); + +} // namespace ui + +#endif // UI_BASE_DEVICE_FORM_FACTOR_ANDROID_H_ diff --git a/chromium/ui/base/dragdrop/cocoa_dnd_util.h b/chromium/ui/base/dragdrop/cocoa_dnd_util.h index 5b410145fe7..1945c177293 100644 --- a/chromium/ui/base/dragdrop/cocoa_dnd_util.h +++ b/chromium/ui/base/dragdrop/cocoa_dnd_util.h @@ -10,7 +10,7 @@ #include <vector> #include "base/strings/string16.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" class GURL; @@ -20,24 +20,24 @@ namespace ui { // any data associated with this type; it's only used to ensure that Chrome // supports any drag initiated inside of Chrome, whether or not data has been // associated with it. -UI_EXPORT extern NSString* const kChromeDragDummyPboardType; +UI_BASE_EXPORT extern NSString* const kChromeDragDummyPboardType; // Mail.app and TextEdit accept drags that have both HTML and image flavors on // them, but don't process them correctly <http://crbug.com/55879>. Therefore, // if there is an image flavor, don't put the HTML data on as HTML, but rather // put it on as this Chrome-only flavor. External apps won't see HTML but // Chrome will know enough to read it as HTML. <http://crbug.com/55879> -UI_EXPORT extern NSString* const kChromeDragImageHTMLPboardType; +UI_BASE_EXPORT extern NSString* const kChromeDragImageHTMLPboardType; // Populates the |url| and |title| with URL data in |pboard|. There may be more // than one, but we only handle dropping the first. |url| must not be |NULL|; // |title| is an optional parameter. Returns |YES| if URL data was obtained from // the pasteboard, |NO| otherwise. If |convert_filenames| is |YES|, the function // will also attempt to convert filenames in |pboard| to file URLs. -UI_EXPORT BOOL PopulateURLAndTitleFromPasteboard(GURL* url, - base::string16* title, - NSPasteboard* pboard, - BOOL convert_filenames); +UI_BASE_EXPORT BOOL PopulateURLAndTitleFromPasteboard(GURL* url, + base::string16* title, + NSPasteboard* pboard, + BOOL convert_filenames); } // namespace ui diff --git a/chromium/ui/base/dragdrop/download_file_interface.h b/chromium/ui/base/dragdrop/download_file_interface.h index c157950ba46..327fe79ebe1 100644 --- a/chromium/ui/base/dragdrop/download_file_interface.h +++ b/chromium/ui/base/dragdrop/download_file_interface.h @@ -10,7 +10,7 @@ #include "base/basictypes.h" #include "base/memory/ref_counted.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #if defined(OS_WIN) #include <objidl.h> @@ -25,7 +25,7 @@ namespace ui { // TODO(benjhayden, anybody): Do these need to be RefCountedThreadSafe? // Defines the interface to observe the status of file download. -class UI_EXPORT DownloadFileObserver +class UI_BASE_EXPORT DownloadFileObserver : public base::RefCountedThreadSafe<DownloadFileObserver> { public: virtual void OnDownloadCompleted(const base::FilePath& file_path) = 0; @@ -37,7 +37,7 @@ class UI_EXPORT DownloadFileObserver }; // Defines the interface to control how a file is downloaded. -class UI_EXPORT DownloadFileProvider +class UI_BASE_EXPORT DownloadFileProvider : public base::RefCountedThreadSafe<DownloadFileProvider> { public: // Starts the download asynchronously and returns immediately. diff --git a/chromium/ui/base/dragdrop/drag_drop_types.h b/chromium/ui/base/dragdrop/drag_drop_types.h index ea57f95d374..c74d4e28a44 100644 --- a/chromium/ui/base/dragdrop/drag_drop_types.h +++ b/chromium/ui/base/dragdrop/drag_drop_types.h @@ -6,11 +6,11 @@ #define UI_BASE_DRAGDROP_DRAG_DROP_TYPES_H_ #include "base/basictypes.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { -class UI_EXPORT DragDropTypes { +class UI_BASE_EXPORT DragDropTypes { public: enum DragOperation { DRAG_NONE = 0, @@ -22,14 +22,12 @@ class UI_EXPORT DragDropTypes { enum DragEventSource { DRAG_EVENT_SOURCE_MOUSE, DRAG_EVENT_SOURCE_TOUCH, + DRAG_EVENT_SOURCE_LAST = DRAG_EVENT_SOURCE_TOUCH }; #if defined(OS_WIN) static uint32 DragOperationToDropEffect(int drag_operation); static int DropEffectToDragOperation(uint32 effect); -#elif defined(TOOLKIT_GTK) - static int DragOperationToGdkDragAction(int drag_operation); - static int GdkDragActionToDragOperation(int gdk_drag_action); #endif }; diff --git a/chromium/ui/base/dragdrop/drag_source_win.h b/chromium/ui/base/dragdrop/drag_source_win.h index 7c03b6cb591..cec2aa14574 100644 --- a/chromium/ui/base/dragdrop/drag_source_win.h +++ b/chromium/ui/base/dragdrop/drag_source_win.h @@ -9,7 +9,7 @@ #include "base/basictypes.h" #include "base/memory/ref_counted.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { @@ -17,7 +17,7 @@ namespace ui { // drag-drop operation as the user mouses over other drop targets on their // system. This object tells Windows whether or not the drag should continue, // and supplies the appropriate cursors. -class UI_EXPORT DragSourceWin +class UI_BASE_EXPORT DragSourceWin : public IDropSource, public base::RefCountedThreadSafe<DragSourceWin> { public: diff --git a/chromium/ui/base/dragdrop/drag_utils.cc b/chromium/ui/base/dragdrop/drag_utils.cc index 891a6496cea..b9faf3fd66b 100644 --- a/chromium/ui/base/dragdrop/drag_utils.cc +++ b/chromium/ui/base/dragdrop/drag_utils.cc @@ -8,12 +8,12 @@ #include "base/logging.h" #include "base/strings/utf_string_conversions.h" #include "ui/base/dragdrop/os_exchange_data.h" -#include "ui/base/resource/resource_bundle.h" #include "ui/gfx/canvas.h" -#include "ui/gfx/font.h" +#include "ui/gfx/font_list.h" +#include "ui/gfx/geometry/point.h" +#include "ui/gfx/geometry/rect.h" +#include "ui/gfx/geometry/size.h" #include "ui/gfx/image/canvas_image_source.h" -#include "ui/gfx/point.h" -#include "ui/gfx/size.h" #include "url/gurl.h" namespace drag_utils { @@ -41,37 +41,35 @@ class FileDragImageSource : public gfx::CanvasImageSource { // Overridden from gfx::CanvasImageSource. virtual void Draw(gfx::Canvas* canvas) OVERRIDE { - // Set up our text portion - ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - gfx::Font font = rb.GetFont(ResourceBundle::BaseFont); - - // Paint the icon. - canvas->DrawImageInt(icon_, (size().width() - icon_.width()) / 2, 0); + if (!icon_.isNull()) { + // Paint the icon. + canvas->DrawImageInt(icon_, (size().width() - icon_.width()) / 2, 0); + } base::string16 name = file_name_.BaseName().LossyDisplayName(); const int flags = gfx::Canvas::TEXT_ALIGN_CENTER; + const gfx::FontList font_list; #if defined(OS_WIN) // Paint the file name. We inset it one pixel to allow room for the halo. - canvas->DrawStringWithHalo(name, font, kFileDragImageTextColor, - SK_ColorWHITE, 1, - icon_.height() + kLinkDragImageVPadding + 1, - size().width() - 2, font.GetHeight(), flags); + const gfx::Rect rect(1, icon_.height() + kLinkDragImageVPadding + 1, + size().width() - 2, font_list.GetHeight()); + canvas->DrawStringRectWithHalo(name, font_list, kFileDragImageTextColor, + SK_ColorWHITE, rect, flags); #else // NO_SUBPIXEL_RENDERING is required when drawing to a non-opaque canvas. - canvas->DrawStringInt(name, font, kFileDragImageTextColor, - 0, icon_.height() + kLinkDragImageVPadding, - size().width(), font.GetHeight(), - flags | gfx::Canvas::NO_SUBPIXEL_RENDERING); + const gfx::Rect rect(0, icon_.height() + kLinkDragImageVPadding, + size().width(), font_list.GetHeight()); + canvas->DrawStringRectWithFlags(name, font_list, kFileDragImageTextColor, + rect, + flags | gfx::Canvas::NO_SUBPIXEL_RENDERING); #endif } private: gfx::Size CalculateSize(const gfx::ImageSkia& icon) const { - ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - gfx::Font font = rb.GetFont(ResourceBundle::BaseFont); const int width = kFileDragImageMaxWidth; // Add +2 here to allow room for the halo. - const int height = font.GetHeight() + icon.height() + + const int height = gfx::FontList().GetHeight() + icon.height() + kLinkDragImageVPadding + 2; return gfx::Size(width, height); } @@ -85,25 +83,23 @@ class FileDragImageSource : public gfx::CanvasImageSource { } // namespace void CreateDragImageForFile(const base::FilePath& file_name, - const gfx::ImageSkia* icon, + const gfx::ImageSkia& icon, ui::OSExchangeData* data_object) { - DCHECK(icon); DCHECK(data_object); - gfx::CanvasImageSource* source = new FileDragImageSource(file_name, *icon); + gfx::CanvasImageSource* source = new FileDragImageSource(file_name, icon); gfx::Size size = source->size(); // ImageSkia takes ownership of |source|. gfx::ImageSkia image = gfx::ImageSkia(source, size); gfx::Vector2d cursor_offset(size.width() / 2, kLinkDragImageVPadding); - SetDragImageOnDataObject(image, size, cursor_offset, data_object); + SetDragImageOnDataObject(image, cursor_offset, data_object); } void SetDragImageOnDataObject(const gfx::Canvas& canvas, - const gfx::Size& size, const gfx::Vector2d& cursor_offset, ui::OSExchangeData* data_object) { gfx::ImageSkia image = gfx::ImageSkia(canvas.ExtractImageRep()); - SetDragImageOnDataObject(image, size, cursor_offset, data_object); + SetDragImageOnDataObject(image, cursor_offset, data_object); } } // namespace drag_utils diff --git a/chromium/ui/base/dragdrop/drag_utils.h b/chromium/ui/base/dragdrop/drag_utils.h index d31c628e53e..48ee94f128e 100644 --- a/chromium/ui/base/dragdrop/drag_utils.h +++ b/chromium/ui/base/dragdrop/drag_utils.h @@ -8,7 +8,7 @@ #include <string> #include "base/files/file_path.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" class GURL; @@ -28,27 +28,23 @@ namespace drag_utils { // Creates a dragging image to be displayed when the user drags a file from // Chrome (via the download manager, for example). The drag image is set into -// the supplied data_object. 'file_name' can be a full path, but the directory -// portion will be truncated in the drag image. -UI_EXPORT void CreateDragImageForFile(const base::FilePath& file_name, - const gfx::ImageSkia* icon, - ui::OSExchangeData* data_object); - -// Sets the drag image on data_object from the supplied canvas. width/height -// are the size of the image to use, and the offsets give the location of -// the hotspot for the drag image. -UI_EXPORT void SetDragImageOnDataObject(const gfx::Canvas& canvas, - const gfx::Size& size, - const gfx::Vector2d& cursor_offset, - ui::OSExchangeData* data_object); - -// Sets the drag image on data_object from the supplied ImageSkia. width/height -// are the size of the image to use, and the offsets give the location of -// the hotspot for the drag image. -UI_EXPORT void SetDragImageOnDataObject(const gfx::ImageSkia& image_skia, - const gfx::Size& size, - const gfx::Vector2d& cursor_offset, - ui::OSExchangeData* data_object); +// the supplied data_object. |file_name| can be a full path, but the directory +// portion will be truncated in the drag image. |icon| can be empty. +UI_BASE_EXPORT void CreateDragImageForFile(const base::FilePath& file_name, + const gfx::ImageSkia& icon, + ui::OSExchangeData* data_object); + +// Sets the drag image on data_object from the supplied canvas. +// |cursor_offset| gives the location of the hotspot for the drag image. +UI_BASE_EXPORT void SetDragImageOnDataObject(const gfx::Canvas& canvas, + const gfx::Vector2d& cursor_offset, + ui::OSExchangeData* data_object); + +// Sets the drag image on data_object from the supplied ImageSkia. +// |cursor_offset| gives the location of the hotspot for the drag image. +UI_BASE_EXPORT void SetDragImageOnDataObject(const gfx::ImageSkia& image_skia, + const gfx::Vector2d& cursor_offset, + ui::OSExchangeData* data_object); } // namespace drag_utils diff --git a/chromium/ui/base/dragdrop/drag_utils_aura.cc b/chromium/ui/base/dragdrop/drag_utils_aura.cc index 23c84fc7452..e202e815e1e 100644 --- a/chromium/ui/base/dragdrop/drag_utils_aura.cc +++ b/chromium/ui/base/dragdrop/drag_utils_aura.cc @@ -14,7 +14,6 @@ namespace drag_utils { void SetDragImageOnDataObject(const gfx::ImageSkia& image, - const gfx::Size& size, const gfx::Vector2d& cursor_offset, ui::OSExchangeData* data_object) { diff --git a/chromium/ui/base/dragdrop/drag_utils_mac.mm b/chromium/ui/base/dragdrop/drag_utils_mac.mm new file mode 100644 index 00000000000..22171bde7fb --- /dev/null +++ b/chromium/ui/base/dragdrop/drag_utils_mac.mm @@ -0,0 +1,23 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/dragdrop/drag_utils.h" + +#include "base/logging.h" + +namespace drag_utils { + +void SetDragImageOnDataObject(const gfx::Canvas& canvas, + const gfx::Vector2d& cursor_offset, + ui::OSExchangeData* data_object) { + NOTIMPLEMENTED(); +} + +void SetDragImageOnDataObject(const gfx::ImageSkia& image_skia, + const gfx::Vector2d& cursor_offset, + ui::OSExchangeData* data_object) { + NOTIMPLEMENTED(); +} + +} // namespace drag_utils diff --git a/chromium/ui/base/dragdrop/drag_utils_win.cc b/chromium/ui/base/dragdrop/drag_utils_win.cc index 0bed7ea099c..9fedd4202a3 100644 --- a/chromium/ui/base/dragdrop/drag_utils_win.cc +++ b/chromium/ui/base/dragdrop/drag_utils_win.cc @@ -15,13 +15,14 @@ #include "ui/base/dragdrop/os_exchange_data_provider_win.h" #include "ui/gfx/canvas.h" #include "ui/gfx/gdi_util.h" +#include "ui/gfx/geometry/size.h" #include "ui/gfx/image/image_skia.h" #include "ui/gfx/skbitmap_operations.h" namespace drag_utils { static void SetDragImageOnDataObject(HBITMAP hbitmap, - const gfx::Size& size, + const gfx::Size& size_in_pixels, const gfx::Vector2d& cursor_offset, IDataObject* data_object) { base::win::ScopedComPtr<IDragSourceHelper> helper; @@ -29,7 +30,7 @@ static void SetDragImageOnDataObject(HBITMAP hbitmap, IID_IDragSourceHelper, helper.ReceiveVoid()); if (SUCCEEDED(rv)) { SHDRAGIMAGE sdi; - sdi.sizeDragImage = size.ToSIZE(); + sdi.sizeDragImage = size_in_pixels.ToSIZE(); sdi.crColorKey = 0xFFFFFFFF; sdi.hbmpDragImage = hbitmap; sdi.ptOffset = gfx::PointAtOffsetFromOrigin(cursor_offset).ToPOINT(); @@ -57,10 +58,9 @@ static HBITMAP CreateHBITMAPFromSkBitmap(const SkBitmap& sk_bitmap) { } void SetDragImageOnDataObject(const gfx::ImageSkia& image_skia, - const gfx::Size& size, const gfx::Vector2d& cursor_offset, ui::OSExchangeData* data_object) { - DCHECK(data_object && !size.IsEmpty()); + DCHECK(data_object && !image_skia.size().IsEmpty()); // InitializeFromBitmap() doesn't expect an alpha channel and is confused // by premultiplied colors, so unpremultiply the bitmap. // SetDragImageOnDataObject(HBITMAP) takes ownership of the bitmap. @@ -68,17 +68,18 @@ void SetDragImageOnDataObject(const gfx::ImageSkia& image_skia, SkBitmapOperations::UnPreMultiply(*image_skia.bitmap())); if (bitmap) { // Attach 'bitmap' to the data_object. - SetDragImageOnDataObject(bitmap, size, cursor_offset, + SetDragImageOnDataObject( + bitmap, + gfx::Size(image_skia.bitmap()->width(), image_skia.bitmap()->height()), + cursor_offset, ui::OSExchangeDataProviderWin::GetIDataObject(*data_object)); } -#if defined(USE_AURA) // TODO: the above code is used in non-Ash, while below is used in Ash. If we // could figure this context out then we wouldn't do unnecessary work. However // as it stands getting this information in ui/base would be a layering // violation. data_object->provider().SetDragImage(image_skia, cursor_offset); -#endif } } // namespace drag_utils diff --git a/chromium/ui/base/dragdrop/drop_target_event.h b/chromium/ui/base/dragdrop/drop_target_event.h index 88fcfc11986..18c0630f52f 100644 --- a/chromium/ui/base/dragdrop/drop_target_event.h +++ b/chromium/ui/base/dragdrop/drop_target_event.h @@ -10,7 +10,7 @@ namespace ui { -class UI_EXPORT DropTargetEvent : public LocatedEvent { +class UI_BASE_EXPORT DropTargetEvent : public LocatedEvent { public: DropTargetEvent(const OSExchangeData& data, const gfx::Point& location, diff --git a/chromium/ui/base/dragdrop/drop_target_win.h b/chromium/ui/base/dragdrop/drop_target_win.h index 0f8c56d10af..4536f1d6aa6 100644 --- a/chromium/ui/base/dragdrop/drop_target_win.h +++ b/chromium/ui/base/dragdrop/drop_target_win.h @@ -8,7 +8,7 @@ #include <objidl.h> #include "base/memory/ref_counted.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" // Windows interface. struct IDropTargetHelper; @@ -24,7 +24,7 @@ namespace ui { // before the HWND is deleted too. // // This class is meant to be used in a STA and is not multithread-safe. -class UI_EXPORT DropTargetWin : public IDropTarget { +class UI_BASE_EXPORT DropTargetWin : public IDropTarget { public: // Create a new DropTarget associating it with the given HWND. explicit DropTargetWin(HWND hwnd); diff --git a/chromium/ui/base/dragdrop/file_info.cc b/chromium/ui/base/dragdrop/file_info.cc new file mode 100644 index 00000000000..e5b894a020f --- /dev/null +++ b/chromium/ui/base/dragdrop/file_info.cc @@ -0,0 +1,17 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/dragdrop/file_info.h" + +namespace ui { + +FileInfo::FileInfo() {} + +FileInfo::FileInfo(const base::FilePath& path, + const base::FilePath& display_name) + : path(path), display_name(display_name) {} + +FileInfo::~FileInfo() {} + +} // namespace ui diff --git a/chromium/ui/base/dragdrop/file_info.h b/chromium/ui/base/dragdrop/file_info.h new file mode 100644 index 00000000000..6e4f456147a --- /dev/null +++ b/chromium/ui/base/dragdrop/file_info.h @@ -0,0 +1,25 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_DRAGDROP_FILE_INFO_H_ +#define UI_BASE_DRAGDROP_FILE_INFO_H_ + +#include "base/files/file_path.h" +#include "ui/base/ui_base_export.h" + +namespace ui { + +// struct that bundles a file's path with an optional display name. +struct UI_BASE_EXPORT FileInfo { + FileInfo(); + FileInfo(const base::FilePath& path, const base::FilePath& display_name); + ~FileInfo(); + + base::FilePath path; + base::FilePath display_name; // Optional. +}; + +} // namespace ui + +#endif // UI_BASE_DRAGDROP_FILE_INFO_H_ diff --git a/chromium/ui/base/dragdrop/gtk_dnd_util.cc b/chromium/ui/base/dragdrop/gtk_dnd_util.cc deleted file mode 100644 index 899758b2a73..00000000000 --- a/chromium/ui/base/dragdrop/gtk_dnd_util.cc +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/dragdrop/gtk_dnd_util.h" - -#include <string> - -#include "base/logging.h" -#include "base/pickle.h" -#include "base/strings/utf_string_conversions.h" -#include "ui/base/clipboard/custom_data_helper.h" -#include "url/gurl.h" - -namespace ui { - -namespace { - -const int kBitsPerByte = 8; - -void AddTargetToList(GtkTargetList* targets, int target_code) { - switch (target_code) { - case ui::TEXT_PLAIN: - gtk_target_list_add_text_targets(targets, ui::TEXT_PLAIN); - break; - - case ui::TEXT_URI_LIST: - gtk_target_list_add_uri_targets(targets, ui::TEXT_URI_LIST); - break; - - case ui::TEXT_HTML: - gtk_target_list_add( - targets, ui::GetAtomForTarget(ui::TEXT_HTML), 0, ui::TEXT_HTML); - break; - - case ui::NETSCAPE_URL: - gtk_target_list_add(targets, - ui::GetAtomForTarget(ui::NETSCAPE_URL), 0, ui::NETSCAPE_URL); - break; - - case ui::CHROME_TAB: - case ui::CHROME_BOOKMARK_ITEM: - case ui::CHROME_NAMED_URL: - gtk_target_list_add(targets, ui::GetAtomForTarget(target_code), - GTK_TARGET_SAME_APP, target_code); - break; - - case ui::DIRECT_SAVE_FILE: - gtk_target_list_add(targets, - ui::GetAtomForTarget(ui::DIRECT_SAVE_FILE), 0, ui::DIRECT_SAVE_FILE); - break; - - case ui::CUSTOM_DATA: - gtk_target_list_add(targets, - ui::GetAtomForTarget(ui::CUSTOM_DATA), 0, ui::CUSTOM_DATA); - break; - - default: - NOTREACHED() << " Unexpected target code: " << target_code; - } -} - -} // namespace - -GdkAtom GetAtomForTarget(int target) { - switch (target) { - case CHROME_TAB: - static const GdkAtom kTabAtom = gdk_atom_intern( - "application/x-chrome-tab", false); - return kTabAtom; - - case TEXT_HTML: - static const GdkAtom kHtmlAtom = gdk_atom_intern( - "text/html", false); - return kHtmlAtom; - - case CHROME_BOOKMARK_ITEM: - static const GdkAtom kBookmarkAtom = gdk_atom_intern( - "application/x-chrome-bookmark-item", false); - return kBookmarkAtom; - - case TEXT_PLAIN: - static const GdkAtom kTextAtom= gdk_atom_intern( - "text/plain;charset=utf-8", false); - return kTextAtom; - - case TEXT_URI_LIST: - static const GdkAtom kUrisAtom = gdk_atom_intern( - "text/uri-list", false); - return kUrisAtom; - - case CHROME_NAMED_URL: - static const GdkAtom kNamedUrl = gdk_atom_intern( - "application/x-chrome-named-url", false); - return kNamedUrl; - - case NETSCAPE_URL: - static const GdkAtom kNetscapeUrl = gdk_atom_intern( - "_NETSCAPE_URL", false); - return kNetscapeUrl; - - case TEXT_PLAIN_NO_CHARSET: - static const GdkAtom kTextNoCharsetAtom = gdk_atom_intern( - "text/plain", false); - return kTextNoCharsetAtom; - - case DIRECT_SAVE_FILE: - static const GdkAtom kXdsAtom = gdk_atom_intern( - "XdndDirectSave0", false); - return kXdsAtom; - - case CUSTOM_DATA: - static const GdkAtom kCustomData = gdk_atom_intern( - kMimeTypeWebCustomData, false); - return kCustomData; - - default: - NOTREACHED(); - } - - return NULL; -} - -GtkTargetList* GetTargetListFromCodeMask(int code_mask) { - GtkTargetList* targets = gtk_target_list_new(NULL, 0); - - for (size_t i = 1; i < INVALID_TARGET; i = i << 1) { - if (i == CHROME_WEBDROP_FILE_CONTENTS) - continue; - - if (i & code_mask) - AddTargetToList(targets, i); - } - - return targets; -} - -void SetSourceTargetListFromCodeMask(GtkWidget* source, int code_mask) { - GtkTargetList* targets = GetTargetListFromCodeMask(code_mask); - gtk_drag_source_set_target_list(source, targets); - gtk_target_list_unref(targets); -} - -void SetDestTargetList(GtkWidget* dest, const int* target_codes) { - GtkTargetList* targets = gtk_target_list_new(NULL, 0); - - for (size_t i = 0; target_codes[i] != -1; ++i) { - AddTargetToList(targets, target_codes[i]); - } - - gtk_drag_dest_set_target_list(dest, targets); - gtk_target_list_unref(targets); -} - -void WriteURLWithName(GtkSelectionData* selection_data, - const GURL& url, - base::string16 title, - int type) { - if (title.empty()) { - // We prefer to not have empty titles. Set it to the filename extracted - // from the URL. - title = UTF8ToUTF16(url.ExtractFileName()); - } - - switch (type) { - case TEXT_PLAIN: { - gtk_selection_data_set_text(selection_data, url.spec().c_str(), - url.spec().length()); - break; - } - case TEXT_URI_LIST: { - gchar* uri_array[2]; - uri_array[0] = strdup(url.spec().c_str()); - uri_array[1] = NULL; - gtk_selection_data_set_uris(selection_data, uri_array); - free(uri_array[0]); - break; - } - case CHROME_NAMED_URL: { - Pickle pickle; - pickle.WriteString(UTF16ToUTF8(title)); - pickle.WriteString(url.spec()); - gtk_selection_data_set( - selection_data, - GetAtomForTarget(ui::CHROME_NAMED_URL), - kBitsPerByte, - reinterpret_cast<const guchar*>(pickle.data()), - pickle.size()); - break; - } - case NETSCAPE_URL: { - // _NETSCAPE_URL format is URL + \n + title. - std::string utf8_text = url.spec() + "\n" + UTF16ToUTF8(title); - gtk_selection_data_set(selection_data, - gtk_selection_data_get_target(selection_data), - kBitsPerByte, - reinterpret_cast<const guchar*>(utf8_text.c_str()), - utf8_text.length()); - break; - } - - default: { - NOTREACHED(); - break; - } - } -} - -bool ExtractNamedURL(GtkSelectionData* selection_data, - GURL* url, - base::string16* title) { - if (!selection_data || gtk_selection_data_get_length(selection_data) <= 0) - return false; - - Pickle data( - reinterpret_cast<const char*>( - gtk_selection_data_get_data(selection_data)), - gtk_selection_data_get_length(selection_data)); - PickleIterator iter(data); - std::string title_utf8, url_utf8; - if (!data.ReadString(&iter, &title_utf8) || - !data.ReadString(&iter, &url_utf8)) { - return false; - } - - GURL gurl(url_utf8); - if (!gurl.is_valid()) - return false; - - *url = gurl; - *title = UTF8ToUTF16(title_utf8); - return true; -} - -bool ExtractURIList(GtkSelectionData* selection_data, std::vector<GURL>* urls) { - gchar** uris = gtk_selection_data_get_uris(selection_data); - if (!uris) - return false; - - for (size_t i = 0; uris[i] != NULL; ++i) { - GURL url(uris[i]); - if (url.is_valid()) - urls->push_back(url); - } - - g_strfreev(uris); - return true; -} - -bool ExtractNetscapeURL(GtkSelectionData* selection_data, - GURL* url, - base::string16* title) { - if (!selection_data || gtk_selection_data_get_length(selection_data) <= 0) - return false; - - // Find the first '\n' in the data. It is the separator between the url and - // the title. - std::string data( - reinterpret_cast<const char*>( - gtk_selection_data_get_data(selection_data)), - gtk_selection_data_get_length(selection_data)); - std::string::size_type newline = data.find('\n'); - if (newline == std::string::npos) - return false; - - GURL gurl(data.substr(0, newline)); - if (!gurl.is_valid()) - return false; - - *url = gurl; - *title = UTF8ToUTF16(data.substr(newline + 1)); - return true; -} - -} // namespace ui diff --git a/chromium/ui/base/dragdrop/gtk_dnd_util.h b/chromium/ui/base/dragdrop/gtk_dnd_util.h deleted file mode 100644 index 88f00a309f1..00000000000 --- a/chromium/ui/base/dragdrop/gtk_dnd_util.h +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_DRAGDROP_GTK_DND_UTIL_H_ -#define UI_BASE_DRAGDROP_GTK_DND_UTIL_H_ - -#include <gtk/gtk.h> - -#include <vector> - -#include "base/strings/string16.h" -#include "ui/base/ui_export.h" - -class GURL; - -namespace ui { - -// Registry of all internal int codes for drag and drop. -enum { - // Intra-application types. - CHROME_TAB = 1 << 0, - CHROME_BOOKMARK_ITEM = 1 << 1, - CHROME_WEBDROP_FILE_CONTENTS = 1 << 2, - CHROME_NAMED_URL = 1 << 3, - - // Standard types. - TEXT_PLAIN = 1 << 4, - TEXT_URI_LIST = 1 << 5, - TEXT_HTML = 1 << 6, - - // Other types. NETSCAPE_URL is provided for compatibility with other - // apps. - NETSCAPE_URL = 1 << 7, - - // Used for drag-out download. - TEXT_PLAIN_NO_CHARSET = 1 << 8, - DIRECT_SAVE_FILE = 1 << 9, - - // Custom data for web drag/drop. - CUSTOM_DATA = 1 << 10, - - INVALID_TARGET = 1 << 11, -}; - -// Get the atom for a given target (of the above enum type). Will return NULL -// for non-custom targets, such as CHROME_TEXT_PLAIN. -UI_EXPORT GdkAtom GetAtomForTarget(int target); - -// Creates a target list from the given mask. The mask should be an OR of -// CHROME_* values. The target list is returned with ref count 1; the caller -// is responsible for calling gtk_target_list_unref() when it is no longer -// needed. -// Since the MIME type for WEBDROP_FILE_CONTENTS depends on the file's -// contents, that flag is ignored by this function. It is the responsibility -// of the client code to do the right thing. -UI_EXPORT GtkTargetList* GetTargetListFromCodeMask(int code_mask); - -// Set the drag target list for |source| with the target list that -// corresponds to |code_mask|. -UI_EXPORT void SetSourceTargetListFromCodeMask(GtkWidget* source, - int code_mask); - -// Set the accepted targets list for |dest|. The |target_codes| array should -// be sorted in preference order and should be terminated with -1. -UI_EXPORT void SetDestTargetList(GtkWidget* dest, const int* target_codes); - -// Write a URL to the selection in the given type. -UI_EXPORT void WriteURLWithName(GtkSelectionData* selection_data, - const GURL& url, - base::string16 title, - int type); - -// Extracts data of type CHROME_NAMED_URL from |selection_data| into -// |url| and |title|. Returns true if the url/title were safely extracted -// and the url is valid. -UI_EXPORT bool ExtractNamedURL(GtkSelectionData* selection_data, - GURL* url, - base::string16* title); - -// Extracts data of type TEXT_URI_LIST from |selection_data| into |urls|. -UI_EXPORT bool ExtractURIList(GtkSelectionData* selection_data, - std::vector<GURL>* urls); - -// Extracts a Netscape URL (url\ntitle) from |selection_data|. -UI_EXPORT bool ExtractNetscapeURL(GtkSelectionData* selection_data, - GURL* url, - base::string16* title); - -} // namespace ui - -#endif // UI_BASE_DRAGDROP_GTK_DND_UTIL_H_ diff --git a/chromium/ui/base/dragdrop/gtk_dnd_util_unittest.cc b/chromium/ui/base/dragdrop/gtk_dnd_util_unittest.cc deleted file mode 100644 index 04f81aecdf5..00000000000 --- a/chromium/ui/base/dragdrop/gtk_dnd_util_unittest.cc +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include <string> - -#include "base/memory/scoped_ptr.h" -#include "base/pickle.h" -#include "base/strings/utf_string_conversions.h" -#include "testing/gtest/include/gtest/gtest.h" -#include "ui/base/dragdrop/gtk_dnd_util.h" -#include "url/gurl.h" - -namespace ui { - -TEST(GtkDndUtilTest, ExtractNamedURLValid) { - const std::string kTitle = "title"; - const std::string kUrl = "http://www.foobar.com/"; - Pickle pickle; - pickle.WriteString(kTitle); - pickle.WriteString(kUrl); - - GtkSelectionData data; - scoped_ptr<guchar[]> test_data(new guchar[pickle.size()]); - memcpy(test_data.get(), pickle.data(), pickle.size()); - data.data = test_data.get(); - data.length = pickle.size(); - - GURL url; - base::string16 title; - ASSERT_EQ(true, ui::ExtractNamedURL(&data, &url, &title)); - EXPECT_EQ(UTF8ToUTF16(kTitle), title); - EXPECT_EQ(GURL(kUrl), url); -} - -TEST(GtkDndUtilTest, ExtractNamedURLInvalidURL) { - const std::string kTitle = "title"; - const std::string kBadUrl = "foobar"; - Pickle pickle; - pickle.WriteString(kTitle); - pickle.WriteString(kBadUrl); - - GtkSelectionData data; - scoped_ptr<guchar[]> test_data(new guchar[pickle.size()]); - memcpy(test_data.get(), pickle.data(), pickle.size()); - data.data = test_data.get(); - data.length = pickle.size(); - - GURL url; - base::string16 title; - EXPECT_FALSE(ui::ExtractNamedURL(&data, &url, &title)); -} - -TEST(GtkDndUtilTest, ExtractNamedURLInvalidInput) { - GURL url; - base::string16 title; - GtkSelectionData data; - data.data = NULL; - data.length = 0; - - EXPECT_FALSE(ui::ExtractNamedURL(&data, &url, &title)); - - guchar empty_data[] = ""; - data.data = empty_data; - data.length = 0; - - EXPECT_FALSE(ui::ExtractNamedURL(&data, &url, &title)); - - const std::string kTitle = "title"; - Pickle pickle; - pickle.WriteString(kTitle); - - scoped_ptr<guchar[]> test_data(new guchar[pickle.size()]); - memcpy(test_data.get(), pickle.data(), pickle.size()); - data.data = test_data.get(); - data.length = pickle.size(); - - EXPECT_FALSE(ui::ExtractNamedURL(&data, &url, &title)); -} - -} // namespace ui diff --git a/chromium/ui/base/dragdrop/os_exchange_data.cc b/chromium/ui/base/dragdrop/os_exchange_data.cc index 1b13daf40b7..c236a467305 100644 --- a/chromium/ui/base/dragdrop/os_exchange_data.cc +++ b/chromium/ui/base/dragdrop/os_exchange_data.cc @@ -18,15 +18,6 @@ OSExchangeData::DownloadFileInfo::DownloadFileInfo( OSExchangeData::DownloadFileInfo::~DownloadFileInfo() {} -OSExchangeData::FileInfo::FileInfo( - const base::FilePath& path, - const base::FilePath& display_name) - : path(path), - display_name(display_name) { -} - -OSExchangeData::FileInfo::~FileInfo() {} - OSExchangeData::OSExchangeData() : provider_(CreateProvider()) { } @@ -36,6 +27,14 @@ OSExchangeData::OSExchangeData(Provider* provider) : provider_(provider) { OSExchangeData::~OSExchangeData() { } +void OSExchangeData::MarkOriginatedFromRenderer() { + provider_->MarkOriginatedFromRenderer(); +} + +bool OSExchangeData::DidOriginateFromRenderer() const { + return provider_->DidOriginateFromRenderer(); +} + void OSExchangeData::SetString(const base::string16& data) { provider_->SetString(data); } @@ -86,8 +85,8 @@ bool OSExchangeData::HasString() const { return provider_->HasString(); } -bool OSExchangeData::HasURL() const { - return provider_->HasURL(); +bool OSExchangeData::HasURL(FilenameToURLPolicy policy) const { + return provider_->HasURL(policy); } bool OSExchangeData::HasFile() const { @@ -98,43 +97,18 @@ bool OSExchangeData::HasCustomFormat(const CustomFormat& format) const { return provider_->HasCustomFormat(format); } -bool OSExchangeData::HasAllFormats( - int formats, - const std::set<CustomFormat>& custom_formats) const { - if ((formats & STRING) != 0 && !HasString()) - return false; - if ((formats & URL) != 0 && !HasURL()) - return false; -#if defined(OS_WIN) - if ((formats & FILE_CONTENTS) != 0 && !provider_->HasFileContents()) - return false; -#endif -#if defined(OS_WIN) || defined(USE_AURA) - if ((formats & HTML) != 0 && !provider_->HasHtml()) - return false; -#endif - if ((formats & FILE_NAME) != 0 && !provider_->HasFile()) - return false; - for (std::set<CustomFormat>::const_iterator i = custom_formats.begin(); - i != custom_formats.end(); ++i) { - if (!HasCustomFormat(*i)) - return false; - } - return true; -} - bool OSExchangeData::HasAnyFormat( int formats, const std::set<CustomFormat>& custom_formats) const { if ((formats & STRING) != 0 && HasString()) return true; - if ((formats & URL) != 0 && HasURL()) + if ((formats & URL) != 0 && HasURL(CONVERT_FILENAMES)) return true; #if defined(OS_WIN) if ((formats & FILE_CONTENTS) != 0 && provider_->HasFileContents()) return true; #endif -#if defined(OS_WIN) || defined(USE_AURA) +#if defined(USE_AURA) if ((formats & HTML) != 0 && provider_->HasHtml()) return true; #endif @@ -162,13 +136,9 @@ bool OSExchangeData::GetFileContents(base::FilePath* filename, void OSExchangeData::SetDownloadFileInfo(const DownloadFileInfo& download) { provider_->SetDownloadFileInfo(download); } - -void OSExchangeData::SetInDragLoop(bool in_drag_loop) { - provider_->SetInDragLoop(in_drag_loop); -} #endif -#if defined(OS_WIN) || defined(USE_AURA) +#if defined(USE_AURA) void OSExchangeData::SetHtml(const base::string16& html, const GURL& base_url) { provider_->SetHtml(html, base_url); } diff --git a/chromium/ui/base/dragdrop/os_exchange_data.h b/chromium/ui/base/dragdrop/os_exchange_data.h index 67834e39c5f..539e8949f9d 100644 --- a/chromium/ui/base/dragdrop/os_exchange_data.h +++ b/chromium/ui/base/dragdrop/os_exchange_data.h @@ -12,8 +12,6 @@ #if defined(OS_WIN) #include <objidl.h> -#elif defined(TOOLKIT_GTK) -#include <gtk/gtk.h> #endif #include "base/basictypes.h" @@ -21,7 +19,7 @@ #include "base/memory/scoped_ptr.h" #include "ui/base/clipboard/clipboard.h" #include "ui/base/dragdrop/download_file_interface.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" class GURL; class Pickle; @@ -33,6 +31,8 @@ class Vector2d; namespace ui { +struct FileInfo; + /////////////////////////////////////////////////////////////////////////////// // // OSExchangeData @@ -47,7 +47,7 @@ namespace ui { // TabContentsViewGtk uses a different class to handle drag support that does // not use OSExchangeData. As such, file contents and html support is only // compiled on windows. -class UI_EXPORT OSExchangeData { +class UI_BASE_EXPORT OSExchangeData { public: // CustomFormats are used for non-standard data types. For example, bookmark // nodes are written using a CustomFormat. @@ -63,7 +63,7 @@ class UI_EXPORT OSExchangeData { #if defined(OS_WIN) FILE_CONTENTS = 1 << 4, #endif -#if defined(OS_WIN) || defined(USE_AURA) +#if defined(USE_AURA) HTML = 1 << 5, #endif }; @@ -73,7 +73,7 @@ class UI_EXPORT OSExchangeData { enum FilenameToURLPolicy { CONVERT_FILENAMES, DO_NOT_CONVERT_FILENAMES, }; // Encapsulates the info about a file to be downloaded. - struct UI_EXPORT DownloadFileInfo { + struct UI_BASE_EXPORT DownloadFileInfo { DownloadFileInfo(const base::FilePath& filename, DownloadFileProvider* downloader); ~DownloadFileInfo(); @@ -82,26 +82,18 @@ class UI_EXPORT OSExchangeData { scoped_refptr<DownloadFileProvider> downloader; }; - // Encapsulates the info about a file. - struct UI_EXPORT FileInfo { - FileInfo(const base::FilePath& path, const base::FilePath& display_name); - ~FileInfo(); - - // The path of the file. - base::FilePath path; - // The display name of the file. This field is optional. - base::FilePath display_name; - }; - // Provider defines the platform specific part of OSExchangeData that // interacts with the native system. - class UI_EXPORT Provider { + class UI_BASE_EXPORT Provider { public: Provider() {} virtual ~Provider() {} virtual Provider* Clone() const = 0; + virtual void MarkOriginatedFromRenderer() = 0; + virtual bool DidOriginateFromRenderer() const = 0; + virtual void SetString(const base::string16& data) = 0; virtual void SetURL(const GURL& url, const base::string16& title) = 0; virtual void SetFilename(const base::FilePath& path) = 0; @@ -121,21 +113,22 @@ class UI_EXPORT OSExchangeData { Pickle* data) const = 0; virtual bool HasString() const = 0; - virtual bool HasURL() const = 0; + virtual bool HasURL(FilenameToURLPolicy policy) const = 0; virtual bool HasFile() const = 0; virtual bool HasCustomFormat(const CustomFormat& format) const = 0; -#if defined(OS_WIN) +#if (!defined(OS_CHROMEOS) && defined(USE_X11)) || defined(OS_WIN) virtual void SetFileContents(const base::FilePath& filename, const std::string& file_contents) = 0; +#endif +#if defined(OS_WIN) virtual bool GetFileContents(base::FilePath* filename, std::string* file_contents) const = 0; virtual bool HasFileContents() const = 0; virtual void SetDownloadFileInfo(const DownloadFileInfo& download) = 0; - virtual void SetInDragLoop(bool in_drag_loop) = 0; #endif -#if defined(OS_WIN) || defined(USE_AURA) +#if defined(USE_AURA) virtual void SetHtml(const base::string16& html, const GURL& base_url) = 0; virtual bool GetHtml(base::string16* html, GURL* base_url) const = 0; virtual bool HasHtml() const = 0; @@ -163,6 +156,12 @@ class UI_EXPORT OSExchangeData { const Provider& provider() const { return *provider_; } Provider& provider() { return *provider_; } + // Marks drag data as tainted if it originates from the renderer. This is used + // to avoid granting privileges to a renderer when dragging in tainted data, + // since it could allow potential escalation of privileges. + void MarkOriginatedFromRenderer(); + bool DidOriginateFromRenderer() const; + // These functions add data to the OSExchangeData object of various Chrome // types. The OSExchangeData object takes care of translating the data into // a format suitable for exchange with the OS. @@ -201,22 +200,18 @@ class UI_EXPORT OSExchangeData { // Test whether or not data of certain types is present, without actually // returning anything. bool HasString() const; - bool HasURL() const; + bool HasURL(FilenameToURLPolicy policy) const; bool HasFile() const; bool HasCustomFormat(const CustomFormat& format) const; - // Returns true if this OSExchangeData has data for ALL the formats in - // |formats| and ALL the custom formats in |custom_formats|. - bool HasAllFormats(int formats, - const std::set<CustomFormat>& custom_formats) const; - // Returns true if this OSExchangeData has data in any of the formats in // |formats| or any custom format in |custom_formats|. bool HasAnyFormat(int formats, const std::set<CustomFormat>& custom_formats) const; #if defined(OS_WIN) - // Adds the bytes of a file (CFSTR_FILECONTENTS and CFSTR_FILEDESCRIPTOR). + // Adds the bytes of a file (CFSTR_FILECONTENTS and CFSTR_FILEDESCRIPTOR on + // Windows). void SetFileContents(const base::FilePath& filename, const std::string& file_contents); bool GetFileContents(base::FilePath* filename, @@ -224,11 +219,9 @@ class UI_EXPORT OSExchangeData { // Adds a download file with full path (CF_HDROP). void SetDownloadFileInfo(const DownloadFileInfo& download); - - void SetInDragLoop(bool in_drag_loop); #endif -#if defined(OS_WIN) || defined(USE_AURA) +#if defined(USE_AURA) // Adds a snippet of HTML. |html| is just raw html but this sets both // text/html and CF_HTML. void SetHtml(const base::string16& html, const GURL& base_url); diff --git a/chromium/ui/base/dragdrop/os_exchange_data_provider_aura.cc b/chromium/ui/base/dragdrop/os_exchange_data_provider_aura.cc index 0d793495695..2a44793d070 100644 --- a/chromium/ui/base/dragdrop/os_exchange_data_provider_aura.cc +++ b/chromium/ui/base/dragdrop/os_exchange_data_provider_aura.cc @@ -9,6 +9,7 @@ #include "net/base/net_util.h" #include "ui/base/clipboard/clipboard.h" #include "ui/base/clipboard/scoped_clipboard_writer.h" +#include "ui/base/dragdrop/file_info.h" namespace ui { @@ -33,6 +34,15 @@ OSExchangeData::Provider* OSExchangeDataProviderAura::Clone() const { return ret; } +void OSExchangeDataProviderAura::MarkOriginatedFromRenderer() { + // TODO(dcheng): Currently unneeded because ChromeOS Aura correctly separates + // URL and filename metadata, and does not implement the DownloadURL protocol. +} + +bool OSExchangeDataProviderAura::DidOriginateFromRenderer() const { + return false; +} + void OSExchangeDataProviderAura::SetString(const base::string16& data) { string_ = data; formats_ |= OSExchangeData::STRING; @@ -44,17 +54,17 @@ void OSExchangeDataProviderAura::SetURL(const GURL& url, title_ = title; formats_ |= OSExchangeData::URL; - SetString(UTF8ToUTF16(url.spec())); + SetString(base::UTF8ToUTF16(url.spec())); } void OSExchangeDataProviderAura::SetFilename(const base::FilePath& path) { filenames_.clear(); - filenames_.push_back(OSExchangeData::FileInfo(path, base::FilePath())); + filenames_.push_back(FileInfo(path, base::FilePath())); formats_ |= OSExchangeData::FILE_NAME; } void OSExchangeDataProviderAura::SetFilenames( - const std::vector<OSExchangeData::FileInfo>& filenames) { + const std::vector<FileInfo>& filenames) { filenames_ = filenames; formats_ |= OSExchangeData::FILE_NAME; } @@ -100,7 +110,7 @@ bool OSExchangeDataProviderAura::GetFilename(base::FilePath* path) const { } bool OSExchangeDataProviderAura::GetFilenames( - std::vector<OSExchangeData::FileInfo>* filenames) const { + std::vector<FileInfo>* filenames) const { if ((formats_ & OSExchangeData::FILE_NAME) == 0) return false; *filenames = filenames_; @@ -122,7 +132,9 @@ bool OSExchangeDataProviderAura::HasString() const { return (formats_ & OSExchangeData::STRING) != 0; } -bool OSExchangeDataProviderAura::HasURL() const { +bool OSExchangeDataProviderAura::HasURL( + OSExchangeData::FilenameToURLPolicy policy) const { + // TODO(dcheng): implement filename conversion. if ((formats_ & OSExchangeData::URL) != 0) { return true; } diff --git a/chromium/ui/base/dragdrop/os_exchange_data_provider_aura.h b/chromium/ui/base/dragdrop/os_exchange_data_provider_aura.h index 06203434bf0..e54a2fdfe24 100644 --- a/chromium/ui/base/dragdrop/os_exchange_data_provider_aura.h +++ b/chromium/ui/base/dragdrop/os_exchange_data_provider_aura.h @@ -19,7 +19,7 @@ namespace ui { class Clipboard; // OSExchangeData::Provider implementation for aura on linux. -class UI_EXPORT OSExchangeDataProviderAura +class UI_BASE_EXPORT OSExchangeDataProviderAura : public OSExchangeData::Provider { public: OSExchangeDataProviderAura(); @@ -27,11 +27,12 @@ class UI_EXPORT OSExchangeDataProviderAura // Overridden from OSExchangeData::Provider: virtual Provider* Clone() const OVERRIDE; + virtual void MarkOriginatedFromRenderer() OVERRIDE; + virtual bool DidOriginateFromRenderer() const OVERRIDE; virtual void SetString(const base::string16& data) OVERRIDE; virtual void SetURL(const GURL& url, const base::string16& title) OVERRIDE; virtual void SetFilename(const base::FilePath& path) OVERRIDE; - virtual void SetFilenames( - const std::vector<OSExchangeData::FileInfo>& filenames) OVERRIDE; + virtual void SetFilenames(const std::vector<FileInfo>& filenames) OVERRIDE; virtual void SetPickledData(const OSExchangeData::CustomFormat& format, const Pickle& data) OVERRIDE; virtual bool GetString(base::string16* data) const OVERRIDE; @@ -39,12 +40,12 @@ class UI_EXPORT OSExchangeDataProviderAura GURL* url, base::string16* title) const OVERRIDE; virtual bool GetFilename(base::FilePath* path) const OVERRIDE; - virtual bool GetFilenames( - std::vector<OSExchangeData::FileInfo>* filenames) const OVERRIDE; + virtual bool GetFilenames(std::vector<FileInfo>* filenames) const OVERRIDE; virtual bool GetPickledData(const OSExchangeData::CustomFormat& format, Pickle* data) const OVERRIDE; virtual bool HasString() const OVERRIDE; - virtual bool HasURL() const OVERRIDE; + virtual bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const + OVERRIDE; virtual bool HasFile() const OVERRIDE; virtual bool HasCustomFormat(const OSExchangeData::CustomFormat& format) const OVERRIDE; @@ -77,7 +78,7 @@ class UI_EXPORT OSExchangeDataProviderAura base::string16 title_; // File name. - std::vector<OSExchangeData::FileInfo> filenames_; + std::vector<FileInfo> filenames_; // PICKLED_DATA contents. PickleData pickle_data_; diff --git a/chromium/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc b/chromium/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc index aba74c01fcd..bf583984785 100644 --- a/chromium/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc +++ b/chromium/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc @@ -6,14 +6,15 @@ #include "base/logging.h" #include "base/memory/ref_counted_memory.h" -#include "base/message_loop/message_pump_x11.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" -#include "net/base/net_util.h" +#include "net/base/filename_util.h" #include "ui/base/clipboard/clipboard.h" #include "ui/base/clipboard/scoped_clipboard_writer.h" +#include "ui/base/dragdrop/file_info.h" #include "ui/base/x/selection_utils.h" #include "ui/base/x/x11_util.h" +#include "ui/events/platform/platform_event_source.h" // Note: the GetBlah() methods are used immediately by the // web_contents_view_aura.cc:PrepareDropData(), while the omnibox is a @@ -25,6 +26,9 @@ namespace ui { namespace { const char kDndSelection[] = "XdndSelection"; +const char kRendererTaint[] = "chromium/x-renderer-taint"; + +const char kNetscapeURL[] = "_NETSCAPE_URL"; const char* kAtomsToCache[] = { kString, @@ -33,7 +37,9 @@ const char* kAtomsToCache[] = { kDndSelection, Clipboard::kMimeTypeURIList, kMimeTypeMozillaURL, + kNetscapeURL, Clipboard::kMimeTypeText, + kRendererTaint, NULL }; @@ -77,12 +83,12 @@ OSExchangeDataProviderAuraX11::OSExchangeDataProviderAuraX11() XStoreName(x_display_, x_window_, "Chromium Drag & Drop Window"); - base::MessagePumpX11::Current()->AddDispatcherForWindow(this, x_window_); + PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); } OSExchangeDataProviderAuraX11::~OSExchangeDataProviderAuraX11() { if (own_window_) { - base::MessagePumpX11::Current()->RemoveDispatcherForWindow(x_window_); + PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); XDestroyWindow(x_display_, x_window_); } } @@ -108,8 +114,20 @@ OSExchangeData::Provider* OSExchangeDataProviderAuraX11::Clone() const { return ret; } +void OSExchangeDataProviderAuraX11::MarkOriginatedFromRenderer() { + std::string empty; + format_map_.Insert(atom_cache_.GetAtom(kRendererTaint), + scoped_refptr<base::RefCountedMemory>( + base::RefCountedString::TakeString(&empty))); +} + +bool OSExchangeDataProviderAuraX11::DidOriginateFromRenderer() const { + return format_map_.find(atom_cache_.GetAtom(kRendererTaint)) != + format_map_.end(); +} + void OSExchangeDataProviderAuraX11::SetString(const base::string16& text_data) { - std::string utf8 = UTF16ToUTF8(text_data); + std::string utf8 = base::UTF16ToUTF8(text_data); scoped_refptr<base::RefCountedMemory> mem( base::RefCountedString::TakeString(&utf8)); @@ -121,30 +139,66 @@ void OSExchangeDataProviderAuraX11::SetString(const base::string16& text_data) { void OSExchangeDataProviderAuraX11::SetURL(const GURL& url, const base::string16& title) { - // Mozilla's URL format: (UTF16: URL, newline, title) + // TODO(dcheng): The original GTK code tries very hard to avoid writing out an + // empty title. Is this necessary? if (url.is_valid()) { - string16 spec = UTF8ToUTF16(url.spec()); + // Mozilla's URL format: (UTF16: URL, newline, title) + base::string16 spec = base::UTF8ToUTF16(url.spec()); std::vector<unsigned char> data; ui::AddString16ToVector(spec, &data); - ui::AddString16ToVector(ASCIIToUTF16("\n"), &data); + ui::AddString16ToVector(base::ASCIIToUTF16("\n"), &data); ui::AddString16ToVector(title, &data); scoped_refptr<base::RefCountedMemory> mem( base::RefCountedBytes::TakeVector(&data)); format_map_.Insert(atom_cache_.GetAtom(kMimeTypeMozillaURL), mem); + // Set a string fallback as well. SetString(spec); + + // Return early if this drag already contains file contents (this implies + // that file contents must be populated before URLs). Nautilus (and possibly + // other file managers) prefer _NETSCAPE_URL over the X Direct Save + // protocol, but we want to prioritize XDS in this case. + if (!file_contents_name_.empty()) + return; + + // Set _NETSCAPE_URL for file managers like Nautilus that use it as a hint + // to create a link to the URL. Setting text/uri-list doesn't work because + // Nautilus will fetch and copy the contents of the URL to the drop target + // instead of linking... + // Format is UTF8: URL + "\n" + title. + std::string netscape_url = url.spec(); + netscape_url += "\n"; + netscape_url += base::UTF16ToUTF8(title); + format_map_.Insert(atom_cache_.GetAtom(kNetscapeURL), + scoped_refptr<base::RefCountedMemory>( + base::RefCountedString::TakeString(&netscape_url))); } } void OSExchangeDataProviderAuraX11::SetFilename(const base::FilePath& path) { - NOTIMPLEMENTED(); + std::vector<FileInfo> data; + data.push_back(FileInfo(path, base::FilePath())); + SetFilenames(data); } void OSExchangeDataProviderAuraX11::SetFilenames( - const std::vector<OSExchangeData::FileInfo>& filenames) { - NOTIMPLEMENTED(); + const std::vector<FileInfo>& filenames) { + std::vector<std::string> paths; + for (std::vector<FileInfo>::const_iterator it = filenames.begin(); + it != filenames.end(); + ++it) { + std::string url_spec = net::FilePathToFileURL(it->path).spec(); + if (!url_spec.empty()) + paths.push_back(url_spec); + } + + std::string joined_data = JoinString(paths, '\n'); + scoped_refptr<base::RefCountedMemory> mem( + base::RefCountedString::TakeString(&joined_data)); + format_map_.Insert(atom_cache_.GetAtom(Clipboard::kMimeTypeURIList), mem); } void OSExchangeDataProviderAuraX11::SetPickledData( @@ -162,6 +216,13 @@ void OSExchangeDataProviderAuraX11::SetPickledData( } bool OSExchangeDataProviderAuraX11::GetString(base::string16* result) const { + if (HasFile()) { + // Various Linux file managers both pass a list of file:// URIs and set the + // string representation to the URI. We explicitly don't want to return use + // this representation. + return false; + } + std::vector< ::Atom> text_atoms = ui::GetTextAtomsFrom(&atom_cache_); std::vector< ::Atom> requested_types; ui::GetAtomIntersection(text_atoms, GetTargets(), &requested_types); @@ -169,7 +230,7 @@ bool OSExchangeDataProviderAuraX11::GetString(base::string16* result) const { ui::SelectionData data(format_map_.GetFirstOf(requested_types)); if (data.IsValid()) { std::string text = data.GetText(); - *result = UTF8ToUTF16(text); + *result = base::UTF8ToUTF16(text); return true; } @@ -196,33 +257,29 @@ bool OSExchangeDataProviderAuraX11::GetURLAndTitle( data.AssignTo(&unparsed); std::vector<base::string16> tokens; - size_t num_tokens = Tokenize(unparsed, ASCIIToUTF16("\n"), &tokens); + size_t num_tokens = Tokenize(unparsed, base::ASCIIToUTF16("\n"), &tokens); if (num_tokens > 0) { if (num_tokens > 1) *title = tokens[1]; else - *title = string16(); + *title = base::string16(); *url = GURL(tokens[0]); return true; } } else if (data.GetType() == atom_cache_.GetAtom( Clipboard::kMimeTypeURIList)) { - // uri-lists are newline separated file lists in URL encoding. - std::string unparsed; - data.AssignTo(&unparsed); - - std::vector<std::string> tokens; - size_t num_tokens = Tokenize(unparsed, "\n", &tokens); - if (!num_tokens) { - NOTREACHED() << "Empty URI list"; - return false; + std::vector<std::string> tokens = ui::ParseURIList(data); + for (std::vector<std::string>::const_iterator it = tokens.begin(); + it != tokens.end(); ++it) { + GURL test_url(*it); + if (!test_url.SchemeIsFile() || + policy == OSExchangeData::CONVERT_FILENAMES) { + *url = test_url; + *title = base::string16(); + return true; + } } - - *url = GURL(tokens[0]); - *title = base::string16(); - - return true; } } @@ -230,14 +287,36 @@ bool OSExchangeDataProviderAuraX11::GetURLAndTitle( } bool OSExchangeDataProviderAuraX11::GetFilename(base::FilePath* path) const { - // On X11, files are passed by URL and aren't separate. + std::vector<FileInfo> filenames; + if (GetFilenames(&filenames)) { + *path = filenames.front().path; + return true; + } + return false; } bool OSExchangeDataProviderAuraX11::GetFilenames( - std::vector<OSExchangeData::FileInfo>* filenames) const { - // On X11, files are passed by URL and aren't separate. - return false; + std::vector<FileInfo>* filenames) const { + std::vector< ::Atom> url_atoms = ui::GetURIListAtomsFrom(&atom_cache_); + std::vector< ::Atom> requested_types; + ui::GetAtomIntersection(url_atoms, GetTargets(), &requested_types); + + filenames->clear(); + ui::SelectionData data(format_map_.GetFirstOf(requested_types)); + if (data.IsValid()) { + std::vector<std::string> tokens = ui::ParseURIList(data); + for (std::vector<std::string>::const_iterator it = tokens.begin(); + it != tokens.end(); ++it) { + GURL url(*it); + base::FilePath file_path; + if (url.SchemeIsFile() && net::FileURLToFilePath(url, &file_path)) { + filenames->push_back(FileInfo(file_path, base::FilePath())); + } + } + } + + return !filenames->empty(); } bool OSExchangeDataProviderAuraX11::GetPickledData( @@ -262,18 +341,65 @@ bool OSExchangeDataProviderAuraX11::HasString() const { std::vector< ::Atom> text_atoms = ui::GetTextAtomsFrom(&atom_cache_); std::vector< ::Atom> requested_types; ui::GetAtomIntersection(text_atoms, GetTargets(), &requested_types); - return !requested_types.empty(); + return !requested_types.empty() && !HasFile(); } -bool OSExchangeDataProviderAuraX11::HasURL() const { +bool OSExchangeDataProviderAuraX11::HasURL( + OSExchangeData::FilenameToURLPolicy policy) const { std::vector< ::Atom> url_atoms = ui::GetURLAtomsFrom(&atom_cache_); std::vector< ::Atom> requested_types; ui::GetAtomIntersection(url_atoms, GetTargets(), &requested_types); - return !requested_types.empty(); + + if (requested_types.empty()) + return false; + + // The Linux desktop doesn't differentiate between files and URLs like + // Windows does and stuffs all the data into one mime type. + ui::SelectionData data(format_map_.GetFirstOf(requested_types)); + if (data.IsValid()) { + if (data.GetType() == atom_cache_.GetAtom(kMimeTypeMozillaURL)) { + // File managers shouldn't be using this type, so this is a URL. + return true; + } else if (data.GetType() == atom_cache_.GetAtom( + ui::Clipboard::kMimeTypeURIList)) { + std::vector<std::string> tokens = ui::ParseURIList(data); + for (std::vector<std::string>::const_iterator it = tokens.begin(); + it != tokens.end(); ++it) { + if (!GURL(*it).SchemeIsFile() || + policy == OSExchangeData::CONVERT_FILENAMES) + return true; + } + + return false; + } + } + + return false; } bool OSExchangeDataProviderAuraX11::HasFile() const { - // On X11, files are passed by URL and aren't separate. + std::vector< ::Atom> url_atoms = ui::GetURIListAtomsFrom(&atom_cache_); + std::vector< ::Atom> requested_types; + ui::GetAtomIntersection(url_atoms, GetTargets(), &requested_types); + + if (requested_types.empty()) + return false; + + // To actually answer whether we have a file, we need to look through the + // contents of the kMimeTypeURIList type, and see if any of them are file:// + // URIs. + ui::SelectionData data(format_map_.GetFirstOf(requested_types)); + if (data.IsValid()) { + std::vector<std::string> tokens = ui::ParseURIList(data); + for (std::vector<std::string>::const_iterator it = tokens.begin(); + it != tokens.end(); ++it) { + GURL url(*it); + base::FilePath file_path; + if (url.SchemeIsFile() && net::FileURLToFilePath(url, &file_path)) + return true; + } + } + return false; } @@ -287,6 +413,42 @@ bool OSExchangeDataProviderAuraX11::HasCustomFormat( return !requested_types.empty(); } +void OSExchangeDataProviderAuraX11::SetFileContents( + const base::FilePath& filename, + const std::string& file_contents) { + DCHECK(!filename.empty()); + DCHECK(format_map_.end() == + format_map_.find(atom_cache_.GetAtom(kMimeTypeMozillaURL))); + + file_contents_name_ = filename; + + // Direct save handling is a complicated juggling affair between this class, + // SelectionFormat, and DesktopDragDropClientAuraX11. The general idea behind + // the protocol is this: + // - The source window sets its XdndDirectSave0 window property to the + // proposed filename. + // - When a target window receives the drop, it updates the XdndDirectSave0 + // property on the source window to the filename it would like the contents + // to be saved to and then requests the XdndDirectSave0 type from the + // source. + // - The source is supposed to copy the file here and return success (S), + // failure (F), or error (E). + // - In this case, failure means the destination should try to populate the + // file itself by copying the data from application/octet-stream. To make + // things simpler for Chrome, we always 'fail' and let the destination do + // the work. + std::string failure("F"); + format_map_.Insert( + atom_cache_.GetAtom("XdndDirectSave0"), + scoped_refptr<base::RefCountedMemory>( + base::RefCountedString::TakeString(&failure))); + std::string file_contents_copy = file_contents; + format_map_.Insert( + atom_cache_.GetAtom("application/octet-stream"), + scoped_refptr<base::RefCountedMemory>( + base::RefCountedString::TakeString(&file_contents_copy))); +} + void OSExchangeDataProviderAuraX11::SetHtml(const base::string16& html, const GURL& base_url) { std::vector<unsigned char> bytes; @@ -342,21 +504,26 @@ const gfx::Vector2d& OSExchangeDataProviderAuraX11::GetDragImageOffset() const { return drag_image_offset_; } -bool OSExchangeDataProviderAuraX11::Dispatch(const base::NativeEvent& event) { +bool OSExchangeDataProviderAuraX11::CanDispatchEvent( + const PlatformEvent& event) { + return event->xany.window == x_window_; +} + +uint32_t OSExchangeDataProviderAuraX11::DispatchEvent( + const PlatformEvent& event) { XEvent* xev = event; switch (xev->type) { case SelectionRequest: selection_owner_.OnSelectionRequest(xev->xselectionrequest); - break; + return ui::POST_DISPATCH_STOP_PROPAGATION; default: NOTIMPLEMENTED(); } - - return true; + return ui::POST_DISPATCH_NONE; } bool OSExchangeDataProviderAuraX11::GetPlainTextURL(GURL* url) const { - string16 text; + base::string16 text; if (GetString(&text)) { GURL test_url(text); if (test_url.is_valid()) { diff --git a/chromium/ui/base/dragdrop/os_exchange_data_provider_aurax11.h b/chromium/ui/base/dragdrop/os_exchange_data_provider_aurax11.h index 76cfad3a97c..702cc7e11e6 100644 --- a/chromium/ui/base/dragdrop/os_exchange_data_provider_aurax11.h +++ b/chromium/ui/base/dragdrop/os_exchange_data_provider_aurax11.h @@ -13,12 +13,12 @@ #include <map> #include "base/files/file_path.h" -#include "base/message_loop/message_pump_dispatcher.h" #include "base/pickle.h" #include "ui/base/dragdrop/os_exchange_data.h" #include "ui/base/x/selection_owner.h" #include "ui/base/x/selection_requestor.h" #include "ui/base/x/selection_utils.h" +#include "ui/events/platform/platform_event_dispatcher.h" #include "ui/gfx/image/image_skia.h" #include "ui/gfx/vector2d.h" #include "ui/gfx/x/x11_atom_cache.h" @@ -27,11 +27,12 @@ namespace ui { class Clipboard; +class OSExchangeDataProviderAuraX11Test; // OSExchangeData::Provider implementation for aura on linux. -class UI_EXPORT OSExchangeDataProviderAuraX11 +class UI_BASE_EXPORT OSExchangeDataProviderAuraX11 : public OSExchangeData::Provider, - public base::MessagePumpDispatcher { + public ui::PlatformEventDispatcher { public: // |x_window| is the window the cursor is over, and |selection| is the set of // data being offered. @@ -55,28 +56,38 @@ class UI_EXPORT OSExchangeDataProviderAuraX11 // Makes a copy of the format map currently being offered. SelectionFormatMap GetFormatMap() const; + const base::FilePath& file_contents_name() const { + return file_contents_name_; + } + // Overridden from OSExchangeData::Provider: virtual Provider* Clone() const OVERRIDE; + virtual void MarkOriginatedFromRenderer() OVERRIDE; + virtual bool DidOriginateFromRenderer() const OVERRIDE; virtual void SetString(const base::string16& data) OVERRIDE; virtual void SetURL(const GURL& url, const base::string16& title) OVERRIDE; virtual void SetFilename(const base::FilePath& path) OVERRIDE; - virtual void SetFilenames( - const std::vector<OSExchangeData::FileInfo>& filenames) OVERRIDE; + virtual void SetFilenames(const std::vector<FileInfo>& filenames) OVERRIDE; virtual void SetPickledData(const OSExchangeData::CustomFormat& format, const Pickle& pickle) OVERRIDE; virtual bool GetString(base::string16* data) const OVERRIDE; - virtual bool GetURLAndTitle(GURL* url, base::string16* title) const OVERRIDE; + virtual bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy, + GURL* url, + base::string16* title) const OVERRIDE; virtual bool GetFilename(base::FilePath* path) const OVERRIDE; - virtual bool GetFilenames( - std::vector<OSExchangeData::FileInfo>* filenames) const OVERRIDE; + virtual bool GetFilenames(std::vector<FileInfo>* filenames) const OVERRIDE; virtual bool GetPickledData(const OSExchangeData::CustomFormat& format, Pickle* pickle) const OVERRIDE; virtual bool HasString() const OVERRIDE; - virtual bool HasURL() const OVERRIDE; + virtual bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const + OVERRIDE; virtual bool HasFile() const OVERRIDE; virtual bool HasCustomFormat(const OSExchangeData::CustomFormat& format) const OVERRIDE; + virtual void SetFileContents(const base::FilePath& filename, + const std::string& file_contents) OVERRIDE; + virtual void SetHtml(const base::string16& html, const GURL& base_url) OVERRIDE; virtual bool GetHtml(base::string16* html, GURL* base_url) const OVERRIDE; @@ -86,10 +97,12 @@ class UI_EXPORT OSExchangeDataProviderAuraX11 virtual const gfx::ImageSkia& GetDragImage() const OVERRIDE; virtual const gfx::Vector2d& GetDragImageOffset() const OVERRIDE; - // Overridden from base::MessagePumpDispatcher: - virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; + // ui::PlatformEventDispatcher: + virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE; + virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE; private: + friend class OSExchangeDataProviderAuraX11Test; typedef std::map<OSExchangeData::CustomFormat, Pickle> PickleData; // Returns true if |formats_| contains a string format and the string can be @@ -124,6 +137,9 @@ class UI_EXPORT OSExchangeDataProviderAuraX11 // to |selection_owner_| when we take the selection. SelectionFormatMap format_map_; + // Auxilary data for the X Direct Save protocol. + base::FilePath file_contents_name_; + // Takes a snapshot of |format_map_| and offers it to other windows. mutable SelectionOwner selection_owner_; diff --git a/chromium/ui/base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc b/chromium/ui/base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc index 0f5a914d75b..457ba6b41f7 100644 --- a/chromium/ui/base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc +++ b/chromium/ui/base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc @@ -12,34 +12,117 @@ #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/dragdrop/file_info.h" +#include "ui/events/platform/x11/x11_event_source.h" #include "url/gurl.h" +const char kFileURL[] = "file:///home/user/file.txt"; +const char kFileName[] = "/home/user/file.txt"; const char kGoogleTitle[] = "Google"; const char kGoogleURL[] = "http://www.google.com/"; -TEST(OSExchangeDataProviderAuraX11Test, MozillaURL) { +namespace ui { + +class OSExchangeDataProviderAuraX11Test : public testing::Test { + public: + OSExchangeDataProviderAuraX11Test() : event_source(gfx::GetXDisplay()) {} + + void AddURLList(const std::string& list_contents) { + std::string contents_copy = list_contents; + scoped_refptr<base::RefCountedMemory> mem( + base::RefCountedString::TakeString(&contents_copy)); + + provider.format_map_.Insert( + provider.atom_cache_.GetAtom(ui::Clipboard::kMimeTypeURIList), + mem); + } + + protected: base::MessageLoopForUI message_loop; + X11EventSource event_source; ui::OSExchangeDataProviderAuraX11 provider; +}; +TEST_F(OSExchangeDataProviderAuraX11Test, MozillaURL) { // Check that we can get titled entries. - provider.SetURL(GURL(kGoogleURL), ASCIIToUTF16(kGoogleTitle)); + provider.SetURL(GURL(kGoogleURL), base::ASCIIToUTF16(kGoogleTitle)); { GURL out_gurl; base::string16 out_str; EXPECT_TRUE(provider.GetURLAndTitle( OSExchangeData::DO_NOT_CONVERT_FILENAMES, &out_gurl, &out_str)); - EXPECT_EQ(ASCIIToUTF16(kGoogleTitle), out_str); + EXPECT_EQ(base::ASCIIToUTF16(kGoogleTitle), out_str); EXPECT_EQ(kGoogleURL, out_gurl.spec()); } // Check that we can get non-titled entries. - provider.SetURL(GURL(kGoogleURL), string16()); + provider.SetURL(GURL(kGoogleURL), base::string16()); { GURL out_gurl; base::string16 out_str; EXPECT_TRUE(provider.GetURLAndTitle( OSExchangeData::DO_NOT_CONVERT_FILENAMES, &out_gurl, &out_str)); - EXPECT_EQ(string16(), out_str); + EXPECT_EQ(base::string16(), out_str); EXPECT_EQ(kGoogleURL, out_gurl.spec()); } } + +TEST_F(OSExchangeDataProviderAuraX11Test, FilesArentURLs) { + AddURLList(kFileURL); + + EXPECT_TRUE(provider.HasFile()); + EXPECT_TRUE(provider.HasURL(ui::OSExchangeData::CONVERT_FILENAMES)); + EXPECT_FALSE(provider.HasURL(ui::OSExchangeData::DO_NOT_CONVERT_FILENAMES)); +} + +TEST_F(OSExchangeDataProviderAuraX11Test, HTTPURLsArentFiles) { + AddURLList(kGoogleURL); + + EXPECT_FALSE(provider.HasFile()); + EXPECT_TRUE(provider.HasURL(ui::OSExchangeData::CONVERT_FILENAMES)); + EXPECT_TRUE(provider.HasURL(ui::OSExchangeData::DO_NOT_CONVERT_FILENAMES)); +} + +TEST_F(OSExchangeDataProviderAuraX11Test, URIListWithBoth) { + AddURLList("file:///home/user/file.txt\nhttp://www.google.com"); + + EXPECT_TRUE(provider.HasFile()); + EXPECT_TRUE(provider.HasURL(ui::OSExchangeData::CONVERT_FILENAMES)); + EXPECT_TRUE(provider.HasURL(ui::OSExchangeData::DO_NOT_CONVERT_FILENAMES)); + + // We should only receive the file from GetFilenames(). + std::vector<FileInfo> filenames; + EXPECT_TRUE(provider.GetFilenames(&filenames)); + ASSERT_EQ(1u, filenames.size()); + EXPECT_EQ(kFileName, filenames[0].path.value()); + + // We should only receive the URL here. + GURL out_gurl; + base::string16 out_str; + EXPECT_TRUE(provider.GetURLAndTitle( + OSExchangeData::DO_NOT_CONVERT_FILENAMES, &out_gurl, &out_str)); + EXPECT_EQ(base::string16(), out_str); + EXPECT_EQ(kGoogleURL, out_gurl.spec()); +} + +TEST_F(OSExchangeDataProviderAuraX11Test, OnlyStringURLIsUnfiltered) { + const base::string16 file_url = base::UTF8ToUTF16(kFileURL); + provider.SetString(file_url); + + EXPECT_TRUE(provider.HasString()); + EXPECT_FALSE(provider.HasURL(ui::OSExchangeData::DO_NOT_CONVERT_FILENAMES)); +} + +TEST_F(OSExchangeDataProviderAuraX11Test, StringAndURIListFilterString) { + const base::string16 file_url = base::UTF8ToUTF16(kFileURL); + provider.SetString(file_url); + AddURLList(kFileURL); + + EXPECT_FALSE(provider.HasString()); + base::string16 out_str; + EXPECT_FALSE(provider.GetString(&out_str)); + + EXPECT_TRUE(provider.HasFile()); +} + +} // namespace ui diff --git a/chromium/ui/base/dragdrop/os_exchange_data_provider_mac.h b/chromium/ui/base/dragdrop/os_exchange_data_provider_mac.h new file mode 100644 index 00000000000..513239f6656 --- /dev/null +++ b/chromium/ui/base/dragdrop/os_exchange_data_provider_mac.h @@ -0,0 +1,50 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_MAC_H_ +#define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_MAC_H_ + +#include "ui/base/dragdrop/os_exchange_data.h" + +namespace ui { + +// OSExchangeData::Provider implementation for Mac. +class UI_BASE_EXPORT OSExchangeDataProviderMac + : public OSExchangeData::Provider { + public: + OSExchangeDataProviderMac(); + virtual ~OSExchangeDataProviderMac(); + + // Overridden from OSExchangeData::Provider: + virtual Provider* Clone() const OVERRIDE; + virtual void MarkOriginatedFromRenderer() OVERRIDE; + virtual bool DidOriginateFromRenderer() const OVERRIDE; + virtual void SetString(const base::string16& data) OVERRIDE; + virtual void SetURL(const GURL& url, const base::string16& title) OVERRIDE; + virtual void SetFilename(const base::FilePath& path) OVERRIDE; + virtual void SetFilenames(const std::vector<FileInfo>& filenames) OVERRIDE; + virtual void SetPickledData(const OSExchangeData::CustomFormat& format, + const Pickle& data) OVERRIDE; + virtual bool GetString(base::string16* data) const OVERRIDE; + virtual bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy, + GURL* url, + base::string16* title) const OVERRIDE; + virtual bool GetFilename(base::FilePath* path) const OVERRIDE; + virtual bool GetFilenames(std::vector<FileInfo>* filenames) const OVERRIDE; + virtual bool GetPickledData(const OSExchangeData::CustomFormat& format, + Pickle* data) const OVERRIDE; + virtual bool HasString() const OVERRIDE; + virtual bool HasURL( + OSExchangeData::FilenameToURLPolicy policy) const OVERRIDE; + virtual bool HasFile() const OVERRIDE; + virtual bool HasCustomFormat( + const OSExchangeData::CustomFormat& format) const OVERRIDE; + + private: + DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderMac); +}; + +} // namespace ui + +#endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_MAC_H_ diff --git a/chromium/ui/base/dragdrop/os_exchange_data_provider_mac.mm b/chromium/ui/base/dragdrop/os_exchange_data_provider_mac.mm new file mode 100644 index 00000000000..e8e60c3942c --- /dev/null +++ b/chromium/ui/base/dragdrop/os_exchange_data_provider_mac.mm @@ -0,0 +1,116 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/dragdrop/os_exchange_data_provider_mac.h" + +#include "base/logging.h" + +namespace ui { + +OSExchangeDataProviderMac::OSExchangeDataProviderMac() { +} + +OSExchangeDataProviderMac::~OSExchangeDataProviderMac() { +} + +OSExchangeData::Provider* OSExchangeDataProviderMac::Clone() const { + NOTIMPLEMENTED(); + return new OSExchangeDataProviderMac(); +} + +void OSExchangeDataProviderMac::MarkOriginatedFromRenderer() { + NOTIMPLEMENTED(); +} + +bool OSExchangeDataProviderMac::DidOriginateFromRenderer() const { + NOTIMPLEMENTED(); + return false; +} + +void OSExchangeDataProviderMac::SetString(const base::string16& string) { + NOTIMPLEMENTED(); +} + +void OSExchangeDataProviderMac::SetURL(const GURL& url, + const base::string16& title) { + NOTIMPLEMENTED(); +} + +void OSExchangeDataProviderMac::SetFilename(const base::FilePath& path) { + NOTIMPLEMENTED(); +} + +void OSExchangeDataProviderMac::SetFilenames( + const std::vector<FileInfo>& filenames) { + NOTIMPLEMENTED(); +} + +void OSExchangeDataProviderMac::SetPickledData( + const OSExchangeData::CustomFormat& format, + const Pickle& data) { + NOTIMPLEMENTED(); +} + +bool OSExchangeDataProviderMac::GetString(base::string16* data) const { + NOTIMPLEMENTED(); + return false; +} + +bool OSExchangeDataProviderMac::GetURLAndTitle( + OSExchangeData::FilenameToURLPolicy policy, + GURL* url, + base::string16* title) const { + NOTIMPLEMENTED(); + return false; +} + +bool OSExchangeDataProviderMac::GetFilename(base::FilePath* path) const { + NOTIMPLEMENTED(); + return false; +} + +bool OSExchangeDataProviderMac::GetFilenames( + std::vector<FileInfo>* filenames) const { + NOTIMPLEMENTED(); + return false; +} + +bool OSExchangeDataProviderMac::GetPickledData( + const OSExchangeData::CustomFormat& format, + Pickle* data) const { + NOTIMPLEMENTED(); + return false; +} + +bool OSExchangeDataProviderMac::HasString() const { + NOTIMPLEMENTED(); + return false; +} + +bool OSExchangeDataProviderMac::HasURL( + OSExchangeData::FilenameToURLPolicy policy) const { + NOTIMPLEMENTED(); + return false; +} + +bool OSExchangeDataProviderMac::HasFile() const { + NOTIMPLEMENTED(); + return false; +} + +bool OSExchangeDataProviderMac::HasCustomFormat( + const OSExchangeData::CustomFormat& format) const { + NOTIMPLEMENTED(); + return false; +} + +/////////////////////////////////////////////////////////////////////////////// +// OSExchangeData, public: + +// static +OSExchangeData::Provider* OSExchangeData::CreateProvider() { + return new OSExchangeDataProviderMac; +} + +} // namespace ui diff --git a/chromium/ui/base/dragdrop/os_exchange_data_provider_win.cc b/chromium/ui/base/dragdrop/os_exchange_data_provider_win.cc index 2bc3e19df81..4cbfa4a8512 100644 --- a/chromium/ui/base/dragdrop/os_exchange_data_provider_win.cc +++ b/chromium/ui/base/dragdrop/os_exchange_data_provider_win.cc @@ -10,19 +10,27 @@ #include "base/files/file_path.h" #include "base/i18n/file_util_icu.h" #include "base/logging.h" -#include "base/memory/scoped_handle.h" #include "base/pickle.h" #include "base/strings/utf_string_conversions.h" #include "base/win/scoped_hglobal.h" #include "grit/ui_strings.h" -#include "net/base/net_util.h" +#include "net/base/filename_util.h" #include "ui/base/clipboard/clipboard.h" #include "ui/base/clipboard/clipboard_util_win.h" +#include "ui/base/dragdrop/file_info.h" #include "ui/base/l10n/l10n_util.h" #include "url/gurl.h" namespace ui { +static const OSExchangeData::CustomFormat& GetRendererTaintCustomType() { + CR_DEFINE_STATIC_LOCAL( + ui::OSExchangeData::CustomFormat, + format, + (ui::Clipboard::GetFormatType("chromium/x-renderer-taint"))); + return format; +} + // Creates a new STGMEDIUM object to hold the specified text. The caller // owns the resulting object. The "Bytes" version does not NULL terminate, the // string version does. @@ -55,7 +63,7 @@ static STGMEDIUM* GetStorageForFileDescriptor(const base::FilePath& path); // some sort of sequential data (why not just use an array?). See comments // throughout. // -class FormatEtcEnumerator : public IEnumFORMATETC { +class FormatEtcEnumerator FINAL : public IEnumFORMATETC { public: FormatEtcEnumerator(DataObjectImpl::StoredData::const_iterator begin, DataObjectImpl::StoredData::const_iterator end); @@ -269,13 +277,23 @@ OSExchangeData::Provider* OSExchangeDataProviderWin::Clone() const { return new OSExchangeDataProviderWin(data_object()); } +void OSExchangeDataProviderWin::MarkOriginatedFromRenderer() { + STGMEDIUM* storage = GetStorageForString(std::string()); + data_->contents_.push_back(new DataObjectImpl::StoredDataInfo( + GetRendererTaintCustomType().ToFormatEtc(), storage)); +} + +bool OSExchangeDataProviderWin::DidOriginateFromRenderer() const { + return HasCustomFormat(GetRendererTaintCustomType()); +} + void OSExchangeDataProviderWin::SetString(const base::string16& data) { STGMEDIUM* storage = GetStorageForString(data); data_->contents_.push_back(new DataObjectImpl::StoredDataInfo( Clipboard::GetPlainTextWFormatType().ToFormatEtc(), storage)); // Also add the UTF8-encoded version. - storage = GetStorageForString(UTF16ToUTF8(data)); + storage = GetStorageForString(base::UTF16ToUTF8(data)); data_->contents_.push_back(new DataObjectImpl::StoredDataInfo( Clipboard::GetPlainTextFormatType().ToFormatEtc(), storage)); } @@ -289,7 +307,7 @@ void OSExchangeDataProviderWin::SetURL(const GURL& url, // will fail! It assumes an insertion order. // Add text/x-moz-url for drags from Firefox - base::string16 x_moz_url_str = UTF8ToUTF16(url.spec()); + base::string16 x_moz_url_str = base::UTF8ToUTF16(url.spec()); x_moz_url_str += '\n'; x_moz_url_str += title; STGMEDIUM* storage = GetStorageForString(x_moz_url_str); @@ -304,7 +322,7 @@ void OSExchangeDataProviderWin::SetURL(const GURL& url, SetFileContents(base::FilePath(valid_file_name), shortcut_url_file_contents); // Add a UniformResourceLocator link for apps like IE and Word. - storage = GetStorageForString(UTF8ToUTF16(url.spec())); + storage = GetStorageForString(base::UTF8ToUTF16(url.spec())); data_->contents_.push_back(new DataObjectImpl::StoredDataInfo( Clipboard::GetUrlWFormatType().ToFormatEtc(), storage)); storage = GetStorageForString(url.spec()); @@ -316,7 +334,7 @@ void OSExchangeDataProviderWin::SetURL(const GURL& url, // Also add text representations (these should be last since they're the // least preferable). - SetString(UTF8ToUTF16(url.spec())); + SetString(base::UTF8ToUTF16(url.spec())); } void OSExchangeDataProviderWin::SetFilename(const base::FilePath& path) { @@ -334,7 +352,7 @@ void OSExchangeDataProviderWin::SetFilename(const base::FilePath& path) { } void OSExchangeDataProviderWin::SetFilenames( - const std::vector<OSExchangeData::FileInfo>& filenames) { + const std::vector<FileInfo>& filenames) { for (size_t i = 0; i < filenames.size(); ++i) { STGMEDIUM* storage = GetStorageForFileName(filenames[i].path); DataObjectImpl::StoredDataInfo* info = new DataObjectImpl::StoredDataInfo( @@ -368,7 +386,7 @@ void OSExchangeDataProviderWin::SetFileContents( void OSExchangeDataProviderWin::SetHtml(const base::string16& html, const GURL& base_url) { // Add both MS CF_HTML and text/html format. CF_HTML should be in utf-8. - std::string utf8_html = UTF16ToUTF8(html); + std::string utf8_html = base::UTF16ToUTF8(html); std::string url = base_url.is_valid() ? base_url.spec() : std::string(); std::string cf_html = ClipboardUtil::HtmlToCFHtml(utf8_html, url); @@ -421,14 +439,13 @@ bool OSExchangeDataProviderWin::GetFilename(base::FilePath* path) const { } bool OSExchangeDataProviderWin::GetFilenames( - std::vector<OSExchangeData::FileInfo>* filenames) const { + std::vector<FileInfo>* filenames) const { std::vector<base::string16> filenames_local; bool success = ClipboardUtil::GetFilenames(source_object_, &filenames_local); if (success) { for (size_t i = 0; i < filenames_local.size(); ++i) filenames->push_back( - OSExchangeData::FileInfo(base::FilePath(filenames_local[i]), - base::FilePath())); + FileInfo(base::FilePath(filenames_local[i]), base::FilePath())); } return success; } @@ -477,8 +494,11 @@ bool OSExchangeDataProviderWin::HasString() const { return ClipboardUtil::HasPlainText(source_object_); } -bool OSExchangeDataProviderWin::HasURL() const { - return (ClipboardUtil::HasUrl(source_object_) || +bool OSExchangeDataProviderWin::HasURL( + OSExchangeData::FilenameToURLPolicy policy) const { + return (ClipboardUtil::HasUrl( + source_object_, + policy == OSExchangeData::CONVERT_FILENAMES ? true : false) || HasPlainTextURL(source_object_)); } @@ -517,12 +537,6 @@ void OSExchangeDataProviderWin::SetDownloadFileInfo( data_->contents_.push_back(info); } -void OSExchangeDataProviderWin::SetInDragLoop(bool in_drag_loop) { - data_->set_in_drag_loop(in_drag_loop); -} - -#if defined(USE_AURA) - void OSExchangeDataProviderWin::SetDragImage( const gfx::ImageSkia& image, const gfx::Vector2d& cursor_offset) { @@ -538,8 +552,6 @@ const gfx::Vector2d& OSExchangeDataProviderWin::GetDragImageOffset() const { return drag_image_offset_; } -#endif - /////////////////////////////////////////////////////////////////////////////// // DataObjectImpl, IDataObject implementation: @@ -881,7 +893,7 @@ template <typename T> static STGMEDIUM* GetStorageForString(const std::basic_string<T>& data) { return GetStorageForBytes( data.c_str(), - (data.size() + 1) * sizeof(std::basic_string<T>::value_type)); + (data.size() + 1) * sizeof(typename std::basic_string<T>::value_type)); } static void GetInternetShortcutFileContents(const GURL& url, diff --git a/chromium/ui/base/dragdrop/os_exchange_data_provider_win.h b/chromium/ui/base/dragdrop/os_exchange_data_provider_win.h index 74c6d2339e1..a89deb27a9d 100644 --- a/chromium/ui/base/dragdrop/os_exchange_data_provider_win.h +++ b/chromium/ui/base/dragdrop/os_exchange_data_provider_win.h @@ -21,7 +21,7 @@ #include "base/memory/scoped_vector.h" #include "base/win/scoped_comptr.h" #include "ui/base/dragdrop/os_exchange_data.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/image/image_skia.h" #include "ui/gfx/vector2d.h" @@ -124,7 +124,8 @@ class DataObjectImpl : public DownloadFileObserver, Observer* observer_; }; -class UI_EXPORT OSExchangeDataProviderWin : public OSExchangeData::Provider { +class UI_BASE_EXPORT OSExchangeDataProviderWin + : public OSExchangeData::Provider { public: // Returns true if source has plain text that is a valid url. static bool HasPlainTextURL(IDataObject* source); @@ -148,11 +149,12 @@ class UI_EXPORT OSExchangeDataProviderWin : public OSExchangeData::Provider { // OSExchangeData::Provider methods. virtual Provider* Clone() const; + virtual void MarkOriginatedFromRenderer(); + virtual bool DidOriginateFromRenderer() const; virtual void SetString(const base::string16& data); virtual void SetURL(const GURL& url, const base::string16& title); virtual void SetFilename(const base::FilePath& path); - virtual void SetFilenames( - const std::vector<OSExchangeData::FileInfo>& filenames); + virtual void SetFilenames(const std::vector<FileInfo>& filenames); virtual void SetPickledData(const OSExchangeData::CustomFormat& format, const Pickle& data); virtual void SetFileContents(const base::FilePath& filename, @@ -164,15 +166,14 @@ class UI_EXPORT OSExchangeDataProviderWin : public OSExchangeData::Provider { GURL* url, base::string16* title) const; virtual bool GetFilename(base::FilePath* path) const; - virtual bool GetFilenames( - std::vector<OSExchangeData::FileInfo>* filenames) const; + virtual bool GetFilenames(std::vector<FileInfo>* filenames) const; virtual bool GetPickledData(const OSExchangeData::CustomFormat& format, Pickle* data) const; virtual bool GetFileContents(base::FilePath* filename, std::string* file_contents) const; virtual bool GetHtml(base::string16* html, GURL* base_url) const; virtual bool HasString() const; - virtual bool HasURL() const; + virtual bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const; virtual bool HasFile() const; virtual bool HasFileContents() const; virtual bool HasHtml() const; @@ -180,23 +181,18 @@ class UI_EXPORT OSExchangeDataProviderWin : public OSExchangeData::Provider { const OSExchangeData::CustomFormat& format) const; virtual void SetDownloadFileInfo( const OSExchangeData::DownloadFileInfo& download_info); - virtual void SetInDragLoop(bool in_drag_loop) OVERRIDE; -#if defined(USE_AURA) virtual void SetDragImage(const gfx::ImageSkia& image, const gfx::Vector2d& cursor_offset) OVERRIDE; virtual const gfx::ImageSkia& GetDragImage() const OVERRIDE; virtual const gfx::Vector2d& GetDragImageOffset() const OVERRIDE; -#endif private: scoped_refptr<DataObjectImpl> data_; base::win::ScopedComPtr<IDataObject> source_object_; -#if defined(USE_AURA) // Drag image and offset data. Only used for Ash. gfx::ImageSkia drag_image_; gfx::Vector2d drag_image_offset_; -#endif DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin); }; diff --git a/chromium/ui/base/dragdrop/os_exchange_data_unittest.cc b/chromium/ui/base/dragdrop/os_exchange_data_unittest.cc index 32f89bb9b1e..41dd43a6923 100644 --- a/chromium/ui/base/dragdrop/os_exchange_data_unittest.cc +++ b/chromium/ui/base/dragdrop/os_exchange_data_unittest.cc @@ -8,27 +8,33 @@ #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" #include "ui/base/dragdrop/os_exchange_data.h" +#include "ui/events/platform/platform_event_source.h" #include "url/gurl.h" namespace ui { class OSExchangeDataTest : public PlatformTest { + public: + OSExchangeDataTest() + : event_source_(ui::PlatformEventSource::CreateDefault()) {} + private: base::MessageLoopForUI message_loop_; + scoped_ptr<PlatformEventSource> event_source_; }; TEST_F(OSExchangeDataTest, StringDataGetAndSet) { OSExchangeData data; - string16 input = ASCIIToUTF16("I can has cheezburger?"); + base::string16 input = base::ASCIIToUTF16("I can has cheezburger?"); data.SetString(input); OSExchangeData data2(data.provider().Clone()); - string16 output; + base::string16 output; EXPECT_TRUE(data2.GetString(&output)); EXPECT_EQ(input, output); std::string url_spec = "http://www.goats.com/"; GURL url(url_spec); - string16 title; + base::string16 title; EXPECT_FALSE( data2.GetURLAndTitle(OSExchangeData::CONVERT_FILENAMES, &url, &title)); // No URLs in |data|, so url should be untouched. @@ -39,24 +45,24 @@ TEST_F(OSExchangeDataTest, TestURLExchangeFormats) { OSExchangeData data; std::string url_spec = "http://www.google.com/"; GURL url(url_spec); - string16 url_title = ASCIIToUTF16("www.google.com"); + base::string16 url_title = base::ASCIIToUTF16("www.google.com"); data.SetURL(url, url_title); - string16 output; + base::string16 output; OSExchangeData data2(data.provider().Clone()); // URL spec and title should match GURL output_url; - string16 output_title; + base::string16 output_title; EXPECT_TRUE(data2.GetURLAndTitle( OSExchangeData::CONVERT_FILENAMES, &output_url, &output_title)); EXPECT_EQ(url_spec, output_url.spec()); EXPECT_EQ(url_title, output_title); - string16 output_string; + base::string16 output_string; // URL should be the raw text response EXPECT_TRUE(data2.GetString(&output_string)); - EXPECT_EQ(url_spec, UTF16ToUTF8(output_string)); + EXPECT_EQ(url_spec, base::UTF16ToUTF8(output_string)); } TEST_F(OSExchangeDataTest, TestPickledData) { @@ -82,19 +88,21 @@ TEST_F(OSExchangeDataTest, TestPickledData) { EXPECT_EQ(2, value); } +#if defined(USE_AURA) TEST_F(OSExchangeDataTest, TestHTML) { OSExchangeData data; GURL url("http://www.google.com/"); - string16 html = ASCIIToUTF16( + base::string16 html = base::ASCIIToUTF16( "<HTML>\n<BODY>\n" "<b>bold.</b> <i><b>This is bold italic.</b></i>\n" "</BODY>\n</HTML>"); data.SetHtml(html, url); OSExchangeData copy(data.provider().Clone()); - string16 read_html; + base::string16 read_html; EXPECT_TRUE(copy.GetHtml(&read_html, &url)); EXPECT_EQ(html, read_html); } +#endif } // namespace ui diff --git a/chromium/ui/base/dragdrop/os_exchange_data_win_unittest.cc b/chromium/ui/base/dragdrop/os_exchange_data_win_unittest.cc index 420254337bf..7c5876fe84a 100644 --- a/chromium/ui/base/dragdrop/os_exchange_data_win_unittest.cc +++ b/chromium/ui/base/dragdrop/os_exchange_data_win_unittest.cc @@ -3,7 +3,6 @@ // found in the LICENSE file. #include "base/memory/ref_counted.h" -#include "base/memory/scoped_handle.h" #include "base/memory/scoped_ptr.h" #include "base/strings/utf_string_conversions.h" #include "base/win/scoped_hglobal.h" @@ -62,10 +61,11 @@ TEST(OSExchangeDataWinTest, StringDataWritingViaCOM) { // Construct a new object with the old object so that we can use our access // APIs. OSExchangeData data2(data.provider().Clone()); - EXPECT_TRUE(data2.HasURL()); + EXPECT_TRUE(data2.HasURL(OSExchangeData::CONVERT_FILENAMES)); GURL url_from_data; std::wstring title; - EXPECT_TRUE(data2.GetURLAndTitle(&url_from_data, &title)); + EXPECT_TRUE(data2.GetURLAndTitle( + OSExchangeData::CONVERT_FILENAMES, &url_from_data, &title)); GURL reference_url(input); EXPECT_EQ(reference_url.spec(), url_from_data.spec()); } @@ -113,10 +113,11 @@ TEST(OSExchangeDataWinTest, RemoveData) { // Construct a new object with the old object so that we can use our access // APIs. OSExchangeData data2(data.provider().Clone()); - EXPECT_TRUE(data2.HasURL()); + EXPECT_TRUE(data2.HasURL(OSExchangeData::CONVERT_FILENAMES)); GURL url_from_data; std::wstring title; - EXPECT_TRUE(data2.GetURLAndTitle(&url_from_data, &title)); + EXPECT_TRUE(data2.GetURLAndTitle( + OSExchangeData::CONVERT_FILENAMES, &url_from_data, &title)); EXPECT_EQ(GURL(input2).spec(), url_from_data.spec()); } @@ -136,7 +137,7 @@ TEST(OSExchangeDataWinTest, URLDataAccessViaCOM) { EXPECT_EQ(S_OK, com_data->GetData(&format_etc, &medium)); std::wstring output = base::win::ScopedHGlobal<wchar_t>(medium.hGlobal).get(); - EXPECT_EQ(url.spec(), WideToUTF8(output)); + EXPECT_EQ(url.spec(), base::WideToUTF8(output)); ReleaseStgMedium(&medium); } @@ -163,7 +164,7 @@ TEST(OSExchangeDataWinTest, MultipleFormatsViaCOM) { EXPECT_EQ(S_OK, com_data->GetData(&url_format_etc, &medium)); std::wstring output_url = base::win::ScopedHGlobal<wchar_t>(medium.hGlobal).get(); - EXPECT_EQ(url.spec(), WideToUTF8(output_url)); + EXPECT_EQ(url.spec(), base::WideToUTF8(output_url)); ReleaseStgMedium(&medium); // The text is supposed to be the raw text of the URL, _NOT_ the value of @@ -171,7 +172,7 @@ TEST(OSExchangeDataWinTest, MultipleFormatsViaCOM) { EXPECT_EQ(S_OK, com_data->GetData(&text_format_etc, &medium)); std::wstring output_text = base::win::ScopedHGlobal<wchar_t>(medium.hGlobal).get(); - EXPECT_EQ(url_spec, WideToUTF8(output_text)); + EXPECT_EQ(url_spec, base::WideToUTF8(output_text)); ReleaseStgMedium(&medium); } @@ -321,7 +322,7 @@ TEST(OSExchangeDataWinTest, CFHtml) { "StartFragment:0000000175\r\nEndFragment:0000000252\r\n" "SourceURL:http://www.google.com/\r\n<html>\r\n<body>\r\n" "<!--StartFragment-->"); - expected_cf_html += WideToUTF8(html); + expected_cf_html += base::WideToUTF8(html); expected_cf_html.append("<!--EndFragment-->\r\n</body>\r\n</html>"); FORMATETC format = Clipboard::GetHtmlFormatType().ToFormatEtc(); @@ -345,10 +346,11 @@ TEST(OSExchangeDataWinTest, ProvideURLForPlainTextURL) { data.SetString(L"http://google.com"); OSExchangeData data2(data.provider().Clone()); - ASSERT_TRUE(data2.HasURL()); + ASSERT_TRUE(data2.HasURL(OSExchangeData::CONVERT_FILENAMES)); GURL read_url; std::wstring title; - EXPECT_TRUE(data2.GetURLAndTitle(&read_url, &title)); + EXPECT_TRUE(data2.GetURLAndTitle( + OSExchangeData::CONVERT_FILENAMES, &read_url, &title)); EXPECT_EQ(GURL("http://google.com"), read_url); } diff --git a/chromium/ui/base/gtk/OWNERS b/chromium/ui/base/gtk/OWNERS deleted file mode 100644 index 0573e6b64cb..00000000000 --- a/chromium/ui/base/gtk/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -erg@chromium.org -estade@chromium.org diff --git a/chromium/ui/base/gtk/event_synthesis_gtk.cc b/chromium/ui/base/gtk/event_synthesis_gtk.cc deleted file mode 100644 index ea56162dd22..00000000000 --- a/chromium/ui/base/gtk/event_synthesis_gtk.cc +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/gtk/event_synthesis_gtk.h" - -#include "ui/events/keycodes/keyboard_code_conversion_gtk.h" - -namespace ui { - -GdkEvent* SynthesizeKeyEvent(GdkWindow* window, - bool press, guint gdk_key, guint state) { - GdkEvent* event = gdk_event_new(press ? GDK_KEY_PRESS : GDK_KEY_RELEASE); - - event->key.type = press ? GDK_KEY_PRESS : GDK_KEY_RELEASE; - event->key.window = window; - if (window) - g_object_ref(window); - event->key.send_event = false; - - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - event->key.time = ts.tv_sec * 1000 + ts.tv_nsec / 1000000; - - event->key.state = state; - event->key.keyval = gdk_key; - - GdkKeymapKey* keys; - gint n_keys; - if (event->key.keyval != 0 && - gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), - event->key.keyval, &keys, &n_keys)) { - event->key.hardware_keycode = keys[0].keycode; - event->key.group = keys[0].group; - g_free(keys); - } - - return event; -} - -void SynthesizeKeyPressEvents(GdkWindow* window, - KeyboardCode key, - bool control, bool shift, bool alt, - std::vector<GdkEvent*>* events) { - if (control) - events->push_back( - SynthesizeKeyEvent(window, true, GDK_Control_L, 0)); - - if (shift) { - events->push_back(SynthesizeKeyEvent(window, true, GDK_Shift_L, - control ? GDK_CONTROL_MASK : 0)); - } - - if (alt) { - guint state = (control ? GDK_CONTROL_MASK : 0) | - (shift ? GDK_SHIFT_MASK : 0); - events->push_back( - SynthesizeKeyEvent(window, true, GDK_Alt_L, state)); - } - - // TODO(estade): handle other state flags besides control, shift, alt? - // For example caps lock. - guint state = (control ? GDK_CONTROL_MASK : 0) | - (shift ? GDK_SHIFT_MASK : 0) | - (alt ? GDK_MOD1_MASK : 0); - - guint gdk_key = GdkKeyCodeForWindowsKeyCode(key, shift); - events->push_back(SynthesizeKeyEvent(window, true, gdk_key, state)); - events->push_back(SynthesizeKeyEvent(window, false, gdk_key, state)); - - if (alt) { - guint state = (control ? GDK_CONTROL_MASK : 0) | - (shift ? GDK_SHIFT_MASK : 0) | GDK_MOD1_MASK; - events->push_back( - SynthesizeKeyEvent(window, false, GDK_Alt_L, state)); - } - - if (shift) { - events->push_back( - SynthesizeKeyEvent(window, false, GDK_Shift_L, - (control ? GDK_CONTROL_MASK : 0) | GDK_SHIFT_MASK)); - } - - if (control) { - events->push_back( - SynthesizeKeyEvent(window, false, GDK_Control_L, GDK_CONTROL_MASK)); - } -} - -} // namespace ui diff --git a/chromium/ui/base/gtk/event_synthesis_gtk.h b/chromium/ui/base/gtk/event_synthesis_gtk.h deleted file mode 100644 index 1839e29949a..00000000000 --- a/chromium/ui/base/gtk/event_synthesis_gtk.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -// This file declares routines for creating fake GDK events (at the moment, -// only keyboard events). This is useful for a variety of testing purposes. -// NOTE: This should not be used outside of testing. - -#ifndef UI_BASE_GTK_EVENT_SYNTHESIS_GTK_ -#define UI_BASE_GTK_EVENT_SYNTHESIS_GTK_ - -#include <gdk/gdk.h> -#include <gdk/gdkkeysyms.h> -#include <vector> - -#include "ui/base/ui_export.h" -#include "ui/events/keycodes/keyboard_codes.h" - -namespace ui { - -// Creates and returns a key event. Passes ownership to the caller. -UI_EXPORT GdkEvent* SynthesizeKeyEvent(GdkWindow* event_window, - bool press, - guint gdk_key, - guint state); - -// Creates the proper sequence of key events for a key press + release. -// Ownership of the events in the vector is passed to the caller. -UI_EXPORT void SynthesizeKeyPressEvents( - GdkWindow* window, - KeyboardCode key, - bool control, bool shift, bool alt, - std::vector<GdkEvent*>* events); - -} // namespace ui - -#endif // UI_BASE_GTK_EVENT_SYNTHESIS_GTK_ diff --git a/chromium/ui/base/gtk/focus_store_gtk.cc b/chromium/ui/base/gtk/focus_store_gtk.cc deleted file mode 100644 index 3af039d0175..00000000000 --- a/chromium/ui/base/gtk/focus_store_gtk.cc +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/gtk/focus_store_gtk.h" - -#include <gtk/gtk.h> - -namespace ui { - -FocusStoreGtk::FocusStoreGtk() - : widget_(NULL), - destroy_handler_id_(0) { -} - -FocusStoreGtk::~FocusStoreGtk() { - DisconnectDestroyHandler(); -} - -void FocusStoreGtk::Store(GtkWidget* widget) { - GtkWidget* focus_widget = NULL; - if (widget) { - // A detached widget won't have a toplevel window as an ancestor, so we - // can't assume that the query for toplevel will return a window. - GtkWidget* toplevel = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW); - GtkWindow* window = GTK_IS_WINDOW(toplevel) ? GTK_WINDOW(toplevel) : NULL; - if (window) - focus_widget = gtk_window_get_focus(window); - } - - SetWidget(focus_widget); -} - -void FocusStoreGtk::SetWidget(GtkWidget* widget) { - DisconnectDestroyHandler(); - - // We don't add a ref. The signal handler below effectively gives us a weak - // reference. - widget_ = widget; - if (widget_) { - // When invoked, |gtk_widget_destroyed| will set |widget_| to NULL. - destroy_handler_id_ = g_signal_connect(widget_, "destroy", - G_CALLBACK(gtk_widget_destroyed), - &widget_); - } -} - -void FocusStoreGtk::DisconnectDestroyHandler() { - if (widget_) { - g_signal_handler_disconnect(widget_, destroy_handler_id_); - widget_ = NULL; - } -} - -} // namespace ui diff --git a/chromium/ui/base/gtk/focus_store_gtk.h b/chromium/ui/base/gtk/focus_store_gtk.h deleted file mode 100644 index b0f420deea4..00000000000 --- a/chromium/ui/base/gtk/focus_store_gtk.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_GTK_FOCUS_STORE_GTK_H_ -#define UI_BASE_GTK_FOCUS_STORE_GTK_H_ - -#include "base/basictypes.h" -#include "ui/base/ui_export.h" - -typedef struct _GtkWidget GtkWidget; - -namespace ui { - -class UI_EXPORT FocusStoreGtk { - public: - FocusStoreGtk(); - ~FocusStoreGtk(); - - GtkWidget* widget() const { return widget_; } - - // Save the widget that is currently focused for |widget|'s toplevel (NOT - // |widget|). - void Store(GtkWidget* widget); - - // Save |widget| as the focus widget. Call with NULL to clear |widget_|. - void SetWidget(GtkWidget* widget); - - private: - // Disconnect the previous destroy handler (if any). - void DisconnectDestroyHandler(); - - // The widget which last had focus. - GtkWidget* widget_; - - // The widget for which we've stored focus might be destroyed by the time we - // want to restore focus. Thus we connect to the "destroy" signal on that - // widget. This is the ID for the destroy handler. - unsigned int destroy_handler_id_; - - DISALLOW_COPY_AND_ASSIGN(FocusStoreGtk); -}; - -} // namespace ui - -#endif // UI_BASE_GTK_FOCUS_STORE_GTK_H_ diff --git a/chromium/ui/base/gtk/g_object_destructor_filo.cc b/chromium/ui/base/gtk/g_object_destructor_filo.cc deleted file mode 100644 index fe253c799b0..00000000000 --- a/chromium/ui/base/gtk/g_object_destructor_filo.cc +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/gtk/g_object_destructor_filo.h" - -#include <glib-object.h> - -#include "base/logging.h" -#include "base/memory/singleton.h" - -namespace ui { - -GObjectDestructorFILO::GObjectDestructorFILO() { -} - -GObjectDestructorFILO::~GObjectDestructorFILO() { - // Probably CHECK(handler_map_.empty()) would look natural here. But - // some tests (some views_unittests) violate this assertion. -} - -// static -GObjectDestructorFILO* GObjectDestructorFILO::GetInstance() { - return Singleton<GObjectDestructorFILO>::get(); -} - -void GObjectDestructorFILO::Connect( - GObject* object, DestructorHook callback, void* context) { - const Hook hook(object, callback, context); - HandlerMap::iterator iter = handler_map_.find(object); - if (iter == handler_map_.end()) { - g_object_weak_ref(object, WeakNotifyThunk, this); - handler_map_[object].push_front(hook); - } else { - iter->second.push_front(hook); - } -} - -void GObjectDestructorFILO::Disconnect( - GObject* object, DestructorHook callback, void* context) { - HandlerMap::iterator iter = handler_map_.find(object); - if (iter == handler_map_.end()) { - LOG(DFATAL) << "Unable to disconnect destructor hook for object " << object - << ": hook not found (" << callback << ", " << context << ")."; - return; - } - HandlerList& dtors = iter->second; - if (dtors.empty()) { - LOG(DFATAL) << "Destructor list is empty for specified object " << object - << " Maybe it is being executed?"; - return; - } - if (!dtors.front().equal(object, callback, context)) { - // Reenable this warning once this bug is fixed: - // http://code.google.com/p/chromium/issues/detail?id=85603 - DVLOG(1) << "Destructors should be unregistered the reverse order they " - << "were registered. But for object " << object << " " - << "deleted hook is "<< context << ", the last queued hook is " - << dtors.front().context; - } - for (HandlerList::iterator i = dtors.begin(); i != dtors.end(); ++i) { - if (i->equal(object, callback, context)) { - dtors.erase(i); - break; - } - } - if (dtors.empty()) { - g_object_weak_unref(object, WeakNotifyThunk, this); - handler_map_.erase(iter); - } -} - -void GObjectDestructorFILO::WeakNotify(GObject* where_the_object_was) { - HandlerMap::iterator iter = handler_map_.find(where_the_object_was); - DCHECK(iter != handler_map_.end()); - DCHECK(!iter->second.empty()); - - // Save destructor list for given object into local copy to avoid reentrancy - // problem: if callee wants to modify the caller list. - HandlerList dtors; - iter->second.swap(dtors); - handler_map_.erase(iter); - - // Execute hooks in local list in FILO order. - for (HandlerList::iterator i = dtors.begin(); i != dtors.end(); ++i) - i->callback(i->context, where_the_object_was); -} - -} // napespace ui diff --git a/chromium/ui/base/gtk/g_object_destructor_filo.h b/chromium/ui/base/gtk/g_object_destructor_filo.h deleted file mode 100644 index 76e41f7c046..00000000000 --- a/chromium/ui/base/gtk/g_object_destructor_filo.h +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_GTK_G_OBJECT_DESTRUCTOR_FILO_H_ -#define UI_BASE_GTK_G_OBJECT_DESTRUCTOR_FILO_H_ - -#include <glib.h> -#include <list> -#include <map> - -#include "base/basictypes.h" -#include "ui/base/ui_export.h" - -template <typename T> struct DefaultSingletonTraits; - -typedef struct _GObject GObject; - -namespace ui { - -// This class hooks calls to g_object_weak_ref()/unref() and executes them in -// FILO order. This is important if there are several hooks to the single object -// (set up at different levels of class hierarchy) and the lowest hook (set up -// first) is deleting self - it must be called last (among hooks for the given -// object). Unfortunately Glib does not provide this guarantee. -// -// Use it as follows: -// -// static void OnDestroyedThunk(gpointer data, GObject *where_the_object_was) { -// reinterpret_cast<MyClass*>(data)->OnDestroyed(where_the_object_was); -// } -// void MyClass::OnDestroyed(GObject *where_the_object_was) { -// destroyed_ = true; -// delete this; -// } -// MyClass::Init() { -// ... -// ui::GObjectDestructorFILO::GetInstance()->Connect( -// G_OBJECT(my_widget), &OnDestroyedThunk, this); -// } -// MyClass::~MyClass() { -// if (!destroyed_) { -// ui::GObjectDestructorFILO::GetInstance()->Disconnect( -// G_OBJECT(my_widget), &OnDestroyedThunk, this); -// } -// } -// -// TODO(glotov): Probably worth adding ScopedGObjectDtor<T>. -// -// This class is a singleton. Not thread safe. Must be called within UI thread. -class UI_EXPORT GObjectDestructorFILO { - public: - typedef void (*DestructorHook)(void* context, GObject* where_the_object_was); - - static GObjectDestructorFILO* GetInstance(); - void Connect(GObject* object, DestructorHook callback, void* context); - void Disconnect(GObject* object, DestructorHook callback, void* context); - - private: - struct Hook { - Hook(GObject* o, DestructorHook cb, void* ctx) - : object(o), callback(cb), context(ctx) { - } - bool equal(GObject* o, DestructorHook cb, void* ctx) const { - return object == o && callback == cb && context == ctx; - } - GObject* object; - DestructorHook callback; - void* context; - }; - typedef std::list<Hook> HandlerList; - typedef std::map<GObject*, HandlerList> HandlerMap; - - GObjectDestructorFILO(); - ~GObjectDestructorFILO(); - friend struct DefaultSingletonTraits<GObjectDestructorFILO>; - - void WeakNotify(GObject* where_the_object_was); - static void WeakNotifyThunk(gpointer data, GObject* where_the_object_was) { - reinterpret_cast<GObjectDestructorFILO*>(data)->WeakNotify( - where_the_object_was); - } - - HandlerMap handler_map_; - - DISALLOW_COPY_AND_ASSIGN(GObjectDestructorFILO); -}; - -} // namespace ui - -#endif // UI_BASE_GTK_G_OBJECT_DESTRUCTOR_FILO_H_ diff --git a/chromium/ui/base/gtk/gtk_expanded_container.cc b/chromium/ui/base/gtk/gtk_expanded_container.cc deleted file mode 100644 index 6b39821d806..00000000000 --- a/chromium/ui/base/gtk/gtk_expanded_container.cc +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/gtk/gtk_expanded_container.h" - -#include <gtk/gtk.h> - -#include <algorithm> - -#include "ui/gfx/gtk_compat.h" - -namespace { - -enum { - CHILD_SIZE_REQUEST, - LAST_SIGNAL -}; - -guint expanded_container_signals[LAST_SIGNAL] = { 0 }; - -struct SizeAllocateData { - GtkWidget* container; - GtkAllocation* allocation; - int border_width; -}; - -void GetChildPosition(GtkWidget* container, GtkWidget* child, int* x, int* y) { - GValue v = { 0 }; - g_value_init(&v, G_TYPE_INT); - gtk_container_child_get_property(GTK_CONTAINER(container), child, "x", &v); - *x = g_value_get_int(&v); - gtk_container_child_get_property(GTK_CONTAINER(container), child, "y", &v); - *y = g_value_get_int(&v); - g_value_unset(&v); -} - -void ChildSizeAllocate(GtkWidget* child, gpointer userdata) { - if (!gtk_widget_get_visible(child)) - return; - - SizeAllocateData* data = reinterpret_cast<SizeAllocateData*>(userdata); - - GtkRequisition child_requisition; - child_requisition.width = data->allocation->width - data->border_width * 2; - child_requisition.height = data->allocation->height - data->border_width * 2; - - // We need to give whoever is pulling our strings a chance to adjust the - // size of our children. - g_signal_emit(data->container, - expanded_container_signals[CHILD_SIZE_REQUEST], 0, - child, &child_requisition); - - GtkAllocation child_allocation; - child_allocation.width = child_requisition.width; - child_allocation.height = child_requisition.height; - if (child_allocation.width < 0 || child_allocation.height < 0) { - gtk_widget_get_child_requisition(child, &child_requisition); - if (child_allocation.width < 0) - child_allocation.width = child_requisition.width; - if (child_allocation.height < 0) - child_allocation.height = child_requisition.height; - } - - int x, y; - GetChildPosition(data->container, child, &x, &y); - - child_allocation.x = x + data->border_width; - child_allocation.y = y + data->border_width; - - if (!gtk_widget_get_has_window(data->container)) { - child_allocation.x += data->allocation->x; - child_allocation.y += data->allocation->y; - } - gtk_widget_size_allocate(child, &child_allocation); -} - -void Marshal_VOID__OBJECT_BOXED(GClosure* closure, - GValue* return_value G_GNUC_UNUSED, - guint n_param_values, - const GValue* param_values, - gpointer invocation_hint G_GNUC_UNUSED, - gpointer marshal_data) { - typedef void (*GMarshalFunc_VOID__OBJECT_BOXED) (gpointer data1, - gpointer arg_1, - gpointer arg_2, - gpointer data2); - register GMarshalFunc_VOID__OBJECT_BOXED callback; - register GCClosure *cc = reinterpret_cast<GCClosure*>(closure); - register gpointer data1, data2; - - g_return_if_fail(n_param_values == 3); - - if (G_CCLOSURE_SWAP_DATA(closure)) { - data1 = closure->data; - data2 = g_value_peek_pointer(param_values + 0); - } else { - data1 = g_value_peek_pointer(param_values + 0); - data2 = closure->data; - } - - callback = reinterpret_cast<GMarshalFunc_VOID__OBJECT_BOXED>( - marshal_data ? marshal_data : cc->callback); - - callback(data1, - g_value_get_object(param_values + 1), - g_value_get_boxed(param_values + 2), - data2); -} - -} // namespace - -G_BEGIN_DECLS - -static void gtk_expanded_container_size_allocate(GtkWidget* widget, - GtkAllocation* allocation); - -G_DEFINE_TYPE(GtkExpandedContainer, gtk_expanded_container, GTK_TYPE_FIXED) - -static void gtk_expanded_container_class_init( - GtkExpandedContainerClass *klass) { - GtkObjectClass* object_class = - reinterpret_cast<GtkObjectClass*>(klass); - - GtkWidgetClass* widget_class = - reinterpret_cast<GtkWidgetClass*>(klass); - widget_class->size_allocate = gtk_expanded_container_size_allocate; - - expanded_container_signals[CHILD_SIZE_REQUEST] = - g_signal_new("child-size-request", - G_OBJECT_CLASS_TYPE(object_class), - static_cast<GSignalFlags>(G_SIGNAL_RUN_FIRST), - 0, - NULL, NULL, - Marshal_VOID__OBJECT_BOXED, - G_TYPE_NONE, 2, - GTK_TYPE_WIDGET, - GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE); -} - -static void gtk_expanded_container_init(GtkExpandedContainer* container) { -} - -static void gtk_expanded_container_size_allocate(GtkWidget* widget, - GtkAllocation* allocation) { - gtk_widget_set_allocation(widget, allocation); - - if (gtk_widget_get_has_window(widget) && gtk_widget_get_realized(widget)) { - gdk_window_move_resize(gtk_widget_get_window(widget), - allocation->x, - allocation->y, - allocation->width, - allocation->height); - } - - SizeAllocateData data; - data.container = widget; - data.allocation = allocation; - data.border_width = gtk_container_get_border_width(GTK_CONTAINER(widget)); - - gtk_container_foreach(GTK_CONTAINER(widget), ChildSizeAllocate, &data); -} - -GtkWidget* gtk_expanded_container_new() { - return GTK_WIDGET(g_object_new(GTK_TYPE_EXPANDED_CONTAINER, NULL)); -} - -void gtk_expanded_container_put(GtkExpandedContainer* container, - GtkWidget* widget, gint x, gint y) { - g_return_if_fail(GTK_IS_EXPANDED_CONTAINER(container)); - g_return_if_fail(GTK_IS_WIDGET(widget)); - gtk_fixed_put(GTK_FIXED(container), widget, x, y); -} - -void gtk_expanded_container_move(GtkExpandedContainer* container, - GtkWidget* widget, gint x, gint y) { - g_return_if_fail(GTK_IS_EXPANDED_CONTAINER(container)); - g_return_if_fail(GTK_IS_WIDGET(widget)); - gtk_fixed_move(GTK_FIXED(container), widget, x, y); -} - -void gtk_expanded_container_set_has_window(GtkExpandedContainer* container, - gboolean has_window) { - g_return_if_fail(GTK_IS_EXPANDED_CONTAINER(container)); - g_return_if_fail(!gtk_widget_get_realized(GTK_WIDGET(container))); - gtk_widget_set_has_window(GTK_WIDGET(container), has_window); -} - -gboolean gtk_expanded_container_get_has_window( - GtkExpandedContainer* container) { - g_return_val_if_fail(GTK_IS_EXPANDED_CONTAINER(container), FALSE); - return gtk_widget_get_has_window(GTK_WIDGET(container)); -} - -G_END_DECLS diff --git a/chromium/ui/base/gtk/gtk_expanded_container.h b/chromium/ui/base/gtk/gtk_expanded_container.h deleted file mode 100644 index 63e3dbd1494..00000000000 --- a/chromium/ui/base/gtk/gtk_expanded_container.h +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_GTK_GTK_EXPANDED_CONTAINER_H_ -#define UI_BASE_GTK_GTK_EXPANDED_CONTAINER_H_ - -#include <gdk/gdk.h> -#include <gtk/gtk.h> - -#include "ui/base/ui_export.h" - -// A specialized container derived from GtkFixed, which expands the size of its -// children to fill the container, in one or both directions. The usage of this -// container is similar to GtkFixed. -// -// The "child-size-request" signal is optional, if you want to expand child -// widgets to customized size other than the container's size. It should have -// the following signature: -// -// void (*child_size_request)(GtkExpandedContainer* container, -// GtkWidget* child, -// GtkRequisition* requisition); -// -// This signal is emitted for each child with the requisition set to the size of -// the container. Your handler may adjust the value of the requisition. If the -// width or height is set to -1, then that direction will not be expanded, and -// the original size request of the child will be used. - -G_BEGIN_DECLS - -#define GTK_TYPE_EXPANDED_CONTAINER \ - (gtk_expanded_container_get_type()) -#define GTK_EXPANDED_CONTAINER(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_EXPANDED_CONTAINER, \ - GtkExpandedContainer)) -#define GTK_EXPANDED_CONTAINER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_EXPANDED_CONTAINER, \ - GtkExpandedContainerClass)) -#define GTK_IS_EXPANDED_CONTAINER(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_EXPANDED_CONTAINER)) -#define GTK_IS_EXPANDED_CONTAINER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_EXPANDED_CONTAINER)) -#define GTK_EXPANDED_CONTAINER_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_EXPANDED_CONTAINER, \ - GtkExpandedContainerClass)) - -typedef struct _GtkExpandedContainer GtkExpandedContainer; -typedef struct _GtkExpandedContainerClass GtkExpandedContainerClass; - -struct _GtkExpandedContainer { - // Parent class. - GtkFixed fixed; -}; - -struct _GtkExpandedContainerClass { - GtkFixedClass parent_class; -}; - -UI_EXPORT GType gtk_expanded_container_get_type() G_GNUC_CONST; -UI_EXPORT GtkWidget* gtk_expanded_container_new(); -UI_EXPORT void gtk_expanded_container_put(GtkExpandedContainer* container, - GtkWidget* widget, gint x, gint y); -UI_EXPORT void gtk_expanded_container_move(GtkExpandedContainer* container, - GtkWidget* widget, gint x, gint y); -UI_EXPORT void gtk_expanded_container_set_has_window( - GtkExpandedContainer* container, - gboolean has_window); -UI_EXPORT gboolean gtk_expanded_container_get_has_window( - GtkExpandedContainer* container); - -G_END_DECLS - -#endif // UI_BASE_GTK_GTK_EXPANDED_CONTAINER_H_ diff --git a/chromium/ui/base/gtk/gtk_expanded_container_unittest.cc b/chromium/ui/base/gtk/gtk_expanded_container_unittest.cc deleted file mode 100644 index 532e58e5ca2..00000000000 --- a/chromium/ui/base/gtk/gtk_expanded_container_unittest.cc +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/gtk/gtk_expanded_container.h" - -#include "testing/gtest/include/gtest/gtest.h" - -#define EXPECT_ALLOCATION_EQ(widget, x_, y_, width_, height_) \ -do { \ - GtkAllocation allocation; \ - gtk_widget_get_allocation(widget, &allocation); \ - EXPECT_EQ(x_, allocation.x); \ - EXPECT_EQ(y_, allocation.y); \ - EXPECT_EQ(width_, allocation.width); \ - EXPECT_EQ(height_, allocation.height); \ -} while(0); - -#define EXPECT_ALLOCATION_PARAM_EQ(widget, param, value) \ -do { \ - GtkAllocation allocation; \ - gtk_widget_get_allocation(widget, &allocation); \ - EXPECT_EQ(value,allocation.param); \ -} while(0); - -class GtkExpandedContainerTest : public testing::Test { - protected: - GtkExpandedContainerTest() - : window_(gtk_window_new(GTK_WINDOW_TOPLEVEL)), - expanded_(gtk_expanded_container_new()) { - gtk_window_set_default_size(GTK_WINDOW(window_), 200, 200); - gtk_container_add(GTK_CONTAINER(window_), expanded_); - } - virtual ~GtkExpandedContainerTest() { - gtk_widget_destroy(window_); - } - - bool FindChild(GtkWidget* widget) { - GList* children = gtk_container_get_children(GTK_CONTAINER(expanded_)); - for (GList* child = children; child; child = child->next) { - if (GTK_WIDGET(child->data) == widget) { - g_list_free(children); - return true; - } - } - g_list_free(children); - return false; - } - - int GetChildX(GtkWidget* widget) { - GValue x = { 0 }; - g_value_init(&x, G_TYPE_INT); - gtk_container_child_get_property(GTK_CONTAINER(expanded_), widget, "x", &x); - return g_value_get_int(&x); - } - - int GetChildY(GtkWidget* widget) { - GValue y = { 0 }; - g_value_init(&y, G_TYPE_INT); - gtk_container_child_get_property(GTK_CONTAINER(expanded_), widget, "y", &y); - return g_value_get_int(&y); - } - - protected: - GtkWidget* window_; - GtkWidget* expanded_; -}; - -TEST_F(GtkExpandedContainerTest, AddRemove) { - GtkWidget* child1 = gtk_fixed_new(); - GtkWidget* child2 = gtk_fixed_new(); - gtk_container_add(GTK_CONTAINER(expanded_), child1); - ASSERT_TRUE(FindChild(child1)); - - gtk_container_add(GTK_CONTAINER(expanded_), child2); - ASSERT_TRUE(FindChild(child2)); - ASSERT_TRUE(FindChild(child1)); - - gtk_container_remove(GTK_CONTAINER(expanded_), child1); - ASSERT_FALSE(FindChild(child1)); - ASSERT_TRUE(FindChild(child2)); - - gtk_container_remove(GTK_CONTAINER(expanded_), child2); - ASSERT_FALSE(FindChild(child2)); -} - -TEST_F(GtkExpandedContainerTest, Expand) { - GtkWidget* child1 = gtk_fixed_new(); - GtkWidget* child2 = gtk_fixed_new(); - gtk_container_add(GTK_CONTAINER(expanded_), child1); - gtk_expanded_container_put(GTK_EXPANDED_CONTAINER(expanded_), - child2, 10, 20); - gtk_widget_show_all(window_); - - GtkAllocation allocation = { 0, 0, 50, 100 }; - gtk_widget_size_allocate(expanded_, &allocation); - - EXPECT_ALLOCATION_EQ(child1, 0, 0, 50, 100); - - EXPECT_ALLOCATION_EQ(child2, 10, 20, 50, 100); - - allocation.x = 10; - allocation.y = 20; - gtk_widget_size_allocate(expanded_, &allocation); - - EXPECT_ALLOCATION_PARAM_EQ(child1, x, 10); - EXPECT_ALLOCATION_PARAM_EQ(child1, y, 20); - EXPECT_ALLOCATION_PARAM_EQ(child2, x, 20); - EXPECT_ALLOCATION_PARAM_EQ(child2, y, 40); -} - -// Test if the size allocation for children still works when using own -// GdkWindow. In this case, the children's origin starts from (0, 0) rather -// than the container's origin. -TEST_F(GtkExpandedContainerTest, HasWindow) { - GtkWidget* child = gtk_fixed_new(); - gtk_container_add(GTK_CONTAINER(expanded_), child); - gtk_expanded_container_set_has_window(GTK_EXPANDED_CONTAINER(expanded_), - TRUE); - gtk_widget_show_all(window_); - - GtkAllocation allocation = { 10, 10, 50, 100 }; - gtk_widget_size_allocate(expanded_, &allocation); - - EXPECT_ALLOCATION_EQ(child, 0, 0, 50, 100); -} - -static void OnChildSizeRequest(GtkExpandedContainer* container, - GtkWidget* child, - GtkRequisition* requisition, - gpointer userdata) { - ASSERT_EQ(child, GTK_WIDGET(userdata)); - requisition->width = 250; - requisition->height = -1; -} - -TEST_F(GtkExpandedContainerTest, ChildSizeRequest) { - GtkWidget* child = gtk_fixed_new(); - gtk_widget_set_size_request(child, 10, 25); - g_signal_connect(expanded_, "child-size-request", - G_CALLBACK(OnChildSizeRequest), child); - gtk_container_add(GTK_CONTAINER(expanded_), child); - gtk_widget_show_all(window_); - - GtkAllocation allocation = { 0, 0, 300, 100 }; - gtk_widget_size_allocate(expanded_, &allocation); - - EXPECT_ALLOCATION_EQ(child, 0, 0, 250, 25); -} - -TEST_F(GtkExpandedContainerTest, ChildPosition) { - GtkWidget* child = gtk_fixed_new(); - gtk_expanded_container_put(GTK_EXPANDED_CONTAINER(expanded_), - child, 10, 20); - gtk_widget_show_all(window_); - - EXPECT_EQ(10, GetChildX(child)); - EXPECT_EQ(20, GetChildY(child)); - - gtk_expanded_container_move(GTK_EXPANDED_CONTAINER(expanded_), - child, 40, 50); - EXPECT_EQ(40, GetChildX(child)); - EXPECT_EQ(50, GetChildY(child)); -} diff --git a/chromium/ui/base/gtk/gtk_floating_container.cc b/chromium/ui/base/gtk/gtk_floating_container.cc deleted file mode 100644 index dd1ac26b0a2..00000000000 --- a/chromium/ui/base/gtk/gtk_floating_container.cc +++ /dev/null @@ -1,322 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/gtk/gtk_floating_container.h" - -#include <gtk/gtk.h> - -#include <algorithm> - -#include "ui/gfx/gtk_compat.h" - -namespace { - -enum { - SET_FLOATING_POSITION, - LAST_SIGNAL -}; - -enum { - CHILD_PROP_0, - CHILD_PROP_X, - CHILD_PROP_Y -}; - -// Returns the GtkFloatingContainerChild associated with |widget| (or NULL if -// |widget| not found). -GtkFloatingContainerChild* GetChild(GtkFloatingContainer* container, - GtkWidget* widget) { - for (GList* floating_children = container->floating_children; - floating_children; floating_children = g_list_next(floating_children)) { - GtkFloatingContainerChild* child = - reinterpret_cast<GtkFloatingContainerChild*>(floating_children->data); - - if (child->widget == widget) - return child; - } - - return NULL; -} - -const GParamFlags kStaticReadWriteProp = static_cast<GParamFlags>( - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); - -} // namespace - -G_BEGIN_DECLS - -static void gtk_floating_container_remove(GtkContainer* container, - GtkWidget* widget); -static void gtk_floating_container_forall(GtkContainer* container, - gboolean include_internals, - GtkCallback callback, - gpointer callback_data); -static void gtk_floating_container_size_request(GtkWidget* widget, - GtkRequisition* requisition); -static void gtk_floating_container_size_allocate(GtkWidget* widget, - GtkAllocation* allocation); -static void gtk_floating_container_set_child_property(GtkContainer* container, - GtkWidget* child, - guint property_id, - const GValue* value, - GParamSpec* pspec); -static void gtk_floating_container_get_child_property(GtkContainer* container, - GtkWidget* child, - guint property_id, - GValue* value, - GParamSpec* pspec); - -static guint floating_container_signals[LAST_SIGNAL] = { 0 }; - -G_DEFINE_TYPE(GtkFloatingContainer, gtk_floating_container, GTK_TYPE_BIN) - -static void gtk_floating_container_class_init( - GtkFloatingContainerClass *klass) { - GtkObjectClass* object_class = - reinterpret_cast<GtkObjectClass*>(klass); - - GtkWidgetClass* widget_class = - reinterpret_cast<GtkWidgetClass*>(klass); - widget_class->size_request = gtk_floating_container_size_request; - widget_class->size_allocate = gtk_floating_container_size_allocate; - - GtkContainerClass* container_class = - reinterpret_cast<GtkContainerClass*>(klass); - container_class->remove = gtk_floating_container_remove; - container_class->forall = gtk_floating_container_forall; - - container_class->set_child_property = - gtk_floating_container_set_child_property; - container_class->get_child_property = - gtk_floating_container_get_child_property; - - gtk_container_class_install_child_property( - container_class, - CHILD_PROP_X, - g_param_spec_int("x", - "X position", - "X position of child widget", - G_MININT, - G_MAXINT, - 0, - kStaticReadWriteProp)); - - gtk_container_class_install_child_property( - container_class, - CHILD_PROP_Y, - g_param_spec_int("y", - "Y position", - "Y position of child widget", - G_MININT, - G_MAXINT, - 0, - kStaticReadWriteProp)); - - floating_container_signals[SET_FLOATING_POSITION] = - g_signal_new("set-floating-position", - G_OBJECT_CLASS_TYPE(object_class), - static_cast<GSignalFlags>(G_SIGNAL_RUN_FIRST | - G_SIGNAL_ACTION), - 0, - NULL, NULL, - g_cclosure_marshal_VOID__BOXED, - G_TYPE_NONE, 1, - GDK_TYPE_RECTANGLE | G_SIGNAL_TYPE_STATIC_SCOPE); -} - -static void gtk_floating_container_init(GtkFloatingContainer* container) { - gtk_widget_set_has_window(GTK_WIDGET(container), FALSE); - container->floating_children = NULL; -} - -static void gtk_floating_container_remove(GtkContainer* container, - GtkWidget* widget) { - g_return_if_fail(GTK_IS_WIDGET(widget)); - - GtkBin* bin = GTK_BIN(container); - if (gtk_bin_get_child(bin) == widget) { - ((GTK_CONTAINER_CLASS(gtk_floating_container_parent_class))->remove) - (container, widget); - } else { - // Handle the other case where it's in our |floating_children| list. - GtkFloatingContainer* floating = GTK_FLOATING_CONTAINER(container); - GList* children = floating->floating_children; - gboolean removed_child = false; - while (children) { - GtkFloatingContainerChild* child = - reinterpret_cast<GtkFloatingContainerChild*>(children->data); - - if (child->widget == widget) { - removed_child = true; - gboolean was_visible = gtk_widget_get_visible(GTK_WIDGET(widget)); - - gtk_widget_unparent(widget); - - floating->floating_children = - g_list_remove_link(floating->floating_children, children); - g_list_free(children); - g_free(child); - - if (was_visible && gtk_widget_get_visible(GTK_WIDGET(container))) - gtk_widget_queue_resize(GTK_WIDGET(container)); - - break; - } - children = children->next; - } - - g_return_if_fail(removed_child); - } -} - -static void gtk_floating_container_forall(GtkContainer* container, - gboolean include_internals, - GtkCallback callback, - gpointer callback_data) { - g_return_if_fail(container != NULL); - g_return_if_fail(callback != NULL); - - // Let GtkBin do its part of the forall. - ((GTK_CONTAINER_CLASS(gtk_floating_container_parent_class))->forall) - (container, include_internals, callback, callback_data); - - GtkFloatingContainer* floating = GTK_FLOATING_CONTAINER(container); - GList* children = floating->floating_children; - while (children) { - GtkFloatingContainerChild* child = - reinterpret_cast<GtkFloatingContainerChild*>(children->data); - children = children->next; - - (*callback)(child->widget, callback_data); - } -} - -static void gtk_floating_container_size_request(GtkWidget* widget, - GtkRequisition* requisition) { - GtkBin* bin = GTK_BIN(widget); - if (bin && gtk_bin_get_child(bin)) { - gtk_widget_size_request(gtk_bin_get_child(bin), requisition); - } else { - requisition->width = 0; - requisition->height = 0; - } -} - -static void gtk_floating_container_size_allocate(GtkWidget* widget, - GtkAllocation* allocation) { - gtk_widget_set_allocation(widget, allocation); - - if (gtk_widget_get_has_window(widget) && gtk_widget_get_realized(widget)) { - gdk_window_move_resize(gtk_widget_get_window(widget), - allocation->x, - allocation->y, - allocation->width, - allocation->height); - } - - // Give the same allocation to our GtkBin component. - GtkBin* bin = GTK_BIN(widget); - if (gtk_bin_get_child(bin)) { - gtk_widget_size_allocate(gtk_bin_get_child(bin), allocation); - } - - // We need to give whoever is pulling our strings a chance to set the "x" and - // "y" properties on all of our children. - g_signal_emit(widget, floating_container_signals[SET_FLOATING_POSITION], 0, - allocation); - - // Our allocation has been set. We've asked our controller to place the other - // widgets. Pass out allocations to all our children based on where they want - // to be. - GtkFloatingContainer* container = GTK_FLOATING_CONTAINER(widget); - GList* children = container->floating_children; - GtkAllocation child_allocation; - GtkRequisition child_requisition; - while (children) { - GtkFloatingContainerChild* child = - reinterpret_cast<GtkFloatingContainerChild*>(children->data); - children = children->next; - - if (gtk_widget_get_visible(GTK_WIDGET(child->widget))) { - gtk_widget_size_request(child->widget, &child_requisition); - child_allocation.x = allocation->x + child->x; - child_allocation.y = allocation->y + child->y; - child_allocation.width = std::max(1, std::min(child_requisition.width, - allocation->width)); - child_allocation.height = std::max(1, std::min(child_requisition.height, - allocation->height)); - gtk_widget_size_allocate(child->widget, &child_allocation); - } - } -} - -static void gtk_floating_container_set_child_property(GtkContainer* container, - GtkWidget* child, - guint property_id, - const GValue* value, - GParamSpec* pspec) { - GtkFloatingContainerChild* floating_child = - GetChild(GTK_FLOATING_CONTAINER(container), child); - g_return_if_fail(floating_child); - - switch (property_id) { - case CHILD_PROP_X: - floating_child->x = g_value_get_int(value); - gtk_widget_child_notify(child, "x"); - break; - case CHILD_PROP_Y: - floating_child->y = g_value_get_int(value); - gtk_widget_child_notify(child, "y"); - break; - default: - GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID( - container, property_id, pspec); - break; - }; -} - -static void gtk_floating_container_get_child_property(GtkContainer* container, - GtkWidget* child, - guint property_id, - GValue* value, - GParamSpec* pspec) { - GtkFloatingContainerChild* floating_child = - GetChild(GTK_FLOATING_CONTAINER(container), child); - g_return_if_fail(floating_child); - - switch (property_id) { - case CHILD_PROP_X: - g_value_set_int(value, floating_child->x); - break; - case CHILD_PROP_Y: - g_value_set_int(value, floating_child->y); - break; - default: - GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID( - container, property_id, pspec); - break; - }; -} - -GtkWidget* gtk_floating_container_new() { - return GTK_WIDGET(g_object_new(GTK_TYPE_FLOATING_CONTAINER, NULL)); -} - -void gtk_floating_container_add_floating(GtkFloatingContainer* container, - GtkWidget* widget) { - g_return_if_fail(GTK_IS_FLOATING_CONTAINER(container)); - g_return_if_fail(GTK_IS_WIDGET(widget)); - - GtkFloatingContainerChild* child_info = g_new(GtkFloatingContainerChild, 1); - child_info->widget = widget; - child_info->x = 0; - child_info->y = 0; - - gtk_widget_set_parent(widget, GTK_WIDGET(container)); - - container->floating_children = - g_list_append(container->floating_children, child_info); -} - -G_END_DECLS diff --git a/chromium/ui/base/gtk/gtk_floating_container.h b/chromium/ui/base/gtk/gtk_floating_container.h deleted file mode 100644 index 2d68edde5aa..00000000000 --- a/chromium/ui/base/gtk/gtk_floating_container.h +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_GTK_GTK_FLOATING_CONTAINER_H_ -#define UI_BASE_GTK_GTK_FLOATING_CONTAINER_H_ - -#include <gdk/gdk.h> -#include <gtk/gtk.h> - -#include "ui/base/ui_export.h" - -// A specialized container, which is a cross between a GtkBin and a -// GtkFixed. This container dervies from GtkBin and the implementation of -// gtk_container_add() is the same: only one GtkWidget can be added through -// that interface. The GtkBin portion contains normal content and is given the -// same allocation that this container has. -// -// In addition, any number of widgets can be added through the -// gtk_floating_container_add_floating() method, which provides functionality -// similar to a GtkFixed. Unlike a GtkFixed, coordinates are not set when you -// gtk_fixed_put(). The location of the floating widgets is determined while -// running the "set-floating-position" signal, which is emitted during this -// container's "size-allocate" handler. -// -// The "set-floating-position" signal is (semi-)mandatory if you want widgets -// placed anywhere other than the origin and should have the following -// signature: -// -// void (*set_floating_position)(GtkFloatingContainer* container, -// GtkAllocation* allocation, -// gpointer userdata); -// -// Your handler should, for each floating widget, set the "x" and "y" child -// properties. - -G_BEGIN_DECLS - -#define GTK_TYPE_FLOATING_CONTAINER \ - (gtk_floating_container_get_type()) -#define GTK_FLOATING_CONTAINER(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_FLOATING_CONTAINER, \ - GtkFloatingContainer)) -#define GTK_FLOATING_CONTAINER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_FLOATING_CONTAINER, \ - GtkFloatingContainerClass)) -#define GTK_IS_FLOATING_CONTAINER(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_FLOATING_CONTAINER)) -#define GTK_IS_FLOATING_CONTAINER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_FLOATING_CONTAINER)) -#define GTK_FLOATING_CONTAINER_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_FLOATING_CONTAINER, \ - GtkFloatingContainerClass)) - -typedef struct _GtkFloatingContainer GtkFloatingContainer; -typedef struct _GtkFloatingContainerClass GtkFloatingContainerClass; -typedef struct _GtkFloatingContainerChild GtkFloatingContainerChild; - -struct _GtkFloatingContainer { - // Parent class. - GtkBin bin; - - // A GList of all our floating children, in GtkFloatingContainerChild - // structs. Owned by the GtkFloatingContainer. - GList* floating_children; -}; - -struct _GtkFloatingContainerClass { - GtkBinClass parent_class; -}; - -// Internal structure used to associate a widget and its x/y child properties. -struct _GtkFloatingContainerChild { - GtkWidget* widget; - gint x; - gint y; -}; - -UI_EXPORT GType gtk_floating_container_get_type() G_GNUC_CONST; -UI_EXPORT GtkWidget* gtk_floating_container_new(); -UI_EXPORT void gtk_floating_container_add_floating( - GtkFloatingContainer* container, - GtkWidget* widget); -// Use gtk_container_remove to remove all widgets; both widgets added with -// gtk_container_add() and gtk_floating_container_add_floating(). - -G_END_DECLS - -#endif // UI_BASE_GTK_GTK_FLOATING_CONTAINER_H_ diff --git a/chromium/ui/base/gtk/gtk_hig_constants.h b/chromium/ui/base/gtk/gtk_hig_constants.h deleted file mode 100644 index a03db506d17..00000000000 --- a/chromium/ui/base/gtk/gtk_hig_constants.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -// A list of constants that are used in setting up GTK widgets. -// -// This contains named color constants, along with spacing constants from the -// GNOME Human Interface Guide. - -#ifndef UI_BASE_GTK_GTK_HIG_CONSTANTS_H_ -#define UI_BASE_GTK_GTK_HIG_CONSTANTS_H_ - -typedef struct _GdkColor GdkColor; - -// Define a macro for creating GdkColors from RGB values. This is a macro to -// allow static construction of literals, etc. Use this like: -// GdkColor white = GDK_COLOR_RGB(0xff, 0xff, 0xff); -#define GDK_COLOR_RGB(r, g, b) {0, r * ::ui::kSkiaToGDKMultiplier, \ - g * ::ui::kSkiaToGDKMultiplier, b * ::ui::kSkiaToGDKMultiplier} - -namespace ui { - -// Multiply uint8 color components by this. -const int kSkiaToGDKMultiplier = 257; - -// Common color constants. -const GdkColor kGdkWhite = GDK_COLOR_RGB(0xFF, 0xFF, 0xFF); -const GdkColor kGdkBlack = GDK_COLOR_RGB(0x00, 0x00, 0x00); -const GdkColor kGdkGray = GDK_COLOR_RGB(0x7F, 0x7F, 0x7F); - -// Constants relating to the layout of dialog windows: -// (See http://library.gnome.org/devel/hig-book/stable/design-window.html.en) - -// Spacing between controls of the same group. -const int kControlSpacing = 6; - -// Horizontal spacing between a label and its control. -const int kLabelSpacing = 12; - -// Indent of the controls within each group. -const int kGroupIndent = 12; - -// Space around the outside of a dialog's contents. -const int kContentAreaBorder = 12; - -// Spacing between groups of controls. -const int kContentAreaSpacing = 18; - -// Horizontal Spacing between controls in a form. -const int kFormControlSpacing = 10; - -} // namespace ui - -#endif // UI_BASE_GTK_GTK_HIG_CONSTANTS_H_ diff --git a/chromium/ui/base/gtk/gtk_screen_util.cc b/chromium/ui/base/gtk/gtk_screen_util.cc deleted file mode 100644 index 000f9509472..00000000000 --- a/chromium/ui/base/gtk/gtk_screen_util.cc +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/gtk/gtk_screen_util.h" - -#include "base/logging.h" - -namespace ui { - -bool IsScreenComposited() { - GdkScreen* screen = gdk_screen_get_default(); - return gdk_screen_is_composited(screen) == TRUE; -} - -gfx::Point ScreenPoint(GtkWidget* widget) { - int x, y; - gdk_display_get_pointer(gtk_widget_get_display(widget), NULL, &x, &y, - NULL); - return gfx::Point(x, y); -} - -gfx::Point ClientPoint(GtkWidget* widget) { - int x, y; - gtk_widget_get_pointer(widget, &x, &y); - return gfx::Point(x, y); -} - -gfx::Vector2d GetWidgetScreenOffset(GtkWidget* widget) { - GdkWindow* window = gtk_widget_get_window(widget); - - if (!window) { - NOTREACHED() << "Must only be called on realized widgets."; - return gfx::Vector2d(0, 0); - } - - gint x, y; - gdk_window_get_origin(window, &x, &y); - - if (!gtk_widget_get_has_window(widget)) { - GtkAllocation allocation; - gtk_widget_get_allocation(widget, &allocation); - x += allocation.x; - y += allocation.y; - } - - return gfx::Vector2d(x, y); -} - -gfx::Rect GetWidgetScreenBounds(GtkWidget* widget) { - GtkAllocation allocation; - gtk_widget_get_allocation(widget, &allocation); - - return gfx::Rect(PointAtOffsetFromOrigin(GetWidgetScreenOffset(widget)), - gfx::Size(allocation.width, allocation.height)); -} - -} // namespace ui diff --git a/chromium/ui/base/gtk/gtk_screen_util.h b/chromium/ui/base/gtk/gtk_screen_util.h deleted file mode 100644 index b916cf238af..00000000000 --- a/chromium/ui/base/gtk/gtk_screen_util.h +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_GTK_GTK_SCREEN_UTILS_H_ -#define UI_BASE_GTK_GTK_SCREEN_UTILS_H_ - -#include <gtk/gtk.h> - -#include "ui/base/ui_export.h" -#include "ui/gfx/point.h" -#include "ui/gfx/rect.h" -#include "ui/gfx/vector2d.h" - -namespace ui { - -// Returns true if the screen is composited, false otherwise. -UI_EXPORT bool IsScreenComposited(); - -// Get the current location of the mouse cursor relative to the screen. -UI_EXPORT gfx::Point ScreenPoint(GtkWidget* widget); - -// Get the current location of the mouse cursor relative to the widget. -UI_EXPORT gfx::Point ClientPoint(GtkWidget* widget); - -// Gets the offset of a gtk widget from the origin in screen coordinates. -UI_EXPORT gfx::Vector2d GetWidgetScreenOffset(GtkWidget* widget); - -// Returns the bounds of the specified widget in screen coordinates. -UI_EXPORT gfx::Rect GetWidgetScreenBounds(GtkWidget* widget); - -} // namespace ui - -#endif // UI_BASE_GTK_GTK_SCREEN_UTILS_H_ diff --git a/chromium/ui/base/gtk/gtk_signal.h b/chromium/ui/base/gtk/gtk_signal.h deleted file mode 100644 index ca6fa2308d0..00000000000 --- a/chromium/ui/base/gtk/gtk_signal.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_GTK_GTK_SIGNAL_H_ -#define UI_BASE_GTK_GTK_SIGNAL_H_ - -#include "ui/base/glib/glib_signal.h" - -typedef struct _GtkWidget GtkWidget; - -// These macros handle the common case where the sender object will be a -// GtkWidget*. -#define CHROMEGTK_CALLBACK_0(CLASS, RETURN, METHOD) \ - CHROMEG_CALLBACK_0(CLASS, RETURN, METHOD, GtkWidget*); - -#define CHROMEGTK_CALLBACK_1(CLASS, RETURN, METHOD, ARG1) \ - CHROMEG_CALLBACK_1(CLASS, RETURN, METHOD, GtkWidget*, ARG1); - -#define CHROMEGTK_CALLBACK_2(CLASS, RETURN, METHOD, ARG1, ARG2) \ - CHROMEG_CALLBACK_2(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2); - -#define CHROMEGTK_CALLBACK_3(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3) \ - CHROMEG_CALLBACK_3(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, ARG3); - -#define CHROMEGTK_CALLBACK_4(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, ARG4) \ - CHROMEG_CALLBACK_4(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, ARG3, \ - ARG4); - -#define CHROMEGTK_CALLBACK_5(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, ARG4, \ - ARG5) \ - CHROMEG_CALLBACK_5(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, ARG3, \ - ARG4, ARG5); - -#define CHROMEGTK_CALLBACK_6(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, ARG4, \ - ARG5, ARG6) \ - CHROMEG_CALLBACK_6(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, ARG3, \ - ARG4, ARG5, ARG6); - -#define CHROMEGTK_VIRTUAL_CALLBACK_0(CLASS, RETURN, METHOD) \ - CHROMEG_VIRTUAL_CALLBACK_0(CLASS, RETURN, METHOD, GtkWidget*); - -#define CHROMEGTK_VIRTUAL_CALLBACK_1(CLASS, RETURN, METHOD, ARG1) \ - CHROMEG_VIRTUAL_CALLBACK_1(CLASS, RETURN, METHOD, GtkWidget*, ARG1); - -#define CHROMEGTK_VIRTUAL_CALLBACK_2(CLASS, RETURN, METHOD, ARG1, ARG2) \ - CHROMEG_VIRTUAL_CALLBACK_2(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2); - -#define CHROMEGTK_VIRTUAL_CALLBACK_3(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3) \ - CHROMEG_VIRTUAL_CALLBACK_3(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, \ - ARG3); - -#define CHROMEGTK_VIRTUAL_CALLBACK_4(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, \ - ARG4) \ - CHROMEG_VIRTUAL_CALLBACK_4(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, \ - ARG3, ARG4); - -#define CHROMEGTK_VIRTUAL_CALLBACK_5(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, \ - ARG4, ARG5) \ - CHROMEG_VIRTUAL_CALLBACK_5(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, \ - ARG3, ARG4, ARG5); - -#define CHROMEGTK_VIRTUAL_CALLBACK_6(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, \ - ARG4, ARG5, ARG6) \ - CHROMEG_VIRTUAL_CALLBACK_6(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, \ - ARG3, ARG4, ARG5, ARG6); - -#endif // UI_BASE_GTK_GTK_SIGNAL_H_ diff --git a/chromium/ui/base/gtk/gtk_signal_registrar.cc b/chromium/ui/base/gtk/gtk_signal_registrar.cc deleted file mode 100644 index 82527e8258b..00000000000 --- a/chromium/ui/base/gtk/gtk_signal_registrar.cc +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/gtk/gtk_signal_registrar.h" - -#include <glib-object.h> - -#include "base/logging.h" -#include "ui/base/gtk/g_object_destructor_filo.h" - -namespace ui { - -GtkSignalRegistrar::GtkSignalRegistrar() { -} - -GtkSignalRegistrar::~GtkSignalRegistrar() { - for (HandlerMap::iterator list_iter = handler_lists_.begin(); - list_iter != handler_lists_.end(); ++list_iter) { - GObject* object = list_iter->first; - GObjectDestructorFILO::GetInstance()->Disconnect( - object, WeakNotifyThunk, this); - - HandlerList& handlers = list_iter->second; - for (HandlerList::iterator ids_iter = handlers.begin(); - ids_iter != handlers.end(); ++ids_iter) { - g_signal_handler_disconnect(object, *ids_iter); - } - } -} - -glong GtkSignalRegistrar::Connect(gpointer instance, - const gchar* detailed_signal, - GCallback signal_handler, - gpointer data) { - return ConnectInternal(instance, detailed_signal, signal_handler, data, - false); -} - -glong GtkSignalRegistrar::ConnectAfter(gpointer instance, - const gchar* detailed_signal, - GCallback signal_handler, - gpointer data) { - return ConnectInternal(instance, detailed_signal, signal_handler, data, true); -} - -glong GtkSignalRegistrar::ConnectInternal(gpointer instance, - const gchar* detailed_signal, - GCallback signal_handler, - gpointer data, - bool after) { - GObject* object = G_OBJECT(instance); - - HandlerMap::iterator iter = handler_lists_.find(object); - if (iter == handler_lists_.end()) { - GObjectDestructorFILO::GetInstance()->Connect( - object, WeakNotifyThunk, this); - handler_lists_[object] = HandlerList(); - iter = handler_lists_.find(object); - } - - glong handler_id = after ? - g_signal_connect_after(instance, detailed_signal, signal_handler, data) : - g_signal_connect(instance, detailed_signal, signal_handler, data); - iter->second.push_back(handler_id); - - return handler_id; -} - -void GtkSignalRegistrar::WeakNotify(GObject* where_the_object_was) { - HandlerMap::iterator iter = handler_lists_.find(where_the_object_was); - if (iter == handler_lists_.end()) { - NOTREACHED(); - return; - } - // The signal handlers will be disconnected automatically. Just erase the - // handler id list. - handler_lists_.erase(iter); -} - -void GtkSignalRegistrar::DisconnectAll(gpointer instance) { - GObject* object = G_OBJECT(instance); - HandlerMap::iterator iter = handler_lists_.find(object); - if (iter == handler_lists_.end()) - return; - - GObjectDestructorFILO::GetInstance()->Disconnect( - object, WeakNotifyThunk, this); - HandlerList& handlers = iter->second; - for (HandlerList::iterator ids_iter = handlers.begin(); - ids_iter != handlers.end(); ++ids_iter) { - g_signal_handler_disconnect(object, *ids_iter); - } - - handler_lists_.erase(iter); -} - -} // namespace ui diff --git a/chromium/ui/base/gtk/gtk_signal_registrar.h b/chromium/ui/base/gtk/gtk_signal_registrar.h deleted file mode 100644 index 2fa839c5f91..00000000000 --- a/chromium/ui/base/gtk/gtk_signal_registrar.h +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_GTK_GTK_SIGNAL_REGISTRAR_H_ -#define UI_BASE_GTK_GTK_SIGNAL_REGISTRAR_H_ - -#include <glib.h> -#include <map> -#include <vector> - -#include "base/basictypes.h" -#include "ui/base/ui_export.h" - -typedef void (*GCallback) (void); -typedef struct _GObject GObject; -typedef struct _GtkWidget GtkWidget; - -namespace ui { - -// A class that ensures that callbacks don't run on stale owner objects. Similar -// in spirit to NotificationRegistrar. Use as follows: -// -// class ChromeObject { -// public: -// ChromeObject() { -// ... -// -// signals_.Connect(widget, "event", CallbackThunk, this); -// } -// -// ... -// -// private: -// GtkSignalRegistrar signals_; -// }; -// -// When |signals_| goes down, it will disconnect the handlers connected via -// Connect. -class UI_EXPORT GtkSignalRegistrar { - public: - GtkSignalRegistrar(); - ~GtkSignalRegistrar(); - - // Connect before the default handler. Returns the handler id. - glong Connect(gpointer instance, const gchar* detailed_signal, - GCallback signal_handler, gpointer data); - // Connect after the default handler. Returns the handler id. - glong ConnectAfter(gpointer instance, const gchar* detailed_signal, - GCallback signal_handler, gpointer data); - - // Disconnects all signal handlers connected to |instance|. - void DisconnectAll(gpointer instance); - - private: - typedef std::vector<glong> HandlerList; - typedef std::map<GObject*, HandlerList> HandlerMap; - - static void WeakNotifyThunk(gpointer data, GObject* where_the_object_was) { - reinterpret_cast<GtkSignalRegistrar*>(data)->WeakNotify( - where_the_object_was); - } - void WeakNotify(GObject* where_the_object_was); - - glong ConnectInternal(gpointer instance, const gchar* detailed_signal, - GCallback signal_handler, gpointer data, bool after); - - HandlerMap handler_lists_; - - DISALLOW_COPY_AND_ASSIGN(GtkSignalRegistrar); -}; - -} // namespace ui - -#endif // UI_BASE_GTK_GTK_SIGNAL_REGISTRAR_H_ diff --git a/chromium/ui/base/gtk/gtk_windowing.cc b/chromium/ui/base/gtk/gtk_windowing.cc deleted file mode 100644 index e378c8463ad..00000000000 --- a/chromium/ui/base/gtk/gtk_windowing.cc +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/gtk/gtk_windowing.h" - -#include <gdk/gdkx.h> - -#include "base/logging.h" -#include "ui/base/x/x11_util.h" -#include "ui/gfx/gtk_compat.h" - -namespace ui { - -void StackPopupWindow(GtkWidget* popup, GtkWidget* toplevel) { - DCHECK(GTK_IS_WINDOW(popup) && gtk_widget_is_toplevel(popup) && - gtk_widget_get_realized(popup)); - DCHECK(GTK_IS_WINDOW(toplevel) && gtk_widget_is_toplevel(toplevel) && - gtk_widget_get_realized(toplevel)); - - // Stack the |popup| window directly above the |toplevel| window. - // The popup window is a direct child of the root window, so we need to - // find a similar ancestor for the toplevel window (which might have been - // reparented by a window manager). We grab the server while we're doing - // this -- otherwise, we'll get an error if the window manager reparents the - // toplevel window right after we call GetHighestAncestorWindow(). - gdk_x11_display_grab(gtk_widget_get_display(toplevel)); - XID toplevel_window_base = ui::GetHighestAncestorWindow( - ui::GetX11WindowFromGtkWidget(toplevel), - ui::GetX11RootWindow()); - if (toplevel_window_base) { - XID window_xid = ui::GetX11WindowFromGtkWidget(popup); - XID window_parent = ui::GetParentWindow(window_xid); - if (window_parent == ui::GetX11RootWindow()) { - ui::RestackWindow(window_xid, toplevel_window_base, true); - } else { - // The window manager shouldn't reparent override-redirect windows. - DLOG(ERROR) << "override-redirect window " << window_xid - << "'s parent is " << window_parent - << ", rather than root window " - << ui::GetX11RootWindow(); - } - } - gdk_x11_display_ungrab(gtk_widget_get_display(toplevel)); -} - -} // namespace ui - diff --git a/chromium/ui/base/gtk/gtk_windowing.h b/chromium/ui/base/gtk/gtk_windowing.h deleted file mode 100644 index 93a9335753d..00000000000 --- a/chromium/ui/base/gtk/gtk_windowing.h +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_GTK_GTK_WINDOWING_H_ -#define UI_BASE_GTK_GTK_WINDOWING_H_ - -#include <gtk/gtk.h> - -#include "ui/base/ui_export.h" - -namespace ui { - -// Stacks a |popup| window directly on top of a |toplevel| window. -UI_EXPORT void StackPopupWindow(GtkWidget* popup, GtkWidget* toplevel); - -} // namespace ui - -#endif // UI_BASE_GTK_GTK_WINDOWING_H_ diff --git a/chromium/ui/base/gtk/owned_widget_gtk.cc b/chromium/ui/base/gtk/owned_widget_gtk.cc deleted file mode 100644 index 6a129a21807..00000000000 --- a/chromium/ui/base/gtk/owned_widget_gtk.cc +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/gtk/owned_widget_gtk.h" - -#include <gtk/gtk.h> - -#include "base/logging.h" - -namespace ui { - -OwnedWidgetGtk::~OwnedWidgetGtk() { - Destroy(); -} - -void OwnedWidgetGtk::Own(GtkWidget* widget) { - if (!widget) - return; - - DCHECK(!widget_); - // We want to make sure that Own() was called properly, right after the - // widget was created. There should be a floating reference. - DCHECK(g_object_is_floating(widget)); - - // Sink the floating reference, we should now own this reference. - g_object_ref_sink(widget); - widget_ = widget; -} - -void OwnedWidgetGtk::Destroy() { - if (!widget_) - return; - - GtkWidget* widget = widget_; - widget_ = NULL; - gtk_widget_destroy(widget); - - DCHECK(!g_object_is_floating(widget)); - // NOTE: Assumes some implementation details about glib internals. - DCHECK_EQ(G_OBJECT(widget)->ref_count, 1U); - g_object_unref(widget); -} - -} // namespace ui diff --git a/chromium/ui/base/gtk/owned_widget_gtk.h b/chromium/ui/base/gtk/owned_widget_gtk.h deleted file mode 100644 index ba3068c9708..00000000000 --- a/chromium/ui/base/gtk/owned_widget_gtk.h +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This class assists you in dealing with a specific situation when managing -// ownership between a C++ object and a GTK widget. It is common to have a -// C++ object which encapsulates a GtkWidget, and that widget is exposed from -// the object for use outside of the class. In this situation, you commonly -// want the GtkWidget's lifetime to match its C++ object's lifetime. Using an -// OwnedWigetGtk will take ownership over the initial reference of the -// GtkWidget, so that it is "owned" by the C++ object. Example usage: -// -// class FooViewGtk() { -// public: -// FooViewGtk() { } -// ~FooViewGtk() { } -// void Init() { vbox_.Own(gtk_vbox_new()); } -// GtkWidget* widget() { return vbox_.get() }; // Host my widget! -// private: -// OwnedWidgetGtk vbox_; -// }; -// -// This design will ensure that the widget stays alive from the call to Own() -// until the call to Destroy(). -// -// - Details of the problem and OwnedWidgetGtk's solution: -// In order to make passing ownership more convenient for newly created -// widgets, GTK has a concept of a "floating" reference. All GtkObjects (and -// thus GtkWidgets) inherit from GInitiallyUnowned. When they are created, the -// object starts with a reference count of 1, but has its floating flag set. -// When it is put into a container for the first time, that container will -// "sink" the floating reference, and the count will still be 1. Now the -// container owns the widget, and if we remove the widget from the container, -// the widget is destroyed. This style of ownership often causes problems when -// you have an object encapsulating the widget. If we just use a raw -// GtkObject* with no specific ownership management, we push the widget's -// ownership onto the user of the class. Now the C++ object can't depend on -// the widget being valid, since it doesn't manage its lifetime. If the widget -// was removed from a container, removing its only reference, it would be -// destroyed (from the C++ object's perspective) unexpectedly destroyed. The -// solution is fairly simple, make sure that the C++ object owns the widget, -// and thus it is also responsible for destroying it. This boils down to: -// GtkWidget* widget = gtk_widget_new(); -// g_object_ref_sink(widget); // Claim the initial floating reference. -// ... -// gtk_destroy_widget(widget); // Ask all code to destroy their references. -// g_object_unref(widget); // Destroy the initial reference we had claimed. - -#ifndef UI_BASE_GTK_OWNED_WIDGET_GTK_H_ -#define UI_BASE_GTK_OWNED_WIDGET_GTK_H_ - -#include "base/basictypes.h" -#include "ui/base/ui_export.h" - -typedef struct _GtkWidget GtkWidget; - -namespace ui { - -class UI_EXPORT OwnedWidgetGtk { - public: - // Create an instance that isn't managing any ownership. - OwnedWidgetGtk() : widget_(NULL) { } - // Create an instance that owns |widget|. - explicit OwnedWidgetGtk(GtkWidget* widget) : widget_(NULL) { Own(widget); } - - ~OwnedWidgetGtk(); - - // Return the currently owned widget, or NULL if no widget is owned. - GtkWidget* get() const { return widget_; } - GtkWidget* operator->() const { return widget_; } - - // Takes ownership of a widget, by taking the initial floating reference of - // the GtkWidget. It is expected that Own() is called right after the widget - // has been created, and before any other references to the widget might have - // been added. It is valid to never call Own(), in which case Destroy() will - // do nothing. If Own() has been called, you must explicitly call Destroy(). - void Own(GtkWidget* widget); - - // You may call Destroy() after you have called Own(). Calling Destroy() - // will call gtk_widget_destroy(), and drop our reference to the widget. - // Destroy() is also called in this object's destructor. - // After a call to Destroy(), you may call Own() again. NOTE: It is expected - // that after gtk_widget_destroy we will be holding the only reference left - // on the object. We assert this in debug mode to help catch any leaks. - void Destroy(); - - private: - GtkWidget* widget_; - - DISALLOW_COPY_AND_ASSIGN(OwnedWidgetGtk); -}; - -} // namespace ui - -#endif // UI_BASE_GTK_OWNED_WIDGET_GTK_H_ diff --git a/chromium/ui/base/gtk/scoped_region.cc b/chromium/ui/base/gtk/scoped_region.cc deleted file mode 100644 index 729e3c3a6f7..00000000000 --- a/chromium/ui/base/gtk/scoped_region.cc +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/gtk/scoped_region.h" - -#include <gdk/gdk.h> - -namespace ui { - -ScopedRegion::ScopedRegion() : region_(NULL) {} - -ScopedRegion::ScopedRegion(GdkRegion* region) : region_(region) {} - -ScopedRegion::~ScopedRegion() { - Close(); -} - -void ScopedRegion::Set(GdkRegion* region) { - Close(); - region_ = region; -} - -GdkRegion* ScopedRegion::Get() { - return region_; -} - -GdkRegion* ScopedRegion::release() { - GdkRegion* region = region_; - region_ = NULL; - return region; -} - -void ScopedRegion::Close() { - if (region_) { - gdk_region_destroy(region_); - region_ = NULL; - } -} - -} // namespace ui diff --git a/chromium/ui/base/gtk/scoped_region.h b/chromium/ui/base/gtk/scoped_region.h deleted file mode 100644 index faa7e817c3c..00000000000 --- a/chromium/ui/base/gtk/scoped_region.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_GTK_SCOPED_REGION_H_ -#define UI_BASE_GTK_SCOPED_REGION_H_ - -#include "base/basictypes.h" -#include "ui/base/ui_export.h" - -typedef struct _GdkRegion GdkRegion; - -namespace ui { - -// Wraps a GdkRegion. This class provides the same methods as ScopedGDIObject in -// base/win/scoped_gdi_object.h. -class UI_EXPORT ScopedRegion { - public: - ScopedRegion(); - explicit ScopedRegion(GdkRegion* region); - - ~ScopedRegion(); - - void Set(GdkRegion* region); - - GdkRegion* Get(); - - GdkRegion* release(); - - private: - void Close(); - - GdkRegion* region_; - - DISALLOW_COPY_AND_ASSIGN(ScopedRegion); -}; - -} // namespace ui - -#endif // UI_BASE_GTK_SCOPED_REGION_H_ diff --git a/chromium/ui/base/ime/DEPS b/chromium/ui/base/ime/DEPS index 56b2a81c976..d59514e924b 100644 --- a/chromium/ui/base/ime/DEPS +++ b/chromium/ui/base/ime/DEPS @@ -1,6 +1,4 @@ include_rules = [ - # TODO(nona): Remove chromoeos/dbus entry once crbug.com/171351 is fixed. - "+chromeos/dbus", "+chromeos/ime", "+third_party/gtk+/gdk/gdkkeysyms.h", "+third_party/gtk+/gtk/gtkimcontextsimpleseqs.h", diff --git a/chromium/ui/base/ime/OWNERS b/chromium/ui/base/ime/OWNERS index ec3410f4afc..bc96702ccda 100644 --- a/chromium/ui/base/ime/OWNERS +++ b/chromium/ui/base/ime/OWNERS @@ -1,11 +1,10 @@ -nona@chromium.org -penghuang@chromium.org +# primary reviewer. +yukishiino@chromium.org -# Chrome OS IME +# backup reviewers. komatsu@chromium.org +mukai@chromium.org +nona@chromium.org -# Windows Aura IME +# For Windows. yukawa@chromium.org - -# Linux Aura IME -yukishiino@chromium.org diff --git a/chromium/ui/base/ime/candidate_window.cc b/chromium/ui/base/ime/candidate_window.cc new file mode 100644 index 00000000000..6cb32e2d77f --- /dev/null +++ b/chromium/ui/base/ime/candidate_window.cc @@ -0,0 +1,103 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/ime/candidate_window.h" + +#include <string> +#include "base/logging.h" +#include "base/strings/utf_string_conversions.h" +#include "base/values.h" + +namespace ui { + +namespace { +// The default entry number of a page in CandidateWindow. +const int kDefaultPageSize = 9; +} // namespace + +CandidateWindow::CandidateWindow() + : property_(new CandidateWindowProperty) { +} + +CandidateWindow::~CandidateWindow() { +} + +bool CandidateWindow::IsEqual(const CandidateWindow& cw) const { + if (page_size() != cw.page_size() || + cursor_position() != cw.cursor_position() || + is_cursor_visible() != cw.is_cursor_visible() || + orientation() != cw.orientation() || + show_window_at_composition() != cw.show_window_at_composition() || + is_auxiliary_text_visible() != cw.is_auxiliary_text_visible() || + auxiliary_text() != cw.auxiliary_text() || + candidates_.size() != cw.candidates_.size()) + return false; + + for (size_t i = 0; i < candidates_.size(); ++i) { + const Entry& left = candidates_[i]; + const Entry& right = cw.candidates_[i]; + if (left.value != right.value || + left.label != right.label || + left.annotation != right.annotation || + left.description_title != right.description_title || + left.description_body != right.description_body) + return false; + } + return true; +} + +void CandidateWindow::CopyFrom(const CandidateWindow& cw) { + SetProperty(cw.GetProperty()); + candidates_.clear(); + candidates_ = cw.candidates_; +} + + +void CandidateWindow::GetInfolistEntries( + std::vector<ui::InfolistEntry>* infolist_entries, + bool* has_highlighted) const { + DCHECK(infolist_entries); + DCHECK(has_highlighted); + infolist_entries->clear(); + *has_highlighted = false; + + const size_t cursor_index_in_page = cursor_position() % page_size(); + + for (size_t i = 0; i < candidates().size(); ++i) { + const CandidateWindow::Entry& candidate_entry = candidates()[i]; + if (candidate_entry.description_title.empty() && + candidate_entry.description_body.empty()) + continue; + + InfolistEntry entry(candidate_entry.description_title, + candidate_entry.description_body); + if (i == cursor_index_in_page) { + entry.highlighted = true; + *has_highlighted = true; + } + infolist_entries->push_back(entry); + } +} + +// When the default values are changed, please modify +// InputMethodEngineInterface::CandidateWindowProperty too. +CandidateWindow::CandidateWindowProperty::CandidateWindowProperty() + : page_size(kDefaultPageSize), + cursor_position(0), + is_cursor_visible(true), + is_vertical(false), + show_window_at_composition(false), + is_auxiliary_text_visible(false) { +} + +CandidateWindow::CandidateWindowProperty::~CandidateWindowProperty() { +} + +CandidateWindow::Entry::Entry() { +} + +CandidateWindow::Entry::~Entry() { +} + +} // namespace ui diff --git a/chromium/ui/base/ime/candidate_window.h b/chromium/ui/base/ime/candidate_window.h new file mode 100644 index 00000000000..6ae6dd8955a --- /dev/null +++ b/chromium/ui/base/ime/candidate_window.h @@ -0,0 +1,131 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_IME_CANDIDATE_WINDOW_H_ +#define UI_BASE_IME_CANDIDATE_WINDOW_H_ + +#include <string> +#include <vector> +#include "base/basictypes.h" +#include "base/memory/scoped_ptr.h" +#include "ui/base/ime/infolist_entry.h" +#include "ui/base/ui_base_export.h" + +namespace ui { + +// CandidateWindow represents the structure of candidates generated from IME. +class UI_BASE_EXPORT CandidateWindow { + public: + enum Orientation { + HORIZONTAL = 0, + VERTICAL = 1, + }; + + struct UI_BASE_EXPORT CandidateWindowProperty { + CandidateWindowProperty(); + virtual ~CandidateWindowProperty(); + int page_size; + int cursor_position; + bool is_cursor_visible; + bool is_vertical; + bool show_window_at_composition; + + // Auxiliary text is typically displayed in the footer of the candidate + // window. + std::string auxiliary_text; + bool is_auxiliary_text_visible; + }; + + // Represents a candidate entry. + struct UI_BASE_EXPORT Entry { + Entry(); + virtual ~Entry(); + base::string16 value; + base::string16 label; + base::string16 annotation; + base::string16 description_title; + base::string16 description_body; + }; + + CandidateWindow(); + virtual ~CandidateWindow(); + + // Returns true if the given |candidate_window| is equal to myself. + bool IsEqual(const CandidateWindow& candidate_window) const; + + // Copies |candidate_window| to myself. + void CopyFrom(const CandidateWindow& candidate_window); + + const CandidateWindowProperty& GetProperty() const { + return *property_; + } + void SetProperty(const CandidateWindowProperty& property) { + *property_ = property; + } + + // Gets the infolist entry models. Sets |has_highlighted| to true if |entries| + // contains highlighted entry. + void GetInfolistEntries(std::vector<InfolistEntry>* entries, + bool* has_highlighted) const; + + // Returns the number of candidates in one page. + uint32 page_size() const { return property_->page_size; } + void set_page_size(uint32 page_size) { property_->page_size = page_size; } + + // Returns the cursor index of the currently selected candidate. + uint32 cursor_position() const { return property_->cursor_position; } + void set_cursor_position(uint32 cursor_position) { + property_->cursor_position = cursor_position; + } + + // Returns true if the cursor is visible. + bool is_cursor_visible() const { return property_->is_cursor_visible; } + void set_is_cursor_visible(bool is_cursor_visible) { + property_->is_cursor_visible = is_cursor_visible; + } + + // Returns the orientation of the candidate window. + Orientation orientation() const { + return property_->is_vertical ? VERTICAL : HORIZONTAL; + } + void set_orientation(Orientation orientation) { + property_->is_vertical = (orientation == VERTICAL); + } + + // Returns true if the auxiliary text is visible. + bool is_auxiliary_text_visible() const { + return property_->is_auxiliary_text_visible; + } + void set_is_auxiliary_text_visible(bool is_auxiliary_text_visible) const { + property_->is_auxiliary_text_visible = is_auxiliary_text_visible; + } + + // Accessors of auxiliary_text. + const std::string& auxiliary_text() const { + return property_->auxiliary_text; + } + void set_auxiliary_text(const std::string& auxiliary_text) const { + property_->auxiliary_text = auxiliary_text; + } + + const std::vector<Entry>& candidates() const { return candidates_; } + std::vector<Entry>* mutable_candidates() { return &candidates_; } + + bool show_window_at_composition() const { + return property_->show_window_at_composition; + } + void set_show_window_at_composition(bool show_window_at_composition) { + property_->show_window_at_composition = show_window_at_composition; + } + + private: + scoped_ptr<CandidateWindowProperty> property_; + std::vector<Entry> candidates_; + + DISALLOW_COPY_AND_ASSIGN(CandidateWindow); +}; + +} // namespace ui + +#endif // UI_BASE_IME_CANDIDATE_WINDOW_H_ diff --git a/chromium/ui/base/ime/candidate_window_unittest.cc b/chromium/ui/base/ime/candidate_window_unittest.cc new file mode 100644 index 00000000000..4defe56b5e0 --- /dev/null +++ b/chromium/ui/base/ime/candidate_window_unittest.cc @@ -0,0 +1,262 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// TODO(nona): Add more tests. + +#include "ui/base/ime/candidate_window.h" + +#include <string> + +#include "base/compiler_specific.h" +#include "base/logging.h" +#include "base/memory/scoped_ptr.h" +#include "base/strings/utf_string_conversions.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace ui { + +namespace { + +const size_t kSampleCandidateSize = 3; +const char* kSampleCandidate[] = { + "Sample Candidate 1", + "Sample Candidate 2", + "Sample Candidate 3", +}; +const char* kSampleDescriptionTitle[] = { + "Sample Description Title 1", + "Sample Description Title 2", + "Sample Description Title 3", +}; +const char* kSampleDescriptionBody[] = { + "Sample Description Body 1", + "Sample Description Body 2", + "Sample Description Body 3", +}; + +} + +TEST(CandidateWindow, IsEqualTest) { + CandidateWindow cw1; + CandidateWindow cw2; + + const base::string16 kSampleString1 = base::UTF8ToUTF16("Sample 1"); + const base::string16 kSampleString2 = base::UTF8ToUTF16("Sample 2"); + + EXPECT_TRUE(cw1.IsEqual(cw2)); + EXPECT_TRUE(cw2.IsEqual(cw1)); + + cw1.set_page_size(1); + cw2.set_page_size(2); + EXPECT_FALSE(cw1.IsEqual(cw2)); + EXPECT_FALSE(cw2.IsEqual(cw1)); + cw2.set_page_size(1); + + cw1.set_cursor_position(1); + cw2.set_cursor_position(2); + EXPECT_FALSE(cw1.IsEqual(cw2)); + EXPECT_FALSE(cw2.IsEqual(cw1)); + cw2.set_cursor_position(1); + + cw1.set_is_cursor_visible(true); + cw2.set_is_cursor_visible(false); + EXPECT_FALSE(cw1.IsEqual(cw2)); + EXPECT_FALSE(cw2.IsEqual(cw1)); + cw2.set_is_cursor_visible(true); + + cw1.set_orientation(CandidateWindow::HORIZONTAL); + cw2.set_orientation(CandidateWindow::VERTICAL); + EXPECT_FALSE(cw1.IsEqual(cw2)); + EXPECT_FALSE(cw2.IsEqual(cw1)); + cw2.set_orientation(CandidateWindow::HORIZONTAL); + + cw1.set_show_window_at_composition(true); + cw2.set_show_window_at_composition(false); + EXPECT_FALSE(cw1.IsEqual(cw2)); + EXPECT_FALSE(cw2.IsEqual(cw1)); + cw2.set_show_window_at_composition(true); + + // Check equality for candidates member variable. + CandidateWindow::Entry entry1; + CandidateWindow::Entry entry2; + + cw1.mutable_candidates()->push_back(entry1); + EXPECT_FALSE(cw1.IsEqual(cw2)); + EXPECT_FALSE(cw2.IsEqual(cw1)); + cw2.mutable_candidates()->push_back(entry2); + EXPECT_TRUE(cw1.IsEqual(cw2)); + EXPECT_TRUE(cw2.IsEqual(cw1)); + + entry1.value = kSampleString1; + entry2.value = kSampleString2; + cw1.mutable_candidates()->push_back(entry1); + cw2.mutable_candidates()->push_back(entry2); + EXPECT_FALSE(cw1.IsEqual(cw2)); + EXPECT_FALSE(cw2.IsEqual(cw1)); + cw1.mutable_candidates()->clear(); + cw2.mutable_candidates()->clear(); + + entry1.label = kSampleString1; + entry2.label = kSampleString2; + cw1.mutable_candidates()->push_back(entry1); + cw2.mutable_candidates()->push_back(entry2); + EXPECT_FALSE(cw1.IsEqual(cw2)); + EXPECT_FALSE(cw2.IsEqual(cw1)); + cw1.mutable_candidates()->clear(); + cw2.mutable_candidates()->clear(); + + entry1.annotation = kSampleString1; + entry2.annotation = kSampleString2; + cw1.mutable_candidates()->push_back(entry1); + cw2.mutable_candidates()->push_back(entry2); + EXPECT_FALSE(cw1.IsEqual(cw2)); + EXPECT_FALSE(cw2.IsEqual(cw1)); + cw1.mutable_candidates()->clear(); + cw2.mutable_candidates()->clear(); + + entry1.description_title = kSampleString1; + entry2.description_title = kSampleString2; + cw1.mutable_candidates()->push_back(entry1); + cw2.mutable_candidates()->push_back(entry2); + EXPECT_FALSE(cw1.IsEqual(cw2)); + EXPECT_FALSE(cw2.IsEqual(cw1)); + cw1.mutable_candidates()->clear(); + cw2.mutable_candidates()->clear(); + + entry1.description_body = kSampleString1; + entry2.description_body = kSampleString2; + cw1.mutable_candidates()->push_back(entry1); + cw2.mutable_candidates()->push_back(entry2); + EXPECT_FALSE(cw1.IsEqual(cw2)); + EXPECT_FALSE(cw2.IsEqual(cw1)); + cw1.mutable_candidates()->clear(); + cw2.mutable_candidates()->clear(); +} + +TEST(CandidateWindow, CopyFromTest) { + CandidateWindow cw1; + CandidateWindow cw2; + + const base::string16 kSampleString = base::UTF8ToUTF16("Sample"); + + cw1.set_page_size(1); + cw1.set_cursor_position(2); + cw1.set_is_cursor_visible(false); + cw1.set_orientation(CandidateWindow::HORIZONTAL); + cw1.set_show_window_at_composition(false); + + CandidateWindow::Entry entry; + entry.value = kSampleString; + entry.label = kSampleString; + entry.annotation = kSampleString; + entry.description_title = kSampleString; + entry.description_body = kSampleString; + cw1.mutable_candidates()->push_back(entry); + + cw2.CopyFrom(cw1); + EXPECT_TRUE(cw1.IsEqual(cw2)); +} + +TEST(CandidateWindow, GetInfolistEntries_DenseCase) { + CandidateWindow candidate_window; + candidate_window.set_page_size(10); + for (size_t i = 0; i < kSampleCandidateSize; ++i) { + CandidateWindow::Entry entry; + entry.value = base::UTF8ToUTF16(kSampleCandidate[i]); + entry.description_title = base::UTF8ToUTF16(kSampleDescriptionTitle[i]); + entry.description_body = base::UTF8ToUTF16(kSampleDescriptionBody[i]); + candidate_window.mutable_candidates()->push_back(entry); + } + candidate_window.set_cursor_position(1); + + std::vector<InfolistEntry> infolist_entries; + bool has_highlighted = false; + + candidate_window.GetInfolistEntries(&infolist_entries, &has_highlighted); + + EXPECT_EQ(kSampleCandidateSize, infolist_entries.size()); + EXPECT_TRUE(has_highlighted); + EXPECT_TRUE(infolist_entries[1].highlighted); +} + +TEST(CandidateWindow, GetInfolistEntries_SparseCase) { + CandidateWindow candidate_window; + candidate_window.set_page_size(10); + for (size_t i = 0; i < kSampleCandidateSize; ++i) { + CandidateWindow::Entry entry; + entry.value = base::UTF8ToUTF16(kSampleCandidate[i]); + candidate_window.mutable_candidates()->push_back(entry); + } + + std::vector<CandidateWindow::Entry>* candidates = + candidate_window.mutable_candidates(); + (*candidates)[2].description_title = + base::UTF8ToUTF16(kSampleDescriptionTitle[2]); + (*candidates)[2].description_body = + base::UTF8ToUTF16(kSampleDescriptionBody[2]); + + candidate_window.set_cursor_position(2); + + std::vector<InfolistEntry> infolist_entries; + bool has_highlighted = false; + + candidate_window.GetInfolistEntries(&infolist_entries, &has_highlighted); + + // Infolist entries skips empty descriptions, so expected entry size is 1. + EXPECT_EQ(1UL, infolist_entries.size()); + EXPECT_TRUE(has_highlighted); + EXPECT_TRUE(infolist_entries[0].highlighted); +} + +TEST(CandidateWindow, GetInfolistEntries_SparseNoSelectionCase) { + CandidateWindow candidate_window; + candidate_window.set_page_size(10); + + for (size_t i = 0; i < kSampleCandidateSize; ++i) { + CandidateWindow::Entry entry; + entry.value = base::UTF8ToUTF16(kSampleCandidate[i]); + candidate_window.mutable_candidates()->push_back(entry); + } + + std::vector<CandidateWindow::Entry>* candidates = + candidate_window.mutable_candidates(); + (*candidates)[2].description_title = + base::UTF8ToUTF16(kSampleDescriptionTitle[2]); + (*candidates)[2].description_body = + base::UTF8ToUTF16(kSampleDescriptionBody[2]); + + candidate_window.set_cursor_position(0); + + std::vector<InfolistEntry> infolist_entries; + bool has_highlighted; + + candidate_window.GetInfolistEntries(&infolist_entries, &has_highlighted); + + // Infolist entries skips empty descriptions, so expected entry size is 1 and + // no highlighted entries. + EXPECT_EQ(1UL, infolist_entries.size()); + EXPECT_FALSE(has_highlighted); + EXPECT_FALSE(infolist_entries[0].highlighted); +} + +TEST(CandidateWindow, GetInfolistEntries_NoInfolistCase) { + CandidateWindow candidate_window; + candidate_window.set_page_size(10); + + for (size_t i = 0; i < kSampleCandidateSize; ++i) { + CandidateWindow::Entry entry; + entry.value = base::UTF8ToUTF16(kSampleCandidate[i]); + candidate_window.mutable_candidates()->push_back(entry); + } + candidate_window.set_cursor_position(1); + + std::vector<InfolistEntry> infolist_entries; + bool has_highlighted = false; + + candidate_window.GetInfolistEntries(&infolist_entries, &has_highlighted); + + EXPECT_TRUE(infolist_entries.empty()); + EXPECT_FALSE(has_highlighted); +} + +} // namespace ui diff --git a/chromium/ui/base/ime/chromeos/character_composer.cc b/chromium/ui/base/ime/chromeos/character_composer.cc index b9fb51f084f..b7a8808e7d1 100644 --- a/chromium/ui/base/ime/chromeos/character_composer.cc +++ b/chromium/ui/base/ime/chromeos/character_composer.cc @@ -4,9 +4,6 @@ #include "ui/base/ime/chromeos/character_composer.h" -#include <X11/Xlib.h> -#include <X11/Xutil.h> - #include <algorithm> #include <iterator> @@ -15,10 +12,10 @@ // Note for Gtk removal: gdkkeysyms.h only contains a set of // '#define GDK_KeyName 0xNNNN' macros and does not #include any Gtk headers. #include "third_party/gtk+/gdk/gdkkeysyms.h" + #include "ui/base/glib/glib_integers.h" #include "ui/events/event.h" -#include "ui/events/event_constants.h" -#include "ui/gfx/x/x11_types.h" +#include "ui/events/keycodes/keyboard_codes.h" // Note for Gtk removal: gtkimcontextsimpleseqs.h does not #include any Gtk // headers and only contains one big guint16 array |gtk_compose_seqs_compact| @@ -358,7 +355,7 @@ bool CheckCharacterComposeTable(const ComposeBufferType& sequence, // Converts |character| to UTF16 string. // Returns false when |character| is not a valid character. -bool UTF32CharacterToUTF16(uint32 character, string16* output) { +bool UTF32CharacterToUTF16(uint32 character, base::string16* output) { output->clear(); // Reject invalid character. (e.g. codepoint greater than 0x10ffff) if (!CBU_IS_UNICODE_CHAR(character)) @@ -371,19 +368,6 @@ bool UTF32CharacterToUTF16(uint32 character, string16* output) { return true; } -// Converts a X keycode to a X keysym with no modifiers. -KeySym XKeyCodeToXKeySym(unsigned int keycode) { - XDisplay* display = gfx::GetXDisplay(); - if (!display) - return NoSymbol; - - XKeyEvent x_key_event = {0}; - x_key_event.type = KeyPress; - x_key_event.display = display; - x_key_event.keycode = keycode; - return ::XLookupKeysym(&x_key_event, 0); -} - // Returns an hexadecimal digit integer (0 to 15) corresponding to |keyval|. // -1 is returned when |keyval| cannot be a hexadecimal digit. int KeyvalToHexDigit(unsigned int keyval) { @@ -396,6 +380,16 @@ int KeyvalToHexDigit(unsigned int keyval) { return -1; // |keyval| cannot be a hexadecimal digit. } +// Returns an hexadecimal digit integer (0 to 15) corresponding to |keycode|. +// -1 is returned when |keycode| cannot be a hexadecimal digit. +int KeycodeToHexDigit(unsigned int keycode) { + if (ui::VKEY_0 <= keycode && keycode <= ui::VKEY_9) + return keycode - ui::VKEY_0; + if (ui::VKEY_A <= keycode && keycode <= ui::VKEY_F) + return keycode - ui::VKEY_A + 10; + return -1; // |keycode| cannot be a hexadecimal digit. +} + } // namespace namespace ui { @@ -412,16 +406,12 @@ void CharacterComposer::Reset() { } bool CharacterComposer::FilterKeyPress(const ui::KeyEvent& event) { - if (!event.HasNativeEvent() || + uint32 keyval = event.platform_keycode(); + if (!keyval || (event.type() != ET_KEY_PRESSED && event.type() != ET_KEY_RELEASED)) return false; - XEvent* xevent = event.native_event(); - DCHECK(xevent); - KeySym keysym = NoSymbol; - ::XLookupString(&xevent->xkey, NULL, 0, &keysym, NULL); - - return FilterKeyPressInternal(keysym, xevent->xkey.keycode, event.flags()); + return FilterKeyPressInternal(keyval, event.key_code(), event.flags()); } @@ -507,7 +497,7 @@ bool CharacterComposer::FilterKeyPressHexMode(unsigned int keyval, // have intended to type '3'. So, if a hexadecimal character was not found, // suppose a user is holding shift key (and possibly control key, too) and // try a character with modifier keys removed. - hex_digit = KeyvalToHexDigit(XKeyCodeToXKeySym(keycode)); + hex_digit = KeycodeToHexDigit(keycode); } if (keyval == GDK_KEY_Escape) { @@ -561,7 +551,7 @@ void CharacterComposer::UpdatePreeditStringHexMode() { DCHECK(0 <= digit && digit < 16); preedit_string_ascii += digit <= 9 ? ('0' + digit) : ('a' + (digit - 10)); } - preedit_string_ = ASCIIToUTF16(preedit_string_ascii); + preedit_string_ = base::ASCIIToUTF16(preedit_string_ascii); } } // namespace ui diff --git a/chromium/ui/base/ime/chromeos/character_composer.h b/chromium/ui/base/ime/chromeos/character_composer.h index 0624eb55c68..5d4267f384f 100644 --- a/chromium/ui/base/ime/chromeos/character_composer.h +++ b/chromium/ui/base/ime/chromeos/character_composer.h @@ -8,14 +8,14 @@ #include <vector> #include "base/strings/string_util.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { class KeyEvent; // A class to recognize compose and dead key sequence. // Outputs composed character. -class UI_EXPORT CharacterComposer { +class UI_BASE_EXPORT CharacterComposer { public: CharacterComposer(); ~CharacterComposer(); @@ -30,10 +30,12 @@ class UI_EXPORT CharacterComposer { // Returns a string consisting of composed character. // Empty string is returned when there is no composition result. - const string16& composed_character() const { return composed_character_; } + const base::string16& composed_character() const { + return composed_character_; + } // Returns the preedit string. - const string16& preedit_string() const { return preedit_string_; } + const base::string16& preedit_string() const { return preedit_string_; } private: friend class CharacterComposerTest; @@ -85,10 +87,10 @@ class UI_EXPORT CharacterComposer { std::vector<unsigned int> compose_buffer_; // A string representing the composed character. - string16 composed_character_; + base::string16 composed_character_; // Preedit string. - string16 preedit_string_; + base::string16 preedit_string_; // Composition mode which this instance is in. CompositionMode composition_mode_; diff --git a/chromium/ui/base/ime/chromeos/character_composer_unittest.cc b/chromium/ui/base/ime/chromeos/character_composer_unittest.cc index 4e5d7f88382..208b51f7b34 100644 --- a/chromium/ui/base/ime/chromeos/character_composer_unittest.cc +++ b/chromium/ui/base/ime/chromeos/character_composer_unittest.cc @@ -9,6 +9,9 @@ #include "third_party/gtk+/gdk/gdkkeysyms.h" #include "ui/base/glib/glib_integers.h" #include "ui/events/event_constants.h" +#include "ui/events/keycodes/keyboard_codes.h" + +using base::ASCIIToUTF16; namespace ui { @@ -60,7 +63,7 @@ class CharacterComposerTest : public testing::Test { uint key1, uint key2, int flags, - const string16& expected_character) { + const base::string16& expected_character) { ExpectKeyFiltered(character_composer, key1, flags); EXPECT_TRUE(character_composer->FilterKeyPressInternal(key2, 0, flags)); EXPECT_EQ(expected_character, character_composer->composed_character()); @@ -72,7 +75,7 @@ class CharacterComposerTest : public testing::Test { uint key2, uint key3, int flags, - const string16& expected_character) { + const base::string16& expected_character) { ExpectKeyFiltered(character_composer, key1, flags); ExpectCharacterComposed(character_composer, key2, key3, flags, expected_character); @@ -86,7 +89,7 @@ class CharacterComposerTest : public testing::Test { uint key3, uint key4, int flags, - const string16& expected_character) { + const base::string16& expected_character) { ExpectKeyFiltered(character_composer, key1, flags); ExpectCharacterComposed(character_composer, key2, key3, key4, flags, expected_character); @@ -101,7 +104,7 @@ class CharacterComposerTest : public testing::Test { uint key4, uint key5, int flags, - const string16& expected_character) { + const base::string16& expected_character) { ExpectKeyFiltered(character_composer, key1, flags); ExpectCharacterComposed(character_composer, key2, key3, key4, key5, flags, expected_character); @@ -117,17 +120,18 @@ class CharacterComposerTest : public testing::Test { uint key5, uint key6, int flags, - const string16& expected_character) { + const base::string16& expected_character) { ExpectKeyFiltered(character_composer, key1, flags); ExpectCharacterComposed(character_composer, key2, key3, key4, key5, key6, flags, expected_character); } // Expects |expected_character| is composed after sequence [{key1, keycode1}]. - void ExpectCharacterComposedWithKeyCode(CharacterComposer* character_composer, - uint key1, uint keycode1, - int flags, - const string16& expected_character) { + void ExpectCharacterComposedWithKeyCode( + CharacterComposer* character_composer, + uint key1, uint keycode1, + int flags, + const base::string16& expected_character) { EXPECT_TRUE(character_composer->FilterKeyPressInternal(key1, keycode1, flags)); EXPECT_EQ(expected_character, character_composer->composed_character()); @@ -167,26 +171,27 @@ TEST_F(CharacterComposerTest, FullyMatchingSequences) { CharacterComposer character_composer; // LATIN SMALL LETTER A WITH ACUTE ExpectCharacterComposed(&character_composer, GDK_KEY_dead_acute, GDK_KEY_a, 0, - string16(1, 0x00E1)); + base::string16(1, 0x00E1)); // LATIN CAPITAL LETTER A WITH ACUTE ExpectCharacterComposed(&character_composer, GDK_KEY_dead_acute, GDK_KEY_A, 0, - string16(1, 0x00C1)); + base::string16(1, 0x00C1)); // GRAVE ACCENT ExpectCharacterComposed(&character_composer, GDK_KEY_dead_grave, - GDK_KEY_dead_grave, 0, string16(1, 0x0060)); + GDK_KEY_dead_grave, 0, base::string16(1, 0x0060)); // LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE ExpectCharacterComposed(&character_composer, GDK_KEY_dead_acute, GDK_KEY_dead_circumflex, GDK_KEY_a, 0, - string16(1, 0x1EA5)); + base::string16(1, 0x1EA5)); // LATIN CAPITAL LETTER U WITH HORN AND GRAVE ExpectCharacterComposed(&character_composer, GDK_KEY_dead_grave, - GDK_KEY_dead_horn, GDK_KEY_U, 0, string16(1, 0x1EEA)); + GDK_KEY_dead_horn, GDK_KEY_U, 0, + base::string16(1, 0x1EEA)); // LATIN CAPITAL LETTER C WITH CEDILLA ExpectCharacterComposed(&character_composer, GDK_KEY_dead_acute, GDK_KEY_C, 0, - string16(1, 0x00C7)); + base::string16(1, 0x00C7)); // LATIN SMALL LETTER C WITH CEDILLA ExpectCharacterComposed(&character_composer, GDK_KEY_dead_acute, GDK_KEY_c, 0, - string16(1, 0x00E7)); + base::string16(1, 0x00E7)); } TEST_F(CharacterComposerTest, FullyMatchingSequencesAfterMatchingFailure) { @@ -198,13 +203,13 @@ TEST_F(CharacterComposerTest, FullyMatchingSequencesAfterMatchingFailure) { // LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE ExpectCharacterComposed(&character_composer, GDK_KEY_dead_acute, GDK_KEY_dead_circumflex, GDK_KEY_a, 0, - string16(1, 0x1EA5)); + base::string16(1, 0x1EA5)); } TEST_F(CharacterComposerTest, ComposedCharacterIsClearedAfterReset) { CharacterComposer character_composer; ExpectCharacterComposed(&character_composer, GDK_KEY_dead_acute, GDK_KEY_a, 0, - string16(1, 0x00E1)); + base::string16(1, 0x00E1)); character_composer.Reset(); EXPECT_TRUE(character_composer.composed_character().empty()); } @@ -225,7 +230,7 @@ TEST_F(CharacterComposerTest, KeySequenceCompositionPreedit) { ExpectKeyFiltered(&character_composer, GDK_KEY_dead_acute, 0); EXPECT_TRUE(character_composer.preedit_string().empty()); EXPECT_TRUE(FilterKeyPress(&character_composer, GDK_KEY_a, 0, 0)); - EXPECT_EQ(string16(1, 0x00E1), character_composer.composed_character()); + EXPECT_EQ(base::string16(1, 0x00E1), character_composer.composed_character()); EXPECT_TRUE(character_composer.preedit_string().empty()); } @@ -281,14 +286,15 @@ TEST_F(CharacterComposerTest, HexadecimalComposition) { ExpectKeyFiltered(&character_composer, GDK_KEY_U, EF_SHIFT_DOWN | EF_CONTROL_DOWN); ExpectCharacterComposed(&character_composer, GDK_KEY_3, GDK_KEY_0, GDK_KEY_4, - GDK_KEY_2, GDK_KEY_space, 0, string16(1, 0x3042)); + GDK_KEY_2, GDK_KEY_space, 0, + base::string16(1, 0x3042)); // MUSICAL KEYBOARD (U+1F3B9) - const char16 kMusicalKeyboard[] = {0xd83c, 0xdfb9}; + const base::char16 kMusicalKeyboard[] = {0xd83c, 0xdfb9}; ExpectKeyFiltered(&character_composer, GDK_KEY_U, EF_SHIFT_DOWN | EF_CONTROL_DOWN); ExpectCharacterComposed(&character_composer, GDK_KEY_1, GDK_KEY_f, GDK_KEY_3, GDK_KEY_b, GDK_KEY_9, GDK_KEY_Return, 0, - string16(kMusicalKeyboard, + base::string16(kMusicalKeyboard, kMusicalKeyboard + arraysize(kMusicalKeyboard))); } @@ -310,7 +316,7 @@ TEST_F(CharacterComposerTest, HexadecimalCompositionPreedit) { ExpectKeyFiltered(&character_composer, GDK_KEY_BackSpace, 0); EXPECT_EQ(ASCIIToUTF16("u304"), character_composer.preedit_string()); ExpectCharacterComposed(&character_composer, GDK_KEY_2, GDK_KEY_Return, 0, - string16(1, 0x3042)); + base::string16(1, 0x3042)); EXPECT_EQ(ASCIIToUTF16(""), character_composer.preedit_string()); // Sequence with an ignored character ('x') and Escape. @@ -346,7 +352,7 @@ TEST_F(CharacterComposerTest, HexadecimalCompositionWithNonHexKey) { EF_SHIFT_DOWN | EF_CONTROL_DOWN); ExpectCharacterComposed(&character_composer, GDK_KEY_3, GDK_KEY_0, GDK_KEY_x, GDK_KEY_4, GDK_KEY_2, GDK_KEY_space, 0, - string16(1, 0x3042)); + base::string16(1, 0x3042)); } TEST_F(CharacterComposerTest, HexadecimalCompositionWithAdditionalModifiers) { @@ -357,7 +363,8 @@ TEST_F(CharacterComposerTest, HexadecimalCompositionWithAdditionalModifiers) { ExpectKeyFiltered(&character_composer, GDK_KEY_U, EF_SHIFT_DOWN | EF_CONTROL_DOWN | EF_ALT_DOWN); ExpectCharacterComposed(&character_composer, GDK_KEY_3, GDK_KEY_0, GDK_KEY_4, - GDK_KEY_2, GDK_KEY_space, 0, string16(1, 0x3042)); + GDK_KEY_2, GDK_KEY_space, 0, + base::string16(1, 0x3042)); // Ctrl+Shift+u (CapsLock enabled) ExpectKeyNotFiltered(&character_composer, GDK_KEY_u, @@ -378,7 +385,8 @@ TEST_F(CharacterComposerTest, CancelHexadecimalComposition) { ExpectKeyFiltered(&character_composer, GDK_KEY_U, EF_SHIFT_DOWN | EF_CONTROL_DOWN); ExpectCharacterComposed(&character_composer, GDK_KEY_3, GDK_KEY_0, GDK_KEY_4, - GDK_KEY_2, GDK_KEY_space, 0, string16(1, 0x3042)); + GDK_KEY_2, GDK_KEY_space, 0, + base::string16(1, 0x3042)); } TEST_F(CharacterComposerTest, HexadecimalCompositionWithBackspace) { @@ -391,7 +399,7 @@ TEST_F(CharacterComposerTest, HexadecimalCompositionWithBackspace) { ExpectKeyFiltered(&character_composer, GDK_KEY_f, 0); ExpectKeyFiltered(&character_composer, GDK_KEY_BackSpace, 0); ExpectCharacterComposed(&character_composer, GDK_KEY_4, GDK_KEY_2, - GDK_KEY_space, 0, string16(1, 0x3042)); + GDK_KEY_space, 0, base::string16(1, 0x3042)); } TEST_F(CharacterComposerTest, CancelHexadecimalCompositionWithBackspace) { @@ -419,53 +427,53 @@ TEST_F(CharacterComposerTest, HexadecimalCompositionPreeditWithModifierPressed) const int control_shift = EF_CONTROL_DOWN | EF_SHIFT_DOWN; // HIRAGANA LETTER A (U+3042) ExpectKeyFilteredWithKeycode(&character_composer, - GDK_KEY_U, 30, control_shift); + GDK_KEY_U, ui::VKEY_U, control_shift); EXPECT_EQ(ASCIIToUTF16("u"), character_composer.preedit_string()); ExpectKeyFilteredWithKeycode(&character_composer, - GDK_KEY_numbersign, 12, control_shift); + GDK_KEY_numbersign, ui::VKEY_3, control_shift); EXPECT_EQ(ASCIIToUTF16("u3"), character_composer.preedit_string()); ExpectKeyFilteredWithKeycode(&character_composer, - GDK_KEY_parenright, 19, control_shift); + GDK_KEY_parenright, ui::VKEY_0, control_shift); EXPECT_EQ(ASCIIToUTF16("u30"), character_composer.preedit_string()); ExpectKeyFilteredWithKeycode(&character_composer, - GDK_KEY_dollar, 13, control_shift); + GDK_KEY_dollar, ui::VKEY_4, control_shift); EXPECT_EQ(ASCIIToUTF16("u304"), character_composer.preedit_string()); ExpectKeyFilteredWithKeycode(&character_composer, - GDK_KEY_A, 38, control_shift); + GDK_KEY_A, ui::VKEY_A, control_shift); EXPECT_EQ(ASCIIToUTF16("u304a"), character_composer.preedit_string()); ExpectKeyFilteredWithKeycode(&character_composer, - GDK_KEY_BackSpace, 22, control_shift); + GDK_KEY_BackSpace, ui::VKEY_BACK, control_shift); EXPECT_EQ(ASCIIToUTF16("u304"), character_composer.preedit_string()); ExpectKeyFilteredWithKeycode(&character_composer, - GDK_KEY_at, 11, control_shift); + GDK_KEY_at, ui::VKEY_2, control_shift); EXPECT_EQ(ASCIIToUTF16("u3042"), character_composer.preedit_string()); ExpectCharacterComposedWithKeyCode(&character_composer, - GDK_KEY_Return, 36, + GDK_KEY_Return, ui::VKEY_RETURN, control_shift, - string16(1, 0x3042)); + base::string16(1, 0x3042)); EXPECT_EQ(ASCIIToUTF16(""), character_composer.preedit_string()); // Sequence with an ignored character (control + shift + 'x') and Escape. ExpectKeyFilteredWithKeycode(&character_composer, - GDK_KEY_U, 30, control_shift); + GDK_KEY_U, ui::VKEY_U, control_shift); EXPECT_EQ(ASCIIToUTF16("u"), character_composer.preedit_string()); ExpectKeyFilteredWithKeycode(&character_composer, - GDK_KEY_numbersign, 12, control_shift); + GDK_KEY_numbersign, ui::VKEY_3, control_shift); EXPECT_EQ(ASCIIToUTF16("u3"), character_composer.preedit_string()); ExpectKeyFilteredWithKeycode(&character_composer, - GDK_KEY_parenright, 19, control_shift); + GDK_KEY_parenright, ui::VKEY_0, control_shift); EXPECT_EQ(ASCIIToUTF16("u30"), character_composer.preedit_string()); ExpectKeyFilteredWithKeycode(&character_composer, - GDK_KEY_X, 53, control_shift); + GDK_KEY_X, ui::VKEY_X, control_shift); EXPECT_EQ(ASCIIToUTF16("u30"), character_composer.preedit_string()); ExpectKeyFilteredWithKeycode(&character_composer, - GDK_KEY_dollar, 13, control_shift); + GDK_KEY_dollar, ui::VKEY_4, control_shift); EXPECT_EQ(ASCIIToUTF16("u304"), character_composer.preedit_string()); ExpectKeyFilteredWithKeycode(&character_composer, - GDK_KEY_at, 11, control_shift); + GDK_KEY_at, ui::VKEY_2, control_shift); EXPECT_EQ(ASCIIToUTF16("u3042"), character_composer.preedit_string()); ExpectKeyFilteredWithKeycode(&character_composer, - GDK_KEY_Escape, 9, control_shift); + GDK_KEY_Escape, ui::VKEY_ESCAPE, control_shift); EXPECT_EQ(ASCIIToUTF16(""), character_composer.preedit_string()); } @@ -509,18 +517,18 @@ TEST_F(CharacterComposerTest, HexadecimalSequenceAndDeadKey) { CharacterComposer character_composer; // LATIN SMALL LETTER A WITH ACUTE ExpectCharacterComposed(&character_composer, GDK_KEY_dead_acute, GDK_KEY_a, 0, - string16(1, 0x00E1)); + base::string16(1, 0x00E1)); // HIRAGANA LETTER A (U+3042) with dead_acute ignored. ExpectKeyFiltered(&character_composer, GDK_KEY_U, EF_SHIFT_DOWN | EF_CONTROL_DOWN); ExpectCharacterComposed(&character_composer, GDK_KEY_3, GDK_KEY_0, GDK_KEY_dead_acute, GDK_KEY_4, GDK_KEY_2, - GDK_KEY_space, 0, string16(1, 0x3042)); + GDK_KEY_space, 0, base::string16(1, 0x3042)); // LATIN CAPITAL LETTER U WITH ACUTE while 'U' is pressed with Ctrl+Shift. ExpectKeyFiltered(&character_composer, GDK_KEY_dead_acute, 0); EXPECT_TRUE(FilterKeyPress(&character_composer, GDK_KEY_U, 0, EF_SHIFT_DOWN | EF_CONTROL_DOWN)); - EXPECT_EQ(string16(1, 0x00DA), character_composer.composed_character()); + EXPECT_EQ(base::string16(1, 0x00DA), character_composer.composed_character()); } TEST_F(CharacterComposerTest, BlacklistedKeyeventsTest) { diff --git a/chromium/ui/base/ime/chromeos/ibus_bridge.cc b/chromium/ui/base/ime/chromeos/ibus_bridge.cc deleted file mode 100644 index bf10ebeaf92..00000000000 --- a/chromium/ui/base/ime/chromeos/ibus_bridge.cc +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/ime/chromeos/ibus_bridge.h" - -#include <map> -#include "base/logging.h" -#include "base/memory/singleton.h" - -namespace chromeos { - -static IBusBridge* g_ibus_bridge = NULL; - -// An implementation of IBusBridge. -class IBusBridgeImpl : public IBusBridge { - public: - IBusBridgeImpl() - : input_context_handler_(NULL), - engine_handler_(NULL), - candidate_window_handler_(NULL) { - } - - virtual ~IBusBridgeImpl() { - } - - // IBusBridge override. - virtual IBusInputContextHandlerInterface* - GetInputContextHandler() const OVERRIDE { - return input_context_handler_; - } - - // IBusBridge override. - virtual void SetInputContextHandler( - IBusInputContextHandlerInterface* handler) OVERRIDE { - input_context_handler_ = handler; - } - - // IBusBridge override. - virtual void SetEngineHandler( - const std::string& engine_id, - IBusEngineHandlerInterface* handler) OVERRIDE { - DCHECK(!engine_id.empty()); - DCHECK(handler); - engine_handler_map_[engine_id] = handler; - } - - // IBusBridge override. - virtual IBusEngineHandlerInterface* GetEngineHandler( - const std::string& engine_id) OVERRIDE { - if (engine_id.empty() || - engine_handler_map_.find(engine_id) == engine_handler_map_.end()) { - return NULL; - } - return engine_handler_map_[engine_id]; - } - - // IBusBridge override. - virtual void SetCurrentEngineHandler( - IBusEngineHandlerInterface* handler) OVERRIDE { - engine_handler_ = handler; - } - - // IBusBridge override. - virtual IBusEngineHandlerInterface* SetCurrentEngineHandlerById( - const std::string& engine_id) OVERRIDE { - if (engine_id.empty()) { - engine_handler_ = NULL; - return NULL; - } - - DCHECK(engine_handler_map_.find(engine_id) != engine_handler_map_.end()); - engine_handler_ = engine_handler_map_[engine_id]; - return engine_handler_; - } - - // IBusBridge override. - virtual IBusEngineHandlerInterface* GetCurrentEngineHandler() const OVERRIDE { - return engine_handler_; - } - - // IBusBridge override. - virtual IBusPanelCandidateWindowHandlerInterface* - GetCandidateWindowHandler() const OVERRIDE { - return candidate_window_handler_; - } - - // IBusBridge override. - virtual void SetCandidateWindowHandler( - IBusPanelCandidateWindowHandlerInterface* handler) OVERRIDE { - candidate_window_handler_ = handler; - } - - private: - IBusInputContextHandlerInterface* input_context_handler_; - IBusEngineHandlerInterface* engine_handler_; - IBusPanelCandidateWindowHandlerInterface* candidate_window_handler_; - std::map<std::string, IBusEngineHandlerInterface*> engine_handler_map_; - - DISALLOW_COPY_AND_ASSIGN(IBusBridgeImpl); -}; - -/////////////////////////////////////////////////////////////////////////////// -// IBusBridge -IBusBridge::IBusBridge() { -} - -IBusBridge::~IBusBridge() { -} - -// static. -void IBusBridge::Initialize() { - if (!g_ibus_bridge) - g_ibus_bridge = new IBusBridgeImpl(); -} - -// static. -void IBusBridge::Shutdown() { - delete g_ibus_bridge; - g_ibus_bridge = NULL; -} - -// static. -IBusBridge* IBusBridge::Get() { - return g_ibus_bridge; -} - -} // namespace chromeos diff --git a/chromium/ui/base/ime/chromeos/ime_bridge.cc b/chromium/ui/base/ime/chromeos/ime_bridge.cc new file mode 100644 index 00000000000..49d0f73df3c --- /dev/null +++ b/chromium/ui/base/ime/chromeos/ime_bridge.cc @@ -0,0 +1,107 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/ime/chromeos/ime_bridge.h" + +#include <map> +#include "base/logging.h" +#include "base/memory/singleton.h" + +namespace chromeos { + +static IMEBridge* g_ime_bridge = NULL; + +// An implementation of IMEBridge. +class IMEBridgeImpl : public IMEBridge { + public: + IMEBridgeImpl() + : input_context_handler_(NULL), + engine_handler_(NULL), + candidate_window_handler_(NULL), + current_text_input_(ui::TEXT_INPUT_TYPE_NONE) { + } + + virtual ~IMEBridgeImpl() { + } + + // IMEBridge override. + virtual IMEInputContextHandlerInterface* + GetInputContextHandler() const OVERRIDE { + return input_context_handler_; + } + + // IMEBridge override. + virtual void SetInputContextHandler( + IMEInputContextHandlerInterface* handler) OVERRIDE { + input_context_handler_ = handler; + } + + // IMEBridge override. + virtual void SetCurrentEngineHandler( + IMEEngineHandlerInterface* handler) OVERRIDE { + engine_handler_ = handler; + } + + // IMEBridge override. + virtual IMEEngineHandlerInterface* GetCurrentEngineHandler() const OVERRIDE { + return engine_handler_; + } + + // IMEBridge override. + virtual IMECandidateWindowHandlerInterface* GetCandidateWindowHandler() const + OVERRIDE { + return candidate_window_handler_; + } + + // IMEBridge override. + virtual void SetCandidateWindowHandler( + IMECandidateWindowHandlerInterface* handler) OVERRIDE { + candidate_window_handler_ = handler; + } + + // IMEBridge override. + virtual void SetCurrentTextInputType(ui::TextInputType input_type) OVERRIDE { + current_text_input_ = input_type; + } + + // IMEBridge override. + virtual ui::TextInputType GetCurrentTextInputType() const OVERRIDE { + return current_text_input_; + } + + private: + IMEInputContextHandlerInterface* input_context_handler_; + IMEEngineHandlerInterface* engine_handler_; + IMECandidateWindowHandlerInterface* candidate_window_handler_; + ui::TextInputType current_text_input_; + + DISALLOW_COPY_AND_ASSIGN(IMEBridgeImpl); +}; + +/////////////////////////////////////////////////////////////////////////////// +// IMEBridge +IMEBridge::IMEBridge() { +} + +IMEBridge::~IMEBridge() { +} + +// static. +void IMEBridge::Initialize() { + if (!g_ime_bridge) + g_ime_bridge = new IMEBridgeImpl(); +} + +// static. +void IMEBridge::Shutdown() { + delete g_ime_bridge; + g_ime_bridge = NULL; +} + +// static. +IMEBridge* IMEBridge::Get() { + return g_ime_bridge; +} + +} // namespace chromeos diff --git a/chromium/ui/base/ime/chromeos/ibus_bridge.h b/chromium/ui/base/ime/chromeos/ime_bridge.h index 6cac4c01389..2464f3ff89f 100644 --- a/chromium/ui/base/ime/chromeos/ibus_bridge.h +++ b/chromium/ui/base/ime/chromeos/ime_bridge.h @@ -1,42 +1,40 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// TODO(nona): Rename this file to ime_bridge.h -#ifndef UI_BASE_IME_CHROMEOS_IBUS_BRIDGE_H_ -#define UI_BASE_IME_CHROMEOS_IBUS_BRIDGE_H_ +#ifndef UI_BASE_IME_CHROMEOS_IME_BRIDGE_H_ +#define UI_BASE_IME_CHROMEOS_IME_BRIDGE_H_ #include <string> #include "base/basictypes.h" #include "base/callback.h" +#include "base/strings/string16.h" #include "ui/base/ime/text_input_mode.h" #include "ui/base/ime/text_input_type.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace gfx { class Rect; } // namespace gfx namespace ui { +class CandidateWindow; class KeyEvent; } // namespace ui namespace chromeos { -namespace input_method { -class CandidateWindow; -} // namespace input_method -class IBusText; +class CompositionText; -class UI_EXPORT IBusInputContextHandlerInterface { +class UI_BASE_EXPORT IMEInputContextHandlerInterface { public: // Called when the engine commit a text. virtual void CommitText(const std::string& text) = 0; - // Called when the engine update preedit stroing. - virtual void UpdatePreeditText(const IBusText& text, - uint32 cursor_pos, - bool visible) = 0; + // Called when the engine updates composition text. + virtual void UpdateCompositionText(const CompositionText& text, + uint32 cursor_pos, + bool visible) = 0; // Called when the engine request deleting surrounding string. virtual void DeleteSurroundingText(int32 offset, uint32 length) = 0; @@ -44,7 +42,7 @@ class UI_EXPORT IBusInputContextHandlerInterface { // A interface to handle the engine handler method call. -class UI_EXPORT IBusEngineHandlerInterface { +class UI_BASE_EXPORT IMEEngineHandlerInterface { public: typedef base::Callback<void (bool consumed)> KeyEventDoneCallback; @@ -65,7 +63,7 @@ class UI_EXPORT IBusEngineHandlerInterface { ui::TextInputMode mode; }; - virtual ~IBusEngineHandlerInterface() {} + virtual ~IMEEngineHandlerInterface() {} // Called when the Chrome input field get the focus. virtual void FocusIn(const InputContext& input_context) = 0; @@ -102,26 +100,22 @@ class UI_EXPORT IBusEngineHandlerInterface { uint32 anchor_pos) = 0; protected: - IBusEngineHandlerInterface() {} + IMEEngineHandlerInterface() {} }; // A interface to handle the candidate window related method call. -class UI_EXPORT IBusPanelCandidateWindowHandlerInterface { +class UI_BASE_EXPORT IMECandidateWindowHandlerInterface { public: - virtual ~IBusPanelCandidateWindowHandlerInterface() {} + virtual ~IMECandidateWindowHandlerInterface() {} // Called when the IME updates the lookup table. - virtual void UpdateLookupTable( - const input_method::CandidateWindow& candidate_window, - bool visible) = 0; - - // Called when the IME updates the auxiliary text. The |text| is given in - // UTF-8 encoding. - virtual void UpdateAuxiliaryText(const std::string& text, bool visible) = 0; + virtual void UpdateLookupTable(const ui::CandidateWindow& candidate_window, + bool visible) = 0; // Called when the IME updates the preedit text. The |text| is given in - // UTF-8 encoding. - virtual void UpdatePreeditText(const std::string& text, uint32 cursor_pos, + // UTF-16 encoding. + virtual void UpdatePreeditText(const base::string16& text, + uint32 cursor_pos, bool visible) = 0; // Called when the application changes its caret bounds. @@ -133,18 +127,15 @@ class UI_EXPORT IBusPanelCandidateWindowHandlerInterface { virtual void FocusStateChanged(bool is_focused) {} protected: - IBusPanelCandidateWindowHandlerInterface() {} + IMECandidateWindowHandlerInterface() {} }; -// IBusBridge provides access of each IME related handler. This class is used -// for IME implementation without ibus-daemon. The legacy ibus IME communicates -// their engine with dbus protocol, but new implementation doesn't. Instead of -// dbus communcation, new implementation calls target service(e.g. PanelService -// or EngineService) directly by using this class. -class UI_EXPORT IBusBridge { +// IMEBridge provides access of each IME related handler. This class +// is used for IME implementation. +class UI_BASE_EXPORT IMEBridge { public: - virtual ~IBusBridge(); + virtual ~IMEBridge(); // Allocates the global instance. Must be called before any calls to Get(). static void Initialize(); @@ -152,60 +143,49 @@ class UI_EXPORT IBusBridge { // Releases the global instance. static void Shutdown(); - // Returns IBusBridge global instance. Initialize() must be called first. - static IBusBridge* Get(); + // Returns IMEBridge global instance. Initialize() must be called first. + static IMEBridge* Get(); // Returns current InputContextHandler. This function returns NULL if input // context is not ready to use. - virtual IBusInputContextHandlerInterface* GetInputContextHandler() const = 0; + virtual IMEInputContextHandlerInterface* GetInputContextHandler() const = 0; // Updates current InputContextHandler. If there is no active input context, // pass NULL for |handler|. Caller must release |handler|. virtual void SetInputContextHandler( - IBusInputContextHandlerInterface* handler) = 0; - - // Initializes the mapping from |engine_id| to |handler|. - // |engine_id| must not be empty and |handler| must not be null. - virtual void SetEngineHandler( - const std::string& engine_id, - IBusEngineHandlerInterface* handler) = 0; - - // Returns IBusEngineHandlerInterface* mapped by |engine_id|. NULL is - // returned if |engine_id| is not mapped any engines. - virtual IBusEngineHandlerInterface* GetEngineHandler( - const std::string& engine_id) = 0; + IMEInputContextHandlerInterface* handler) = 0; // Updates current EngineHandler. If there is no active engine service, pass // NULL for |handler|. Caller must release |handler|. - virtual void SetCurrentEngineHandler(IBusEngineHandlerInterface* handler) = 0; - - // Updates current EngineHandler by Engine ID. If there is no active - // engine service, pass an empty string for |engine_id|. The set - // IBusEngineHandlerInterface is returned. - virtual IBusEngineHandlerInterface* SetCurrentEngineHandlerById( - const std::string& engine_id) = 0; + virtual void SetCurrentEngineHandler(IMEEngineHandlerInterface* handler) = 0; // Returns current EngineHandler. This function returns NULL if current engine // is not ready to use. - virtual IBusEngineHandlerInterface* GetCurrentEngineHandler() const = 0; + virtual IMEEngineHandlerInterface* GetCurrentEngineHandler() const = 0; // Returns current CandidateWindowHandler. This function returns NULL if // current candidate window is not ready to use. - virtual IBusPanelCandidateWindowHandlerInterface* - GetCandidateWindowHandler() const = 0; + virtual IMECandidateWindowHandlerInterface* GetCandidateWindowHandler() + const = 0; // Updates current CandidatWindowHandler. If there is no active candidate // window service, pass NULL for |handler|. Caller must release |handler|. virtual void SetCandidateWindowHandler( - IBusPanelCandidateWindowHandlerInterface* handler) = 0; + IMECandidateWindowHandlerInterface* handler) = 0; + + // Updates current text input type. + virtual void SetCurrentTextInputType(ui::TextInputType input_type) = 0; + + // Returns the current text input type. + virtual ui::TextInputType GetCurrentTextInputType() const = 0; protected: - IBusBridge(); + IMEBridge(); private: - DISALLOW_COPY_AND_ASSIGN(IBusBridge); + DISALLOW_COPY_AND_ASSIGN(IMEBridge); }; } // namespace chromeos -#endif // UI_BASE_IME_CHROMEOS_IBUS_BRIDGE_H_ +#endif // UI_BASE_IME_CHROMEOS_IME_BRIDGE_H_ diff --git a/chromium/ui/base/ime/chromeos/ime_keymap.cc b/chromium/ui/base/ime/chromeos/ime_keymap.cc new file mode 100644 index 00000000000..c6686094a44 --- /dev/null +++ b/chromium/ui/base/ime/chromeos/ime_keymap.cc @@ -0,0 +1,180 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/ime/chromeos/ime_keymap.h" + +#include <map> + +#include "base/lazy_instance.h" + +namespace ui { + +namespace { + +const struct KeyCodeTable { + KeyboardCode keyboard_code; + const char* dom_code; +} kKeyCodeTable[] = { + {VKEY_BACK, "Backspace"}, + {VKEY_TAB, "Tab"}, + {VKEY_RETURN, "Enter"}, + {VKEY_MENU, "ContextMenu"}, + {VKEY_PAUSE, "Pause"}, + {VKEY_CAPITAL, "CapsLock"}, + {VKEY_KANA, "KanaMode"}, + {VKEY_HANGUL, "HangulMode"}, + {VKEY_HANJA, "Hanja"}, + {VKEY_KANJI, "Kanji"}, + {VKEY_ESCAPE, "Escape"}, + {VKEY_CONVERT, "Convert"}, + {VKEY_NONCONVERT, "NoConvert"}, + {VKEY_SPACE, "Space"}, + {VKEY_END, "End"}, + {VKEY_HOME, "Home"}, + {VKEY_LEFT, "ArrowLeft"}, + {VKEY_UP, "ArrowUp"}, + {VKEY_RIGHT, "ArrowRight"}, + {VKEY_DOWN, "ArrowDown"}, + {VKEY_PRINT, "PrintScreen"}, + {VKEY_INSERT, "Insert"}, + {VKEY_DELETE, "Delete"}, + {VKEY_HELP, "Help"}, + {VKEY_0, "Digit0"}, + {VKEY_1, "Digit1"}, + {VKEY_2, "Digit2"}, + {VKEY_3, "Digit3"}, + {VKEY_4, "Digit4"}, + {VKEY_5, "Digit5"}, + {VKEY_6, "Digit6"}, + {VKEY_7, "Digit7"}, + {VKEY_8, "Digit8"}, + {VKEY_9, "Digit9"}, + {VKEY_A, "KeyA"}, + {VKEY_B, "KeyB"}, + {VKEY_C, "KeyC"}, + {VKEY_D, "KeyD"}, + {VKEY_E, "KeyE"}, + {VKEY_F, "KeyF"}, + {VKEY_G, "KeyG"}, + {VKEY_H, "KeyH"}, + {VKEY_I, "KeyI"}, + {VKEY_J, "KeyJ"}, + {VKEY_K, "KeyK"}, + {VKEY_L, "KeyL"}, + {VKEY_M, "KeyM"}, + {VKEY_N, "KeyN"}, + {VKEY_O, "KeyO"}, + {VKEY_P, "KeyP"}, + {VKEY_Q, "KeyQ"}, + {VKEY_R, "KeyR"}, + {VKEY_S, "KeyS"}, + {VKEY_T, "KeyT"}, + {VKEY_U, "KeyU"}, + {VKEY_V, "KeyV"}, + {VKEY_W, "KeyW"}, + {VKEY_X, "KeyX"}, + {VKEY_Y, "KeyY"}, + {VKEY_Z, "KeyZ"}, + {VKEY_LWIN, "OSLeft"}, + {VKEY_RWIN, "OSRight"}, + {VKEY_NUMPAD0, "Numpad0"}, + {VKEY_NUMPAD1, "Numpad1"}, + {VKEY_NUMPAD2, "Numpad2"}, + {VKEY_NUMPAD3, "Numpad3"}, + {VKEY_NUMPAD4, "Numpad4"}, + {VKEY_NUMPAD5, "Numpad5"}, + {VKEY_NUMPAD6, "Numpad6"}, + {VKEY_NUMPAD7, "Numpad7"}, + {VKEY_NUMPAD8, "Numpad8"}, + {VKEY_NUMPAD9, "Numpad9"}, + {VKEY_MULTIPLY, "NumpadMultiply"}, + {VKEY_ADD, "NumpadAdd"}, + {VKEY_SUBTRACT, "NumpadSubtract"}, + {VKEY_DECIMAL, "NumpadDecimal"}, + {VKEY_DIVIDE, "NumpadDivide"}, + {VKEY_F1, "F1"}, + {VKEY_F2, "F2"}, + {VKEY_F3, "F3"}, + {VKEY_F4, "F4"}, + {VKEY_F5, "F5"}, + {VKEY_F6, "F6"}, + {VKEY_F7, "F7"}, + {VKEY_F8, "F8"}, + {VKEY_F9, "F9"}, + {VKEY_F10, "F10"}, + {VKEY_F11, "F11"}, + {VKEY_F12, "F12"}, + {VKEY_F13, "F13"}, + {VKEY_F14, "F14"}, + {VKEY_F15, "F15"}, + {VKEY_F16, "F16"}, + {VKEY_F17, "F17"}, + {VKEY_F18, "F18"}, + {VKEY_F19, "F19"}, + {VKEY_F20, "F20"}, + {VKEY_F21, "F21"}, + {VKEY_F22, "F22"}, + {VKEY_F23, "F23"}, + {VKEY_F24, "F24"}, + {VKEY_NUMLOCK, "NumLock"}, + {VKEY_SCROLL, "ScrollLock"}, + {VKEY_LSHIFT, "ShiftLeft"}, + {VKEY_RSHIFT, "ShiftRight"}, + {VKEY_LCONTROL, "CtrlLeft"}, + {VKEY_RCONTROL, "CtrlRight"}, + {VKEY_LMENU, "AltLeft"}, + {VKEY_RMENU, "AltRight"}, + {VKEY_BROWSER_BACK, "BrowserBack"}, + {VKEY_BROWSER_FORWARD, "BrowserForward"}, + {VKEY_BROWSER_REFRESH, "BrowserRefresh"}, + {VKEY_BROWSER_STOP, "BrowserStop"}, + {VKEY_BROWSER_SEARCH, "BrowserSearch"}, + {VKEY_BROWSER_HOME, "BrowserHome"}, + {VKEY_VOLUME_MUTE, "VolumeMute"}, + {VKEY_VOLUME_DOWN, "VolumeDown"}, + {VKEY_VOLUME_UP, "VolumeUp"}, + {VKEY_MEDIA_NEXT_TRACK, "MediaTrackNext"}, + {VKEY_MEDIA_PREV_TRACK, "MediaTrackPrevious"}, + {VKEY_MEDIA_STOP, "MediaStop"}, + {VKEY_MEDIA_PLAY_PAUSE, "MediaPlayPause"}, + {VKEY_MEDIA_LAUNCH_MAIL, "LaunchMail"}, + {VKEY_OEM_1, "Semicolon"}, + {VKEY_OEM_PLUS, "Equal"}, + {VKEY_OEM_COMMA, "Comma"}, + {VKEY_OEM_MINUS, "Minus"}, + {VKEY_OEM_PERIOD, "Period"}, + {VKEY_OEM_2, "Slash"}, + {VKEY_OEM_3, "Backquote"}, + {VKEY_OEM_4, "BracketLeft"}, + {VKEY_OEM_5, "Backslash"}, + {VKEY_OEM_6, "BracketRight"}, + {VKEY_OEM_7, "Quote"}}; + +class KeyCodeMap { + public: + KeyCodeMap() { + for (size_t i = 0; i < arraysize(kKeyCodeTable); ++i) + map_[kKeyCodeTable[i].dom_code] = kKeyCodeTable[i].keyboard_code; + } + + KeyboardCode GetKeyboardCode(const std::string& dom_code) const { + std::map<std::string, KeyboardCode>::const_iterator it = + map_.find(dom_code); + return (it == map_.end()) ? VKEY_UNKNOWN : it->second; + } + + private: + std::map<std::string, KeyboardCode> map_; +}; + +base::LazyInstance<KeyCodeMap>::Leaky g_keycode_map = + LAZY_INSTANCE_INITIALIZER; + +} // namespace + +KeyboardCode DomKeycodeToKeyboardCode(const std::string& code) { + return g_keycode_map.Get().GetKeyboardCode(code); +} + +} // namespace ui diff --git a/chromium/ui/base/ime/chromeos/ime_keymap.h b/chromium/ui/base/ime/chromeos/ime_keymap.h new file mode 100644 index 00000000000..7d41b3f323d --- /dev/null +++ b/chromium/ui/base/ime/chromeos/ime_keymap.h @@ -0,0 +1,20 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_IME_CHROMEOS_IME_KEYMAP_H_ +#define UI_BASE_IME_CHROMEOS_IME_KEYMAP_H_ + +#include <string> +#include "base/basictypes.h" +#include "ui/base/ui_base_export.h" +#include "ui/events/keycodes/keyboard_codes.h" + +namespace ui { + +// Translates the DOM4 key code string to ui::KeyboardCode. +UI_BASE_EXPORT KeyboardCode DomKeycodeToKeyboardCode(const std::string& code); + +} // namespace ui + +#endif // UI_BASE_IME_CHROMEOS_IME_KEYMAP_H_ diff --git a/chromium/ui/base/ime/chromeos/mock_ime_candidate_window_handler.cc b/chromium/ui/base/ime/chromeos/mock_ime_candidate_window_handler.cc index 7491643d312..6e6187657b4 100644 --- a/chromium/ui/base/ime/chromeos/mock_ime_candidate_window_handler.cc +++ b/chromium/ui/base/ime/chromeos/mock_ime_candidate_window_handler.cc @@ -8,8 +8,7 @@ namespace chromeos { MockIMECandidateWindowHandler::MockIMECandidateWindowHandler() : set_cursor_bounds_call_count_(0), - update_lookup_table_call_count_(0), - update_auxiliary_text_call_count_(0) { + update_lookup_table_call_count_(0) { } MockIMECandidateWindowHandler::~MockIMECandidateWindowHandler() { @@ -17,24 +16,17 @@ MockIMECandidateWindowHandler::~MockIMECandidateWindowHandler() { } void MockIMECandidateWindowHandler::UpdateLookupTable( - const input_method::CandidateWindow& table, + const ui::CandidateWindow& table, bool visible) { ++update_lookup_table_call_count_; last_update_lookup_table_arg_.lookup_table.CopyFrom(table); last_update_lookup_table_arg_.is_visible = visible; } -void MockIMECandidateWindowHandler::UpdateAuxiliaryText(const std::string& text, - bool visible) { - ++update_auxiliary_text_call_count_; - last_update_auxiliary_text_arg_.text = text; - last_update_auxiliary_text_arg_.is_visible = visible; -} - -void MockIMECandidateWindowHandler::UpdatePreeditText(const std::string& text, - uint32 cursor_pos, - bool visible) { -} +void MockIMECandidateWindowHandler::UpdatePreeditText( + const base::string16& text, + uint32 cursor_pos, + bool visible) {} void MockIMECandidateWindowHandler::SetCursorBounds( const gfx::Rect& cursor_bounds, @@ -45,7 +37,6 @@ void MockIMECandidateWindowHandler::SetCursorBounds( void MockIMECandidateWindowHandler::Reset() { set_cursor_bounds_call_count_ = 0; update_lookup_table_call_count_ = 0; - update_auxiliary_text_call_count_ = 0; } } // namespace chromeos diff --git a/chromium/ui/base/ime/chromeos/mock_ime_candidate_window_handler.h b/chromium/ui/base/ime/chromeos/mock_ime_candidate_window_handler.h index 5d03b12e485..a7705e32571 100644 --- a/chromium/ui/base/ime/chromeos/mock_ime_candidate_window_handler.h +++ b/chromium/ui/base/ime/chromeos/mock_ime_candidate_window_handler.h @@ -5,17 +5,17 @@ #ifndef UI_BASE_IME_CHROMEOS_MOCK_IME_CANDIDATE_WINDOW_HANDLER_H_ #define UI_BASE_IME_CHROMEOS_MOCK_IME_CANDIDATE_WINDOW_HANDLER_H_ -#include "chromeos/ime/candidate_window.h" -#include "ui/base/ime/chromeos/ibus_bridge.h" -#include "ui/base/ui_export.h" +#include "ui/base/ime/candidate_window.h" +#include "ui/base/ime/chromeos/ime_bridge.h" +#include "ui/base/ui_base_export.h" namespace chromeos { -class UI_EXPORT MockIMECandidateWindowHandler - : public IBusPanelCandidateWindowHandlerInterface { +class UI_BASE_EXPORT MockIMECandidateWindowHandler + : public IMECandidateWindowHandlerInterface { public: struct UpdateLookupTableArg { - input_method::CandidateWindow lookup_table; + ui::CandidateWindow lookup_table; bool is_visible; }; @@ -27,14 +27,12 @@ class UI_EXPORT MockIMECandidateWindowHandler MockIMECandidateWindowHandler(); virtual ~MockIMECandidateWindowHandler(); - // IBusPanelCandidateWindowHandlerInterface override. + // IMECandidateWindowHandlerInterface override. virtual void UpdateLookupTable( - const input_method::CandidateWindow& candidate_window, + const ui::CandidateWindow& candidate_window, bool visible) OVERRIDE; - virtual void UpdateAuxiliaryText(const std::string& text, - bool visible) OVERRIDE; - virtual void UpdatePreeditText(const std::string& text, uint32 cursor_pos, - bool visible) OVERRIDE; + virtual void UpdatePreeditText( + const base::string16& text, uint32 cursor_pos, bool visible) OVERRIDE; virtual void SetCursorBounds(const gfx::Rect& cursor_bounds, const gfx::Rect& composition_head) OVERRIDE; @@ -46,27 +44,16 @@ class UI_EXPORT MockIMECandidateWindowHandler return update_lookup_table_call_count_; } - int update_auxiliary_text_call_count() const { - return update_auxiliary_text_call_count_; - } - const UpdateLookupTableArg& last_update_lookup_table_arg() { return last_update_lookup_table_arg_; } - - const UpdateAuxiliaryTextArg& last_update_auxiliary_text_arg() { - return last_update_auxiliary_text_arg_; - } - // Resets all call count. void Reset(); private: int set_cursor_bounds_call_count_; int update_lookup_table_call_count_; - int update_auxiliary_text_call_count_; UpdateLookupTableArg last_update_lookup_table_arg_; - UpdateAuxiliaryTextArg last_update_auxiliary_text_arg_; }; } // namespace chromeos diff --git a/chromium/ui/base/ime/chromeos/mock_ime_engine_handler.cc b/chromium/ui/base/ime/chromeos/mock_ime_engine_handler.cc index f5e17238eed..000feef92b5 100644 --- a/chromium/ui/base/ime/chromeos/mock_ime_engine_handler.cc +++ b/chromium/ui/base/ime/chromeos/mock_ime_engine_handler.cc @@ -22,12 +22,15 @@ MockIMEEngineHandler::~MockIMEEngineHandler() { } void MockIMEEngineHandler::FocusIn(const InputContext& input_context) { - ++focus_in_call_count_; last_text_input_context_ = input_context; + if (last_text_input_context_.type != ui::TEXT_INPUT_TYPE_NONE) + ++focus_in_call_count_; } void MockIMEEngineHandler::FocusOut() { - ++focus_out_call_count_; + if (last_text_input_context_.type != ui::TEXT_INPUT_TYPE_NONE) + ++focus_out_call_count_; + last_text_input_context_.type = ui::TEXT_INPUT_TYPE_NONE; } void MockIMEEngineHandler::Enable() { diff --git a/chromium/ui/base/ime/chromeos/mock_ime_engine_handler.h b/chromium/ui/base/ime/chromeos/mock_ime_engine_handler.h index 3626ca5e913..bea6a8bd725 100644 --- a/chromium/ui/base/ime/chromeos/mock_ime_engine_handler.h +++ b/chromium/ui/base/ime/chromeos/mock_ime_engine_handler.h @@ -5,13 +5,13 @@ #ifndef UI_BASE_IME_CHROMEOS_MOCK_IME_ENGINE_HANDLER_H_ #define UI_BASE_IME_CHROMEOS_MOCK_IME_ENGINE_HANDLER_H_ -#include "ui/base/ime/chromeos/ibus_bridge.h" -#include "ui/base/ui_export.h" +#include "ui/base/ime/chromeos/ime_bridge.h" +#include "ui/base/ui_base_export.h" #include "ui/events/event.h" namespace chromeos { -class UI_EXPORT MockIMEEngineHandler : public IBusEngineHandlerInterface { +class UI_BASE_EXPORT MockIMEEngineHandler : public IMEEngineHandlerInterface { public: MockIMEEngineHandler(); virtual ~MockIMEEngineHandler(); diff --git a/chromium/ui/base/ime/chromeos/mock_ime_input_context_handler.cc b/chromium/ui/base/ime/chromeos/mock_ime_input_context_handler.cc index 4d8d40c0391..14e5bc0b5fd 100644 --- a/chromium/ui/base/ime/chromeos/mock_ime_input_context_handler.cc +++ b/chromium/ui/base/ime/chromeos/mock_ime_input_context_handler.cc @@ -4,7 +4,7 @@ #include "ui/base/ime/chromeos/mock_ime_input_context_handler.h" -#include "chromeos/ime/ibus_text.h" +#include "chromeos/ime/composition_text.h" namespace chromeos { @@ -22,13 +22,14 @@ void MockIMEInputContextHandler::CommitText(const std::string& text) { last_commit_text_ = text; } -void MockIMEInputContextHandler::UpdatePreeditText(const IBusText& text, - uint32 cursor_pos, - bool visible) { +void MockIMEInputContextHandler::UpdateCompositionText( + const CompositionText& text, + uint32 cursor_pos, + bool visible) { ++update_preedit_text_call_count_; - last_update_preedit_arg_.ibus_text.CopyFrom(text); - last_update_preedit_arg_.cursor_pos = cursor_pos; - last_update_preedit_arg_.is_visible = visible; + last_update_composition_arg_.composition_text.CopyFrom(text); + last_update_composition_arg_.cursor_pos = cursor_pos; + last_update_composition_arg_.is_visible = visible; } void MockIMEInputContextHandler::DeleteSurroundingText(int32 offset, diff --git a/chromium/ui/base/ime/chromeos/mock_ime_input_context_handler.h b/chromium/ui/base/ime/chromeos/mock_ime_input_context_handler.h index a5b42b21497..71fe3956917 100644 --- a/chromium/ui/base/ime/chromeos/mock_ime_input_context_handler.h +++ b/chromium/ui/base/ime/chromeos/mock_ime_input_context_handler.h @@ -5,17 +5,17 @@ #ifndef UI_BASE_IME_CHROMEOS_MOCK_IME_INPUT_CONTEXT_HANDLER_H_ #define UI_BASE_IME_CHROMEOS_MOCK_IME_INPUT_CONTEXT_HANDLER_H_ -#include "chromeos/ime/ibus_text.h" -#include "ui/base/ime/chromeos/ibus_bridge.h" -#include "ui/base/ui_export.h" +#include "chromeos/ime/composition_text.h" +#include "ui/base/ime/chromeos/ime_bridge.h" +#include "ui/base/ui_base_export.h" namespace chromeos { -class UI_EXPORT MockIMEInputContextHandler - : public IBusInputContextHandlerInterface { +class UI_BASE_EXPORT MockIMEInputContextHandler + : public IMEInputContextHandlerInterface { public: - struct UpdatePreeditTextArg { - IBusText ibus_text; + struct UpdateCompositionTextArg { + CompositionText composition_text; uint32 cursor_pos; bool is_visible; }; @@ -29,7 +29,7 @@ class UI_EXPORT MockIMEInputContextHandler virtual ~MockIMEInputContextHandler(); virtual void CommitText(const std::string& text) OVERRIDE; - virtual void UpdatePreeditText(const IBusText& text, + virtual void UpdateCompositionText(const CompositionText& text, uint32 cursor_pos, bool visible) OVERRIDE; virtual void DeleteSurroundingText(int32 offset, uint32 length) OVERRIDE; @@ -48,8 +48,8 @@ class UI_EXPORT MockIMEInputContextHandler return last_commit_text_; }; - const UpdatePreeditTextArg& last_update_preedit_arg() const { - return last_update_preedit_arg_; + const UpdateCompositionTextArg& last_update_composition_arg() const { + return last_update_composition_arg_; } const DeleteSurroundingTextArg& last_delete_surrounding_text_arg() const { @@ -64,7 +64,7 @@ class UI_EXPORT MockIMEInputContextHandler int update_preedit_text_call_count_; int delete_surrounding_text_call_count_; std::string last_commit_text_; - UpdatePreeditTextArg last_update_preedit_arg_; + UpdateCompositionTextArg last_update_composition_arg_; DeleteSurroundingTextArg last_delete_surrounding_text_arg_; }; diff --git a/chromium/ui/base/ime/composition_text.h b/chromium/ui/base/ime/composition_text.h index 7d728635e3e..e4974bdd7b5 100644 --- a/chromium/ui/base/ime/composition_text.h +++ b/chromium/ui/base/ime/composition_text.h @@ -7,13 +7,13 @@ #include "base/strings/string16.h" #include "ui/base/ime/composition_underline.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/range/range.h" namespace ui { // A struct represents the status of an ongoing composition text. -struct UI_EXPORT CompositionText { +struct UI_BASE_EXPORT CompositionText { CompositionText(); ~CompositionText(); diff --git a/chromium/ui/base/ime/composition_text_util_pango.cc b/chromium/ui/base/ime/composition_text_util_pango.cc index 737380b10c6..325cdd61d92 100644 --- a/chromium/ui/base/ime/composition_text_util_pango.cc +++ b/chromium/ui/base/ime/composition_text_util_pango.cc @@ -19,7 +19,7 @@ void ExtractCompositionTextFromGtkPreedit(const gchar* utf8_text, int cursor_position, CompositionText* composition) { composition->Clear(); - composition->text = UTF8ToUTF16(utf8_text); + composition->text = base::UTF8ToUTF16(utf8_text); if (composition->text.empty()) return; @@ -75,8 +75,11 @@ void ExtractCompositionTextFromGtkPreedit(const gchar* utf8_text, if (background_attr || underline_attr) { // Use a black thin underline by default. - CompositionUnderline underline( - char16_offsets[start], char16_offsets[end], SK_ColorBLACK, false); + CompositionUnderline underline(char16_offsets[start], + char16_offsets[end], + SK_ColorBLACK, + false, + SK_ColorTRANSPARENT); // Always use thick underline for a range with background color, which // is usually the selection range. @@ -108,8 +111,8 @@ void ExtractCompositionTextFromGtkPreedit(const gchar* utf8_text, // Use a black thin underline by default. if (composition->underlines.empty()) { - composition->underlines.push_back( - CompositionUnderline(0, length, SK_ColorBLACK, false)); + composition->underlines.push_back(CompositionUnderline( + 0, length, SK_ColorBLACK, false, SK_ColorTRANSPARENT)); } } diff --git a/chromium/ui/base/ime/composition_text_util_pango.h b/chromium/ui/base/ime/composition_text_util_pango.h index 4f5123f3a80..1116fd9fbd9 100644 --- a/chromium/ui/base/ime/composition_text_util_pango.h +++ b/chromium/ui/base/ime/composition_text_util_pango.h @@ -6,7 +6,7 @@ #define UI_BASE_IME_COMPOSITION_TEXT_UTIL_PANGO_H_ #include "ui/base/glib/glib_integers.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" typedef struct _PangoAttrList PangoAttrList; @@ -16,7 +16,7 @@ struct CompositionText; // Extracts composition text information (text, underlines, selection range) // from given Gtk preedit data (utf-8 text, pango attributes, cursor position). -UI_EXPORT void ExtractCompositionTextFromGtkPreedit( +UI_BASE_EXPORT void ExtractCompositionTextFromGtkPreedit( const gchar* utf8_text, PangoAttrList* attrs, int cursor_position, diff --git a/chromium/ui/base/ime/composition_text_util_pango_unittest.cc b/chromium/ui/base/ime/composition_text_util_pango_unittest.cc index 957adf1d4a7..a2056cfc0e9 100644 --- a/chromium/ui/base/ime/composition_text_util_pango_unittest.cc +++ b/chromium/ui/base/ime/composition_text_util_pango_unittest.cc @@ -28,6 +28,7 @@ struct Underline { unsigned end_offset; uint32 color; bool thick; + uint32 background_color; }; struct TestData { @@ -37,64 +38,59 @@ struct TestData { }; const TestData kTestData[] = { - // Normal case - { "One Two Three", - { { PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 0, 3 }, - { PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_DOUBLE, 4, 7 }, - { PANGO_ATTR_BACKGROUND, 0, 4, 7 }, - { PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 8, 13 }, - { 0, 0, 0, 0 } }, - { { 0, 3, SK_ColorBLACK, false }, - { 4, 7, SK_ColorBLACK, true }, - { 8, 13, SK_ColorBLACK, false }, - { 0, 0, 0, false } } - }, - - // Offset overflow. - { "One Two Three", - { { PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 0, 3 }, - { PANGO_ATTR_BACKGROUND, 0, 4, 7 }, - { PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 8, 20 }, - { 0, 0, 0, 0 } }, - { { 0, 3, SK_ColorBLACK, false }, - { 4, 7, SK_ColorBLACK, true }, - { 8, 13, SK_ColorBLACK, false }, - { 0, 0, 0, false} } - }, - - // Error underline. - { "One Two Three", - { { PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 0, 3 }, - { PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_ERROR, 4, 7 }, - { PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 8, 13 }, - { 0, 0, 0, 0 } }, - { { 0, 3, SK_ColorBLACK, false }, - { 4, 7, SK_ColorRED, false }, - { 8, 13, SK_ColorBLACK, false }, - { 0, 0, 0, false} } - }, - - // Default underline. - { "One Two Three", - { { 0, 0, 0, 0 } }, - { { 0, 13, SK_ColorBLACK, false }, - { 0, 0, 0, false } } - }, - - // Unicode, including non-BMP characters: "123你好𠀀𠀁一丁 456" - { "123\xE4\xBD\xA0\xE5\xA5\xBD\xF0\xA0\x80\x80\xF0\xA0\x80\x81\xE4\xB8\x80" - "\xE4\xB8\x81 456", - { { PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 0, 3 }, - { PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 3, 5 }, - { PANGO_ATTR_BACKGROUND, 0, 5, 7 }, - { PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 7, 13 }, - { 0, 0, 0, 0 } }, - { { 0, 3, SK_ColorBLACK, false }, - { 3, 5, SK_ColorBLACK, false }, - { 5, 9, SK_ColorBLACK, true }, - { 9, 15, SK_ColorBLACK, false }, - { 0, 0, 0, false } } - }, + // Normal case + {"One Two Three", + {{PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 0, 3}, + {PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_DOUBLE, 4, 7}, + {PANGO_ATTR_BACKGROUND, 0, 4, 7}, + {PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 8, 13}, + {0, 0, 0, 0}}, + {{0, 3, SK_ColorBLACK, false, SK_ColorTRANSPARENT}, + {4, 7, SK_ColorBLACK, true, SK_ColorTRANSPARENT}, + {8, 13, SK_ColorBLACK, false, SK_ColorTRANSPARENT}, + {0, 0, 0, false, SK_ColorTRANSPARENT}}}, + + // Offset overflow. + {"One Two Three", + {{PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 0, 3}, + {PANGO_ATTR_BACKGROUND, 0, 4, 7}, + {PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 8, 20}, + {0, 0, 0, 0}}, + {{0, 3, SK_ColorBLACK, false, SK_ColorTRANSPARENT}, + {4, 7, SK_ColorBLACK, true, SK_ColorTRANSPARENT}, + {8, 13, SK_ColorBLACK, false, SK_ColorTRANSPARENT}, + {0, 0, 0, false, SK_ColorTRANSPARENT}}}, + + // Error underline. + {"One Two Three", + {{PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 0, 3}, + {PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_ERROR, 4, 7}, + {PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 8, 13}, + {0, 0, 0, 0}}, + {{0, 3, SK_ColorBLACK, false, SK_ColorTRANSPARENT}, + {4, 7, SK_ColorRED, false, SK_ColorTRANSPARENT}, + {8, 13, SK_ColorBLACK, false, SK_ColorTRANSPARENT}, + {0, 0, 0, false, SK_ColorTRANSPARENT}}}, + + // Default underline. + {"One Two Three", + {{0, 0, 0, 0}}, + {{0, 13, SK_ColorBLACK, false, SK_ColorTRANSPARENT}, + {0, 0, 0, false, SK_ColorTRANSPARENT}}}, + + // Unicode, including non-BMP characters: "123你好𠀀𠀁一丁 456" + {"123\xE4\xBD\xA0\xE5\xA5\xBD\xF0\xA0\x80\x80\xF0\xA0\x80\x81\xE4\xB8\x80" + "\xE4\xB8\x81 456", + {{PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 0, 3}, + {PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 3, 5}, + {PANGO_ATTR_BACKGROUND, 0, 5, 7}, + {PANGO_ATTR_UNDERLINE, PANGO_UNDERLINE_SINGLE, 7, 13}, + {0, 0, 0, 0}}, + {{0, 3, SK_ColorBLACK, false, SK_ColorTRANSPARENT}, + {3, 5, SK_ColorBLACK, false, SK_ColorTRANSPARENT}, + {5, 9, SK_ColorBLACK, true, SK_ColorTRANSPARENT}, + {9, 15, SK_ColorBLACK, false, SK_ColorTRANSPARENT}, + {0, 0, 0, false, SK_ColorTRANSPARENT}}}, }; void CompareUnderline(const Underline& a, @@ -103,6 +99,7 @@ void CompareUnderline(const Underline& a, EXPECT_EQ(a.end_offset, b.end_offset); EXPECT_EQ(a.color, b.color); EXPECT_EQ(a.thick, b.thick); + EXPECT_EQ(a.background_color, b.background_color); } TEST(CompositionTextUtilPangoTest, ExtractCompositionText) { diff --git a/chromium/ui/base/ime/composition_underline.h b/chromium/ui/base/ime/composition_underline.h index c8d09d84163..a8c44b66854 100644 --- a/chromium/ui/base/ime/composition_underline.h +++ b/chromium/ui/base/ime/composition_underline.h @@ -7,6 +7,7 @@ #include <vector> +#include "base/basictypes.h" #include "third_party/skia/include/core/SkColor.h" namespace ui { @@ -15,34 +16,43 @@ namespace ui { // third_party/WebKit/public/web/WebCompositionUnderline.h struct CompositionUnderline { CompositionUnderline() - : start_offset(0), - end_offset(0), - color(0), - thick(false) {} - - CompositionUnderline(unsigned s, unsigned e, SkColor c, bool t) - : start_offset(s), - end_offset(e), - color(c), - thick(t) {} + : start_offset(0), + end_offset(0), + color(SK_ColorTRANSPARENT), + thick(false), + background_color(SK_ColorTRANSPARENT) {} + + // TODO(huangs): remove this constructor. + CompositionUnderline(uint32 s, uint32 e, SkColor c, bool t) + : start_offset(s), + end_offset(e), + color(c), + thick(t), + background_color(SK_ColorTRANSPARENT) {} + + CompositionUnderline(uint32 s, uint32 e, SkColor c, bool t, SkColor bc) + : start_offset(s), + end_offset(e), + color(c), + thick(t), + background_color(bc) {} bool operator==(const CompositionUnderline& rhs) const { return (this->start_offset == rhs.start_offset) && - (this->end_offset == rhs.end_offset) && - (this->color == rhs.color) && - (this->thick == rhs.thick); + (this->end_offset == rhs.end_offset) && (this->color == rhs.color) && + (this->thick == rhs.thick) && + (this->background_color == rhs.background_color); } bool operator!=(const CompositionUnderline& rhs) const { return !(*this == rhs); } - // Though use of unsigned is discouraged, we use it here to make sure it's - // identical to blink::WebCompositionUnderline. - unsigned start_offset; - unsigned end_offset; + uint32 start_offset; + uint32 end_offset; SkColor color; bool thick; + SkColor background_color; }; typedef std::vector<CompositionUnderline> CompositionUnderlines; diff --git a/chromium/ui/base/ime/dummy_input_method.cc b/chromium/ui/base/ime/dummy_input_method.cc index b80f3f4e904..a12bbfc51bf 100644 --- a/chromium/ui/base/ime/dummy_input_method.cc +++ b/chromium/ui/base/ime/dummy_input_method.cc @@ -59,10 +59,6 @@ std::string DummyInputMethod::GetInputLocale() { return std::string(); } -base::i18n::TextDirection DummyInputMethod::GetInputTextDirection() { - return base::i18n::UNKNOWN_DIRECTION; -} - bool DummyInputMethod::IsActive() { return true; } @@ -83,6 +79,9 @@ bool DummyInputMethod::IsCandidatePopupOpen() const { return false; } +void DummyInputMethod::ShowImeIfNeeded() { +} + void DummyInputMethod::AddObserver(InputMethodObserver* observer) { } diff --git a/chromium/ui/base/ime/dummy_input_method.h b/chromium/ui/base/ime/dummy_input_method.h index 5ccb06cf55e..39b04195f9d 100644 --- a/chromium/ui/base/ime/dummy_input_method.h +++ b/chromium/ui/base/ime/dummy_input_method.h @@ -33,12 +33,13 @@ class DummyInputMethod : public InputMethod { virtual void CancelComposition(const TextInputClient* client) OVERRIDE; virtual void OnInputLocaleChanged() OVERRIDE; virtual std::string GetInputLocale() OVERRIDE; - virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE; virtual bool IsActive() OVERRIDE; virtual TextInputType GetTextInputType() const OVERRIDE; virtual TextInputMode GetTextInputMode() const OVERRIDE; virtual bool CanComposeInline() const OVERRIDE; virtual bool IsCandidatePopupOpen() const OVERRIDE; + virtual void ShowImeIfNeeded() OVERRIDE; + virtual void AddObserver(InputMethodObserver* observer) OVERRIDE; virtual void RemoveObserver(InputMethodObserver* observer) OVERRIDE; diff --git a/chromium/ui/base/ime/dummy_input_method_delegate.cc b/chromium/ui/base/ime/dummy_input_method_delegate.cc index e7bb7dae2bd..473884a65ae 100644 --- a/chromium/ui/base/ime/dummy_input_method_delegate.cc +++ b/chromium/ui/base/ime/dummy_input_method_delegate.cc @@ -11,14 +11,7 @@ DummyInputMethodDelegate::DummyInputMethodDelegate() {} DummyInputMethodDelegate::~DummyInputMethodDelegate() {} bool DummyInputMethodDelegate::DispatchKeyEventPostIME( - const base::NativeEvent& native_key_event) { - return true; -} - -bool DummyInputMethodDelegate::DispatchFabricatedKeyEventPostIME( - ui::EventType type, - ui::KeyboardCode key_code, - int flags) { + const ui::KeyEvent& key_event) { return true; } diff --git a/chromium/ui/base/ime/dummy_input_method_delegate.h b/chromium/ui/base/ime/dummy_input_method_delegate.h index 360d0b42b38..ce64216c7c3 100644 --- a/chromium/ui/base/ime/dummy_input_method_delegate.h +++ b/chromium/ui/base/ime/dummy_input_method_delegate.h @@ -5,26 +5,20 @@ #ifndef UI_BASE_IME_DUMMY_INPUT_METHOD_DELEGATE_H_ #define UI_BASE_IME_DUMMY_INPUT_METHOD_DELEGATE_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "ui/base/ime/input_method_delegate.h" -#include "ui/base/ui_export.h" namespace ui { namespace internal { -class UI_EXPORT DummyInputMethodDelegate - : NON_EXPORTED_BASE(public InputMethodDelegate) { +class UI_BASE_EXPORT DummyInputMethodDelegate : public InputMethodDelegate { public: DummyInputMethodDelegate(); virtual ~DummyInputMethodDelegate(); - // InputMethodDelegate overrides: - virtual bool DispatchKeyEventPostIME( - const base::NativeEvent& native_key_event) OVERRIDE; - virtual bool DispatchFabricatedKeyEventPostIME(ui::EventType type, - ui::KeyboardCode key_code, - int flags) OVERRIDE; + // Overridden from InputMethodDelegate: + virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& key_event) OVERRIDE; private: DISALLOW_COPY_AND_ASSIGN(DummyInputMethodDelegate); diff --git a/chromium/ui/base/ime/dummy_text_input_client.cc b/chromium/ui/base/ime/dummy_text_input_client.cc index 652e2c52bf7..cea49c676c0 100644 --- a/chromium/ui/base/ime/dummy_text_input_client.cc +++ b/chromium/ui/base/ime/dummy_text_input_client.cc @@ -7,14 +7,17 @@ namespace ui { -DummyTextInputClient::DummyTextInputClient() { -} +DummyTextInputClient::DummyTextInputClient() + : text_input_type_(TEXT_INPUT_TYPE_NONE) {} + +DummyTextInputClient::DummyTextInputClient(TextInputType text_input_type) + : text_input_type_(text_input_type) {} DummyTextInputClient::~DummyTextInputClient() { } void DummyTextInputClient::SetCompositionText( - const ui::CompositionText& composition) { + const CompositionText& composition) { } void DummyTextInputClient::ConfirmCompositionText() { @@ -23,21 +26,21 @@ void DummyTextInputClient::ConfirmCompositionText() { void DummyTextInputClient::ClearCompositionText() { } -void DummyTextInputClient::InsertText(const string16& text) { +void DummyTextInputClient::InsertText(const base::string16& text) { } -void DummyTextInputClient::InsertChar(char16 ch, int flags) { +void DummyTextInputClient::InsertChar(base::char16 ch, int flags) { } gfx::NativeWindow DummyTextInputClient::GetAttachedWindow() const { return NULL; } -ui::TextInputType DummyTextInputClient::GetTextInputType() const { - return TEXT_INPUT_TYPE_NONE; +TextInputType DummyTextInputClient::GetTextInputType() const { + return text_input_type_; } -ui::TextInputMode DummyTextInputClient::GetTextInputMode() const { +TextInputMode DummyTextInputClient::GetTextInputMode() const { return TEXT_INPUT_MODE_DEFAULT; } @@ -80,7 +83,7 @@ bool DummyTextInputClient::DeleteRange(const gfx::Range& range) { } bool DummyTextInputClient::GetTextFromRange(const gfx::Range& range, - string16* text) const { + base::string16* text) const { return false; } @@ -108,4 +111,11 @@ void DummyTextInputClient::OnCandidateWindowUpdated() { void DummyTextInputClient::OnCandidateWindowHidden() { } +bool DummyTextInputClient::IsEditingCommandEnabled(int command_id) { + return false; +} + +void DummyTextInputClient::ExecuteEditingCommand(int command_id) { +} + } // namespace ui diff --git a/chromium/ui/base/ime/dummy_text_input_client.h b/chromium/ui/base/ime/dummy_text_input_client.h index 1242bb990d0..be2295c3bb9 100644 --- a/chromium/ui/base/ime/dummy_text_input_client.h +++ b/chromium/ui/base/ime/dummy_text_input_client.h @@ -13,18 +13,18 @@ namespace ui { class DummyTextInputClient : public TextInputClient { public: DummyTextInputClient(); + explicit DummyTextInputClient(TextInputType text_input_type); virtual ~DummyTextInputClient(); // Overriden from TextInputClient. - virtual void SetCompositionText( - const ui::CompositionText& composition) OVERRIDE; + virtual void SetCompositionText(const CompositionText& composition) OVERRIDE; virtual void ConfirmCompositionText() OVERRIDE; virtual void ClearCompositionText() OVERRIDE; - virtual void InsertText(const string16& text) OVERRIDE; - virtual void InsertChar(char16 ch, int flags) OVERRIDE; + virtual void InsertText(const base::string16& text) OVERRIDE; + virtual void InsertChar(base::char16 ch, int flags) OVERRIDE; virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE; - virtual ui::TextInputType GetTextInputType() const OVERRIDE; - virtual ui::TextInputMode GetTextInputMode() const OVERRIDE; + virtual TextInputType GetTextInputType() const OVERRIDE; + virtual TextInputMode GetTextInputMode() const OVERRIDE; virtual bool CanComposeInline() const OVERRIDE; virtual gfx::Rect GetCaretBounds() const OVERRIDE; virtual bool GetCompositionCharacterBounds(uint32 index, @@ -36,7 +36,7 @@ class DummyTextInputClient : public TextInputClient { virtual bool SetSelectionRange(const gfx::Range& range) OVERRIDE; virtual bool DeleteRange(const gfx::Range& range) OVERRIDE; virtual bool GetTextFromRange(const gfx::Range& range, - string16* text) const OVERRIDE; + base::string16* text) const OVERRIDE; virtual void OnInputMethodChanged() OVERRIDE; virtual bool ChangeTextDirectionAndLayoutAlignment( base::i18n::TextDirection direction) OVERRIDE; @@ -45,6 +45,12 @@ class DummyTextInputClient : public TextInputClient { virtual void OnCandidateWindowShown() OVERRIDE; virtual void OnCandidateWindowUpdated() OVERRIDE; virtual void OnCandidateWindowHidden() OVERRIDE; + virtual bool IsEditingCommandEnabled(int command_id) OVERRIDE; + virtual void ExecuteEditingCommand(int command_id) OVERRIDE; + + TextInputType text_input_type_; + + DISALLOW_COPY_AND_ASSIGN(DummyTextInputClient); }; } // namespace ui diff --git a/chromium/ui/base/ime/ime.gypi b/chromium/ui/base/ime/ime.gypi index 7d52d9d7839..322f0a962be 100644 --- a/chromium/ui/base/ime/ime.gypi +++ b/chromium/ui/base/ime/ime.gypi @@ -7,10 +7,14 @@ '<(DEPTH)/ui/events/events.gyp:events', ], 'sources': [ + 'candidate_window.cc', + 'candidate_window.h', 'chromeos/character_composer.cc', 'chromeos/character_composer.h', - 'chromeos/ibus_bridge.cc', - 'chromeos/ibus_bridge.h', + 'chromeos/ime_bridge.cc', + 'chromeos/ime_bridge.h', + 'chromeos/ime_keymap.cc', + 'chromeos/ime_keymap.h', 'chromeos/mock_ime_candidate_window_handler.cc', 'chromeos/mock_ime_candidate_window_handler.h', 'chromeos/mock_ime_engine_handler.cc', @@ -24,25 +28,25 @@ 'composition_underline.h', 'dummy_input_method_delegate.cc', 'dummy_input_method_delegate.h', + 'infolist_entry.cc', + 'infolist_entry.h', 'input_method.h', + 'input_method_auralinux.cc', + 'input_method_auralinux.h', 'input_method_base.cc', 'input_method_base.h', + 'input_method_chromeos.cc', + 'input_method_chromeos.h', 'input_method_delegate.h', 'input_method_factory.cc', 'input_method_factory.h', - 'input_method_ibus.cc', - 'input_method_ibus.h', - 'input_method_imm32.cc', - 'input_method_imm32.h', 'input_method_initializer.cc', 'input_method_initializer.h', - 'input_method_auralinux.cc', - 'input_method_auralinux.h', + 'input_method_mac.h', + 'input_method_mac.mm', 'input_method_minimal.cc', 'input_method_minimal.h', 'input_method_observer.h', - 'input_method_tsf.cc', - 'input_method_tsf.h', 'input_method_win.cc', 'input_method_win.h', 'linux/fake_input_method_context.cc', @@ -59,17 +63,13 @@ 'remote_input_method_win.h', 'text_input_client.cc', 'text_input_client.h', + 'text_input_focus_manager.cc', + 'text_input_focus_manager.h', 'text_input_type.h', 'win/imm32_manager.cc', 'win/imm32_manager.h', - 'win/tsf_bridge.cc', - 'win/tsf_bridge.h', - 'win/tsf_event_router.cc', - 'win/tsf_event_router.h', 'win/tsf_input_scope.cc', 'win/tsf_input_scope.h', - 'win/tsf_text_store.cc', - 'win/tsf_text_store.h', ], 'conditions': [ ['toolkit_views==0 and use_aura==0', { @@ -82,8 +82,8 @@ }], ['chromeos==0 or use_x11==0', { 'sources!': [ - 'input_method_ibus.cc', - 'input_method_ibus.h', + 'input_method_chromeos.cc', + 'input_method_chromeos.h', ], }], ['chromeos==1', { @@ -95,18 +95,12 @@ 'sources!': [ 'input_method_imm32.cc', 'input_method_imm32.h', - 'input_method_tsf.cc', - 'input_method_tsf.h', ], }], - ['use_aura==0 or desktop_linux==0', { + ['use_aura==0 or (desktop_linux==0 and use_ozone==0)', { 'sources!': [ 'input_method_auralinux.cc', 'input_method_auralinux.h', - ], - }], - ['use_aura==0 or desktop_linux==0', { - 'sources!': [ 'linux/fake_input_method_context.cc', 'linux/fake_input_method_context.h', 'linux/fake_input_method_context_factory.cc', @@ -120,7 +114,14 @@ 'sources!': [ 'composition_text_util_pango.cc', 'composition_text_util_pango.h', + 'chromeos/character_composer.cc', + 'chromeos/character_composer.h', ], }], + ['OS=="android"', { + 'dependencies!' : [ + '<(DEPTH)/ui/events/events.gyp:events', + ], + }] ], } diff --git a/chromium/ui/base/ime/ime_test_support.gypi b/chromium/ui/base/ime/ime_test_support.gypi index 02fa6eb1191..f82b3b02b2f 100644 --- a/chromium/ui/base/ime/ime_test_support.gypi +++ b/chromium/ui/base/ime/ime_test_support.gypi @@ -8,15 +8,5 @@ 'dummy_input_method.h', 'dummy_text_input_client.cc', 'dummy_text_input_client.h', - 'win/mock_tsf_bridge.cc', - 'win/mock_tsf_bridge.h', - ], - 'conditions': [ - ['OS!="win"', { - 'sources!': [ - 'win/mock_tsf_bridge.cc', - 'win/mock_tsf_bridge.h', - ], - }], ], } diff --git a/chromium/ui/base/ime/ime_unittests.gypi b/chromium/ui/base/ime/ime_unittests.gypi index 779764800d7..110b200b693 100644 --- a/chromium/ui/base/ime/ime_unittests.gypi +++ b/chromium/ui/base/ime/ime_unittests.gypi @@ -4,20 +4,20 @@ { 'sources': [ + 'candidate_window_unittest.cc', 'chromeos/character_composer_unittest.cc', 'composition_text_util_pango_unittest.cc', 'input_method_base_unittest.cc', - 'input_method_ibus_unittest.cc', + 'input_method_chromeos_unittest.cc', 'remote_input_method_win_unittest.cc', 'win/imm32_manager_unittest.cc', 'win/tsf_input_scope_unittest.cc', - 'win/tsf_text_store_unittest.cc', ], 'conditions': [ ['chromeos==0 or use_x11==0', { 'sources!': [ 'chromeos/character_composer_unittest.cc', - 'input_method_ibus_unittest.cc', + 'input_method_chromeos_unittest.cc', ], }], ['use_x11==0', { diff --git a/chromium/ui/base/ime/infolist_entry.cc b/chromium/ui/base/ime/infolist_entry.cc new file mode 100644 index 00000000000..7423f73abb7 --- /dev/null +++ b/chromium/ui/base/ime/infolist_entry.cc @@ -0,0 +1,22 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/ime/infolist_entry.h" + +namespace ui { + +InfolistEntry::InfolistEntry(const base::string16& title, + const base::string16& body) + : title(title), body(body), highlighted(false) {} + +bool InfolistEntry::operator==(const InfolistEntry& other) const { + return title == other.title && body == other.body && + highlighted == other.highlighted; +} + +bool InfolistEntry::operator!=(const InfolistEntry& other) const { + return !(*this == other); +} + +} // namespace ui diff --git a/chromium/ui/base/ime/infolist_entry.h b/chromium/ui/base/ime/infolist_entry.h new file mode 100644 index 00000000000..3cb76721cb3 --- /dev/null +++ b/chromium/ui/base/ime/infolist_entry.h @@ -0,0 +1,26 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_IME_INFOLIST_ENTRY_H_ +#define UI_BASE_IME_INFOLIST_ENTRY_H_ + +#include "base/strings/string16.h" +#include "ui/base/ui_base_export.h" + +namespace ui { + +// The data model of infolist window. +struct UI_BASE_EXPORT InfolistEntry { + base::string16 title; + base::string16 body; + bool highlighted; + + InfolistEntry(const base::string16& title, const base::string16& body); + bool operator==(const InfolistEntry& entry) const; + bool operator!=(const InfolistEntry& entry) const; +}; + +} // namespace ui + +#endif // UI_BASE_IME_INFOLIST_ENTRY_H_ diff --git a/chromium/ui/base/ime/input_method.h b/chromium/ui/base/ime/input_method.h index 33c7beaed5d..462e0b0a64e 100644 --- a/chromium/ui/base/ime/input_method.h +++ b/chromium/ui/base/ime/input_method.h @@ -9,7 +9,6 @@ #include "base/basictypes.h" #include "base/event_types.h" -#include "base/i18n/rtl.h" #include "ui/base/ime/text_input_mode.h" #include "ui/base/ime/text_input_type.h" @@ -43,11 +42,11 @@ class TextInputClient; // - Keeps track of the focused TextInputClient to see which client can call // APIs, OnTextInputTypeChanged, OnCaretBoundsChanged, and CancelComposition, // that change the state of the input method. -// In Aura environment, aura::RootWindowHost creates an instance of +// In Aura environment, aura::WindowTreeHost creates an instance of // ui::InputMethod and owns it. class InputMethod { public: - // TODO(yukawa): Move these typedef into ime_constants.h or somewhere. + #if defined(OS_WIN) typedef LRESULT NativeEventResult; #else @@ -126,10 +125,6 @@ class InputMethod { // tag, or an empty string if the input method cannot provide it. virtual std::string GetInputLocale() = 0; - // Returns the text direction of current keyboard layout or input method, or - // base::i18n::UNKNOWN_DIRECTION if the input method cannot provide it. - virtual base::i18n::TextDirection GetInputTextDirection() = 0; - // Checks if the input method is active, i.e. if it's ready for processing // keyboard event and generate composition or text result. // If the input method is inactive, then it's not necessary to inform it the @@ -159,6 +154,9 @@ class InputMethod { // of IME popups is not supported. virtual bool IsCandidatePopupOpen() const = 0; + // Displays an on screen keyboard if enabled. + virtual void ShowImeIfNeeded() = 0; + // Management of the observer list. virtual void AddObserver(InputMethodObserver* observer) = 0; virtual void RemoveObserver(InputMethodObserver* observer) = 0; diff --git a/chromium/ui/base/ime/input_method_auralinux.cc b/chromium/ui/base/ime/input_method_auralinux.cc index 4b996fb089f..a1c1b74bc1f 100644 --- a/chromium/ui/base/ime/input_method_auralinux.cc +++ b/chromium/ui/base/ime/input_method_auralinux.cc @@ -12,46 +12,20 @@ namespace ui { InputMethodAuraLinux::InputMethodAuraLinux( - internal::InputMethodDelegate* delegate) { + internal::InputMethodDelegate* delegate) + : allowed_to_fire_vkey_process_key_(false), vkey_processkey_flags_(0) { SetDelegate(delegate); } InputMethodAuraLinux::~InputMethodAuraLinux() {} -// static -void InputMethodAuraLinux::Initialize() { -#if (USE_X11) - // Force a IBus IM context to run in synchronous mode. - // - // Background: IBus IM context runs by default in asynchronous mode. In - // this mode, gtk_im_context_filter_keypress() consumes all the key events - // and returns true while asynchronously sending the event to an underlying - // IME implementation. When the event has not actually been consumed by - // the underlying IME implementation, the context pushes the event back to - // the GDK event queue marking the event as already handled by the IBus IM - // context. - // - // The problem here is that those pushed-back GDK events are never handled - // when base::MessagePumpX11 is used, which only handles X events. So, we - // make a IBus IM context run in synchronous mode by setting an environment - // variable. This is only the interface to change the mode. - // - // Another possible solution is to use GDK event loop instead of X event - // loop. - // - // Since there is no reentrant version of setenv(3C), it's a caller's duty - // to avoid race conditions. This function should be called in the main - // thread on a very early stage, and supposed to be called from - // ui::InitializeInputMethod(). - scoped_ptr<base::Environment> env(base::Environment::Create()); - env->SetVar("IBUS_ENABLE_SYNC_MODE", "1"); -#endif -} - // Overriden from InputMethod. void InputMethodAuraLinux::Init(bool focused) { - CHECK(LinuxInputMethodContextFactory::instance()); + CHECK(LinuxInputMethodContextFactory::instance()) + << "This failure was likely caused because " + << "ui::InitializeInputMethod(ForTesting) was not called " + << "before instantiating this class."; input_method_context_ = LinuxInputMethodContextFactory::instance()->CreateInputMethodContext( this); @@ -81,17 +55,15 @@ bool InputMethodAuraLinux::DispatchKeyEvent(const ui::KeyEvent& event) { if (!GetTextInputClient()) return DispatchKeyEventPostIME(event); - // Let an IME handle the key event first. - if (input_method_context_->DispatchKeyEvent(event)) { - if (event.type() == ET_KEY_PRESSED) { - const ui::KeyEvent fabricated_event(ET_KEY_PRESSED, - VKEY_PROCESSKEY, - event.flags(), - false); // is_char - DispatchKeyEventPostIME(fabricated_event); - } + // Let an IME handle the key event first, and allow to fire a VKEY_PROCESSKEY + // event for keydown events. Note that DOM Level 3 Events Sepc requires that + // only keydown events fire keyCode=229 events and not for keyup events. + if (event.type() == ET_KEY_PRESSED && + (event.flags() & ui::EF_IME_FABRICATED_KEY) == 0) + AllowToFireProcessKey(event); + if (input_method_context_->DispatchKeyEvent(event)) return true; - } + StopFiringProcessKey(); // Otherwise, insert the character. const bool handled = DispatchKeyEventPostIME(event); @@ -135,10 +107,6 @@ std::string InputMethodAuraLinux::GetInputLocale() { return ""; } -base::i18n::TextDirection InputMethodAuraLinux::GetInputTextDirection() { - return input_method_context_->GetInputTextDirection(); -} - bool InputMethodAuraLinux::IsActive() { // InputMethodAuraLinux is always ready and up. return true; @@ -152,25 +120,29 @@ bool InputMethodAuraLinux::IsCandidatePopupOpen() const { // Overriden from ui::LinuxInputMethodContextDelegate void InputMethodAuraLinux::OnCommit(const base::string16& text) { - TextInputClient* text_input_client = GetTextInputClient(); - if (text_input_client) - text_input_client->InsertText(text); + MaybeFireProcessKey(); + if (!IsTextInputTypeNone()) + GetTextInputClient()->InsertText(text); } void InputMethodAuraLinux::OnPreeditChanged( const CompositionText& composition_text) { + MaybeFireProcessKey(); TextInputClient* text_input_client = GetTextInputClient(); if (text_input_client) text_input_client->SetCompositionText(composition_text); } void InputMethodAuraLinux::OnPreeditEnd() { + MaybeFireProcessKey(); TextInputClient* text_input_client = GetTextInputClient(); if (text_input_client && text_input_client->HasCompositionText()) text_input_client->ClearCompositionText(); } -void InputMethodAuraLinux::OnPreeditStart() {} +void InputMethodAuraLinux::OnPreeditStart() { + MaybeFireProcessKey(); +} // Overridden from InputMethodBase. @@ -184,4 +156,28 @@ void InputMethodAuraLinux::OnDidChangeFocusedClient( InputMethodBase::OnDidChangeFocusedClient(focused_before, focused); } +// Helper functions to support VKEY_PROCESSKEY. + +void InputMethodAuraLinux::AllowToFireProcessKey(const ui::KeyEvent& event) { + allowed_to_fire_vkey_process_key_ = true; + vkey_processkey_flags_ = event.flags(); +} + +void InputMethodAuraLinux::MaybeFireProcessKey() { + if (!allowed_to_fire_vkey_process_key_) + return; + + const ui::KeyEvent fabricated_event(ET_KEY_PRESSED, + VKEY_PROCESSKEY, + vkey_processkey_flags_, + false); // is_char + DispatchKeyEventPostIME(fabricated_event); + StopFiringProcessKey(); +} + +void InputMethodAuraLinux::StopFiringProcessKey() { + allowed_to_fire_vkey_process_key_ = false; + vkey_processkey_flags_ = 0; +} + } // namespace ui diff --git a/chromium/ui/base/ime/input_method_auralinux.h b/chromium/ui/base/ime/input_method_auralinux.h index 87222a7bd05..de5c347be21 100644 --- a/chromium/ui/base/ime/input_method_auralinux.h +++ b/chromium/ui/base/ime/input_method_auralinux.h @@ -20,11 +20,6 @@ class InputMethodAuraLinux : public InputMethodBase, explicit InputMethodAuraLinux(internal::InputMethodDelegate* delegate); virtual ~InputMethodAuraLinux(); - // Initializes input methods. This function must be called once prior to - // any use of this instance. This function is supposed to be called from - // ui::InitializeInputMethod(). - static void Initialize(); - // Overriden from InputMethod. virtual void Init(bool focused) OVERRIDE; virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event, @@ -35,7 +30,6 @@ class InputMethodAuraLinux : public InputMethodBase, virtual void CancelComposition(const TextInputClient* client) OVERRIDE; virtual void OnInputLocaleChanged() OVERRIDE; virtual std::string GetInputLocale() OVERRIDE; - virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE; virtual bool IsActive() OVERRIDE; virtual bool IsCandidatePopupOpen() const OVERRIDE; @@ -51,8 +45,36 @@ class InputMethodAuraLinux : public InputMethodBase, virtual void OnDidChangeFocusedClient(TextInputClient* focused_before, TextInputClient* focused) OVERRIDE; + private: + // Allows to fire a VKEY_PROCESSKEY key event. + void AllowToFireProcessKey(const ui::KeyEvent& event); + // Fires a VKEY_PROCESSKEY key event if allowed. + void MaybeFireProcessKey(); + // Stops firing VKEY_PROCESSKEY key events. + void StopFiringProcessKey(); + scoped_ptr<LinuxInputMethodContext> input_method_context_; + // IBus in async mode eagerly consumes all the key events first regardless of + // whether the underlying IME consumes the key event or not, and makes + // gtk_im_context_filter_keypress() always return true, and later pushes + // the key event back to the GDK event queue when it turns out that the + // underlying IME doesn't consume the key event. + // + // Thus we have to defer a decision whether or not to dispatch a + // VKEY_PROCESSKEY key event. Unlike other InputMethod's subclasses, + // DispatchKeyEvent() in this class does not directly dispatch a + // VKEY_PROCESSKEY event, OnCommit or OnPreedit{Start,Changed,End} dispatch + // a VKEY_PROCESSKEY event instead. + // + // Because of this hack, there could be chances that we accidentally dispatch + // VKEY_PROCESSKEY events and other key events in out of order. + // + // |allowed_to_fire_vkey_process_key_| is used not to dispatch a + // VKEY_PROCESSKEY event twice for a single key event. + bool allowed_to_fire_vkey_process_key_; + int vkey_processkey_flags_; + DISALLOW_COPY_AND_ASSIGN(InputMethodAuraLinux); }; diff --git a/chromium/ui/base/ime/input_method_base.cc b/chromium/ui/base/ime/input_method_base.cc index d88fccfc6ff..ed347670ef3 100644 --- a/chromium/ui/base/ime/input_method_base.cc +++ b/chromium/ui/base/ime/input_method_base.cc @@ -10,6 +10,8 @@ #include "ui/base/ime/input_method_delegate.h" #include "ui/base/ime/input_method_observer.h" #include "ui/base/ime/text_input_client.h" +#include "ui/base/ime/text_input_focus_manager.h" +#include "ui/base/ui_base_switches_util.h" #include "ui/events/event.h" namespace ui { @@ -56,6 +58,9 @@ void InputMethodBase::DetachTextInputClient(TextInputClient* client) { } TextInputClient* InputMethodBase::GetTextInputClient() const { + if (switches::IsTextInputFocusManagerEnabled()) + return TextInputFocusManager::GetInstance()->GetFocusedTextInputClient(); + return system_toplevel_window_focused_ ? text_input_client_ : NULL; } @@ -80,6 +85,10 @@ bool InputMethodBase::CanComposeInline() const { return client ? client->CanComposeInline() : true; } +void InputMethodBase::ShowImeIfNeeded() { + FOR_EACH_OBSERVER(InputMethodObserver, observer_list_, OnShowImeIfNeeded()); +} + void InputMethodBase::AddObserver(InputMethodObserver* observer) { observer_list_.AddObserver(observer); } @@ -107,11 +116,7 @@ bool InputMethodBase::DispatchKeyEventPostIME( if (!delegate_) return false; - if (!event.HasNativeEvent()) - return delegate_->DispatchFabricatedKeyEventPostIME( - event.type(), event.key_code(), event.flags()); - - return delegate_->DispatchKeyEventPostIME(event.native_event()); + return delegate_->DispatchKeyEventPostIME(event); } void InputMethodBase::NotifyTextInputStateChanged( @@ -123,6 +128,9 @@ void InputMethodBase::NotifyTextInputStateChanged( void InputMethodBase::SetFocusedTextInputClientInternal( TextInputClient* client) { + if (switches::IsTextInputFocusManagerEnabled()) + return; + TextInputClient* old = text_input_client_; if (old == client) return; @@ -152,18 +160,18 @@ void InputMethodBase::OnCandidateWindowHidden() { } void InputMethodBase::CandidateWindowShownCallback() { - if (text_input_client_) - text_input_client_->OnCandidateWindowShown(); + if (TextInputClient* text_input_client = GetTextInputClient()) + text_input_client->OnCandidateWindowShown(); } void InputMethodBase::CandidateWindowUpdatedCallback() { - if (text_input_client_) - text_input_client_->OnCandidateWindowUpdated(); + if (TextInputClient* text_input_client = GetTextInputClient()) + text_input_client->OnCandidateWindowUpdated(); } void InputMethodBase::CandidateWindowHiddenCallback() { - if (text_input_client_) - text_input_client_->OnCandidateWindowHidden(); + if (TextInputClient* text_input_client = GetTextInputClient()) + text_input_client->OnCandidateWindowHidden(); } } // namespace ui diff --git a/chromium/ui/base/ime/input_method_base.h b/chromium/ui/base/ime/input_method_base.h index 10ac88dcef4..ce3801537d2 100644 --- a/chromium/ui/base/ime/input_method_base.h +++ b/chromium/ui/base/ime/input_method_base.h @@ -10,7 +10,7 @@ #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "ui/base/ime/input_method.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace gfx { class Rect; @@ -24,7 +24,7 @@ class TextInputClient; // A helper class providing functionalities shared among ui::InputMethod // implementations. -class UI_EXPORT InputMethodBase +class UI_BASE_EXPORT InputMethodBase : NON_EXPORTED_BASE(public InputMethod), public base::SupportsWeakPtr<InputMethodBase> { public: @@ -50,6 +50,7 @@ class UI_EXPORT InputMethodBase virtual TextInputType GetTextInputType() const OVERRIDE; virtual TextInputMode GetTextInputMode() const OVERRIDE; virtual bool CanComposeInline() const OVERRIDE; + virtual void ShowImeIfNeeded() OVERRIDE; virtual void AddObserver(InputMethodObserver* observer) OVERRIDE; virtual void RemoveObserver(InputMethodObserver* observer) OVERRIDE; diff --git a/chromium/ui/base/ime/input_method_base_unittest.cc b/chromium/ui/base/ime/input_method_base_unittest.cc index ac80b1406f1..830bba0cc42 100644 --- a/chromium/ui/base/ime/input_method_base_unittest.cc +++ b/chromium/ui/base/ime/input_method_base_unittest.cc @@ -12,6 +12,8 @@ #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/ime/dummy_text_input_client.h" #include "ui/base/ime/input_method_observer.h" +#include "ui/base/ime/text_input_focus_manager.h" +#include "ui/base/ui_base_switches_util.h" #include "ui/events/event.h" namespace ui { @@ -52,9 +54,15 @@ class ClientChangeVerifier { // Verifies the result satisfies the expectation or not. void Verify() { - EXPECT_EQ(call_expected_, on_will_change_focused_client_called_); - EXPECT_EQ(call_expected_, on_did_change_focused_client_called_); - EXPECT_EQ(call_expected_, on_text_input_state_changed_); + if (switches::IsTextInputFocusManagerEnabled()) { + EXPECT_FALSE(on_will_change_focused_client_called_); + EXPECT_FALSE(on_did_change_focused_client_called_); + EXPECT_FALSE(on_text_input_state_changed_); + } else { + EXPECT_EQ(call_expected_, on_will_change_focused_client_called_); + EXPECT_EQ(call_expected_, on_did_change_focused_client_called_); + EXPECT_EQ(call_expected_, on_text_input_state_changed_); + } } void OnWillChangeFocusedClient(TextInputClient* focused_before, @@ -161,9 +169,6 @@ class MockInputMethodBase : public InputMethodBase { virtual std::string GetInputLocale() OVERRIDE{ return ""; } - virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE { - return base::i18n::UNKNOWN_DIRECTION; - } virtual bool IsActive() OVERRIDE { return false; } @@ -208,6 +213,8 @@ class MockInputMethodObserver : public InputMethodObserver { virtual void OnTextInputStateChanged(const TextInputClient* client) OVERRIDE { verifier_->OnTextInputStateChanged(client); } + virtual void OnShowImeIfNeeded() OVERRIDE { + } virtual void OnInputMethodDestroyed(const InputMethod* client) OVERRIDE { } @@ -246,6 +253,16 @@ class MockTextInputClient : public DummyTextInputClient { typedef ScopedObserver<InputMethod, InputMethodObserver> InputMethodScopedObserver; +void SetFocusedTextInputClient(InputMethod* input_method, + TextInputClient* text_input_client) { + if (switches::IsTextInputFocusManagerEnabled()) { + TextInputFocusManager::GetInstance()->FocusTextInputClient( + text_input_client); + } else { + input_method->SetFocusedTextInputClient(text_input_client); + } +} + TEST_F(InputMethodBaseTest, SetFocusedTextInputClient) { DummyTextInputClient text_input_client_1st; DummyTextInputClient text_input_client_2nd; @@ -264,7 +281,7 @@ TEST_F(InputMethodBaseTest, SetFocusedTextInputClient) { ASSERT_EQ(NULL, input_method.GetTextInputClient()); verifier.ExpectClientChange(NULL, &text_input_client_1st); - input_method.SetFocusedTextInputClient(&text_input_client_1st); + SetFocusedTextInputClient(&input_method, &text_input_client_1st); EXPECT_EQ(&text_input_client_1st, input_method.GetTextInputClient()); verifier.Verify(); } @@ -272,7 +289,7 @@ TEST_F(InputMethodBaseTest, SetFocusedTextInputClient) { { SCOPED_TRACE("Redundant focus events must be ignored"); verifier.ExpectClientDoesNotChange(); - input_method.SetFocusedTextInputClient(&text_input_client_1st); + SetFocusedTextInputClient(&input_method, &text_input_client_1st); verifier.Verify(); } @@ -282,7 +299,7 @@ TEST_F(InputMethodBaseTest, SetFocusedTextInputClient) { ASSERT_EQ(&text_input_client_1st, input_method.GetTextInputClient()); verifier.ExpectClientChange(&text_input_client_1st, &text_input_client_2nd); - input_method.SetFocusedTextInputClient(&text_input_client_2nd); + SetFocusedTextInputClient(&input_method, &text_input_client_2nd); EXPECT_EQ(&text_input_client_2nd, input_method.GetTextInputClient()); verifier.Verify(); } @@ -292,7 +309,7 @@ TEST_F(InputMethodBaseTest, SetFocusedTextInputClient) { ASSERT_EQ(&text_input_client_2nd, input_method.GetTextInputClient()); verifier.ExpectClientChange(&text_input_client_2nd, NULL); - input_method.SetFocusedTextInputClient(NULL); + SetFocusedTextInputClient(&input_method, NULL); EXPECT_EQ(NULL, input_method.GetTextInputClient()); verifier.Verify(); } @@ -300,12 +317,16 @@ TEST_F(InputMethodBaseTest, SetFocusedTextInputClient) { { SCOPED_TRACE("Redundant focus events must be ignored"); verifier.ExpectClientDoesNotChange(); - input_method.SetFocusedTextInputClient(NULL); + SetFocusedTextInputClient(&input_method, NULL); verifier.Verify(); } } TEST_F(InputMethodBaseTest, DetachTextInputClient) { + // DetachTextInputClient is not supported when IsTextInputFocusManagerEnabled. + if (switches::IsTextInputFocusManagerEnabled()) + return; + DummyTextInputClient text_input_client; DummyTextInputClient text_input_client_the_other; @@ -357,7 +378,7 @@ TEST_F(InputMethodBaseTest, CandidateWindowEvents) { input_method_base.OnFocus(); verifier.ExpectClientChange(NULL, &text_input_client); - input_method_base.SetFocusedTextInputClient(&text_input_client); + SetFocusedTextInputClient(&input_method_base, &text_input_client); EXPECT_EQ(0, text_input_client.shown_event_count()); EXPECT_EQ(0, text_input_client.updated_event_count()); diff --git a/chromium/ui/base/ime/input_method_ibus.cc b/chromium/ui/base/ime/input_method_chromeos.cc index 6f1213b7c8f..a37cb72e50b 100644 --- a/chromium/ui/base/ime/input_method_ibus.cc +++ b/chromium/ui/base/ime/input_method_chromeos.cc @@ -1,8 +1,8 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ui/base/ime/input_method_ibus.h" +#include "ui/base/ime/input_method_chromeos.h" #include <algorithm> #include <cstring> @@ -15,73 +15,65 @@ #include "base/logging.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "base/sys_info.h" #include "base/third_party/icu/icu_utf.h" -#include "chromeos/ime/ibus_text.h" -#include "chromeos/ime/input_method_descriptor.h" +#include "chromeos/ime/composition_text.h" +#include "chromeos/ime/ime_keyboard.h" #include "chromeos/ime/input_method_manager.h" #include "ui/base/ime/text_input_client.h" #include "ui/events/event.h" -#include "ui/events/event_constants.h" -#include "ui/events/event_utils.h" -#include "ui/events/keycodes/keyboard_code_conversion.h" -#include "ui/events/keycodes/keyboard_code_conversion_x.h" -#include "ui/events/keycodes/keyboard_codes.h" #include "ui/gfx/rect.h" namespace { -chromeos::IBusEngineHandlerInterface* GetEngine() { - return chromeos::IBusBridge::Get()->GetCurrentEngineHandler(); +chromeos::IMEEngineHandlerInterface* GetEngine() { + return chromeos::IMEBridge::Get()->GetCurrentEngineHandler(); } } // namespace namespace ui { -// InputMethodIBus implementation ----------------------------------------- -InputMethodIBus::InputMethodIBus( +// InputMethodChromeOS implementation ----------------------------------------- +InputMethodChromeOS::InputMethodChromeOS( internal::InputMethodDelegate* delegate) - : context_focused_(false), - composing_text_(false), + : composing_text_(false), composition_changed_(false), - suppress_next_result_(false), current_keyevent_id_(0), - previous_textinput_type_(TEXT_INPUT_TYPE_NONE), weak_ptr_factory_(this) { SetDelegate(delegate); - chromeos::IBusBridge::Get()->SetInputContextHandler(this); + chromeos::IMEBridge::Get()->SetInputContextHandler(this); UpdateContextFocusState(); - OnInputMethodChanged(); } -InputMethodIBus::~InputMethodIBus() { +InputMethodChromeOS::~InputMethodChromeOS() { AbandonAllPendingKeyEvents(); - context_focused_ = false; ConfirmCompositionText(); // We are dead, so we need to ask the client to stop relying on us. OnInputMethodChanged(); - chromeos::IBusBridge::Get()->SetInputContextHandler(NULL); + chromeos::IMEBridge::Get()->SetInputContextHandler(NULL); } -void InputMethodIBus::OnFocus() { +void InputMethodChromeOS::OnFocus() { InputMethodBase::OnFocus(); - UpdateContextFocusState(); + OnTextInputTypeChanged(GetTextInputClient()); } -void InputMethodIBus::OnBlur() { +void InputMethodChromeOS::OnBlur() { ConfirmCompositionText(); InputMethodBase::OnBlur(); - UpdateContextFocusState(); + OnTextInputTypeChanged(GetTextInputClient()); } -bool InputMethodIBus::OnUntranslatedIMEMessage(const base::NativeEvent& event, - NativeEventResult* result) { +bool InputMethodChromeOS::OnUntranslatedIMEMessage( + const base::NativeEvent& event, + NativeEventResult* result) { return false; } -void InputMethodIBus::ProcessKeyEventDone(uint32 id, - ui::KeyEvent* event, - bool is_handled) { +void InputMethodChromeOS::ProcessKeyEventDone(uint32 id, + ui::KeyEvent* event, + bool is_handled) { if (pending_key_events_.find(id) == pending_key_events_.end()) return; // Abandoned key event. @@ -105,17 +97,33 @@ void InputMethodIBus::ProcessKeyEventDone(uint32 id, pending_key_events_.erase(id); } -bool InputMethodIBus::DispatchKeyEvent(const ui::KeyEvent& event) { +bool InputMethodChromeOS::DispatchKeyEvent(const ui::KeyEvent& event) { DCHECK(event.type() == ET_KEY_PRESSED || event.type() == ET_KEY_RELEASED); DCHECK(system_toplevel_window_focused()); + // For linux_chromeos, the ime keyboard cannot track the caps lock state by + // itself, so need to call SetCapsLockEnabled() method to reflect the caps + // lock state by the key event. + if (!base::SysInfo::IsRunningOnChromeOS()) { + chromeos::input_method::InputMethodManager* manager = + chromeos::input_method::InputMethodManager::Get(); + if (manager) { + chromeos::input_method::ImeKeyboard* keyboard = manager->GetImeKeyboard(); + if (keyboard && event.type() == ui::ET_KEY_PRESSED) { + bool caps = (event.key_code() == ui::VKEY_CAPITAL) + ? !keyboard->CapsLockIsEnabled() + : (event.flags() & EF_CAPS_LOCK_DOWN); + keyboard->SetCapsLockEnabled(caps); + } + } + } + // If |context_| is not usable, then we can only dispatch the key event as is. - // We also dispatch the key event directly if the current text input type is - // TEXT_INPUT_TYPE_PASSWORD, to bypass the input method. + // We only dispatch the key event to input method when the |context_| is an + // normal input field (not a password field). // Note: We need to send the key event to ibus even if the |context_| is not // enabled, so that ibus can have a chance to enable the |context_|. - if (!context_focused_ || !GetEngine() || - GetTextInputType() == TEXT_INPUT_TYPE_PASSWORD ) { + if (!IsInputFieldFocused() || !GetEngine()) { if (event.type() == ET_KEY_PRESSED) { if (ExecuteCharacterComposer(event)) { // Treating as PostIME event if character composer handles key event and @@ -135,33 +143,39 @@ bool InputMethodIBus::DispatchKeyEvent(const ui::KeyEvent& event) { ui::KeyEvent* copied_event = new ui::KeyEvent(event); GetEngine()->ProcessKeyEvent( event, - base::Bind(&InputMethodIBus::ProcessKeyEventDone, + base::Bind(&InputMethodChromeOS::ProcessKeyEventDone, weak_ptr_factory_.GetWeakPtr(), current_keyevent_id_, // Pass the ownership of |copied_event|. base::Owned(copied_event))); ++current_keyevent_id_; - - // We don't want to suppress the result generated by this key event, but it - // may cause problem. See comment in ResetContext() method. - suppress_next_result_ = false; return true; } -void InputMethodIBus::OnTextInputTypeChanged(const TextInputClient* client) { - if (IsTextInputClientFocused(client)) { - ResetContext(); - UpdateContextFocusState(); - if (previous_textinput_type_ != client->GetTextInputType()) - OnInputMethodChanged(); - previous_textinput_type_ = client->GetTextInputType(); +void InputMethodChromeOS::OnTextInputTypeChanged( + const TextInputClient* client) { + if (!IsTextInputClientFocused(client)) + return; + + UpdateContextFocusState(); + + chromeos::IMEEngineHandlerInterface* engine = GetEngine(); + if (engine) { + // When focused input client is not changed, a text input type change should + // cause blur/focus events to engine. + // The focus in to or out from password field should also notify engine. + engine->FocusOut(); + chromeos::IMEEngineHandlerInterface::InputContext context( + GetTextInputType(), GetTextInputMode()); + engine->FocusIn(context); } + InputMethodBase::OnTextInputTypeChanged(client); } -void InputMethodIBus::OnCaretBoundsChanged(const TextInputClient* client) { - if (!context_focused_ || !IsTextInputClientFocused(client)) +void InputMethodChromeOS::OnCaretBoundsChanged(const TextInputClient* client) { + if (!IsInputFieldFocused() || !IsTextInputClientFocused(client)) return; // The current text input type should not be NONE if |context_| is focused. @@ -174,15 +188,15 @@ void InputMethodIBus::OnCaretBoundsChanged(const TextInputClient* client) { composition_head = rect; } - chromeos::IBusPanelCandidateWindowHandlerInterface* candidate_window = - chromeos::IBusBridge::Get()->GetCandidateWindowHandler(); + chromeos::IMECandidateWindowHandlerInterface* candidate_window = + chromeos::IMEBridge::Get()->GetCandidateWindowHandler(); if (!candidate_window) return; candidate_window->SetCursorBounds(rect, composition_head); gfx::Range text_range; gfx::Range selection_range; - string16 surrounding_text; + base::string16 surrounding_text; if (!GetTextInputClient()->GetTextRange(&text_range) || !GetTextInputClient()->GetTextFromRange(text_range, &surrounding_text) || !GetTextInputClient()->GetSelectionRange(&selection_range)) { @@ -210,58 +224,59 @@ void InputMethodIBus::OnCaretBoundsChanged(const TextInputClient* client) { // |surrounding_text| coordinates. if (!GetEngine()) return; - GetEngine()->SetSurroundingText(UTF16ToUTF8(surrounding_text), + GetEngine()->SetSurroundingText(base::UTF16ToUTF8(surrounding_text), selection_range.start() - text_range.start(), selection_range.end() - text_range.start()); } -void InputMethodIBus::CancelComposition(const TextInputClient* client) { - if (context_focused_ && IsTextInputClientFocused(client)) +void InputMethodChromeOS::CancelComposition(const TextInputClient* client) { + if (IsInputFieldFocused() && IsTextInputClientFocused(client)) ResetContext(); } -void InputMethodIBus::OnInputLocaleChanged() { +void InputMethodChromeOS::OnInputLocaleChanged() { // Not supported. } -std::string InputMethodIBus::GetInputLocale() { +std::string InputMethodChromeOS::GetInputLocale() { // Not supported. return ""; } -base::i18n::TextDirection InputMethodIBus::GetInputTextDirection() { - // Not supported. - return base::i18n::UNKNOWN_DIRECTION; -} - -bool InputMethodIBus::IsActive() { +bool InputMethodChromeOS::IsActive() { return true; } -bool InputMethodIBus::IsCandidatePopupOpen() const { +bool InputMethodChromeOS::IsCandidatePopupOpen() const { // TODO(yukishiino): Implement this method. return false; } -void InputMethodIBus::OnWillChangeFocusedClient(TextInputClient* focused_before, - TextInputClient* focused) { +void InputMethodChromeOS::OnWillChangeFocusedClient( + TextInputClient* focused_before, + TextInputClient* focused) { ConfirmCompositionText(); + + if (GetEngine()) + GetEngine()->FocusOut(); } -void InputMethodIBus::OnDidChangeFocusedClient(TextInputClient* focused_before, - TextInputClient* focused) { +void InputMethodChromeOS::OnDidChangeFocusedClient( + TextInputClient* focused_before, + TextInputClient* focused) { // Force to update the input type since client's TextInputStateChanged() // function might not be called if text input types before the client loses // focus and after it acquires focus again are the same. - OnTextInputTypeChanged(focused); - UpdateContextFocusState(); - // Force to update caret bounds, in case the client thinks that the caret - // bounds has not changed. - OnCaretBoundsChanged(focused); + + if (GetEngine()) { + chromeos::IMEEngineHandlerInterface::InputContext context( + GetTextInputType(), GetTextInputMode()); + GetEngine()->FocusIn(context); + } } -void InputMethodIBus::ConfirmCompositionText() { +void InputMethodChromeOS::ConfirmCompositionText() { TextInputClient* client = GetTextInputClient(); if (client && client->HasCompositionText()) client->ConfirmCompositionText(); @@ -269,22 +284,12 @@ void InputMethodIBus::ConfirmCompositionText() { ResetContext(); } -void InputMethodIBus::ResetContext() { - if (!context_focused_ || !GetTextInputClient()) +void InputMethodChromeOS::ResetContext() { + if (!IsInputFieldFocused() || !GetTextInputClient()) return; DCHECK(system_toplevel_window_focused()); - // Because ibus runs in asynchronous mode, the input method may still send us - // results after sending out the reset request, so we use a flag to discard - // all results generated by previous key events. But because ibus does not - // have a mechanism to identify each key event and corresponding results, this - // approach will not work for some corner cases. For example if the user types - // very fast, then the next key event may come in before the |context_| is - // really reset. Then we actually cannot know whether or not the next - // result should be discard. - suppress_next_result_ = true; - composition_.Clear(); result_text_.clear(); composing_text_ = false; @@ -305,47 +310,24 @@ void InputMethodIBus::ResetContext() { character_composer_.Reset(); } -void InputMethodIBus::UpdateContextFocusState() { - const bool old_context_focused = context_focused_; - const TextInputType current_text_input_type = GetTextInputType(); - // Use switch here in case we are going to add more text input types. - switch (current_text_input_type) { - case TEXT_INPUT_TYPE_NONE: - case TEXT_INPUT_TYPE_PASSWORD: - context_focused_ = false; - break; - default: - context_focused_ = true; - break; - } +void InputMethodChromeOS::UpdateContextFocusState() { + ResetContext(); + OnInputMethodChanged(); // Propagate the focus event to the candidate window handler which also // manages the input method mode indicator. - chromeos::IBusPanelCandidateWindowHandlerInterface* candidate_window = - chromeos::IBusBridge::Get()->GetCandidateWindowHandler(); + chromeos::IMECandidateWindowHandlerInterface* candidate_window = + chromeos::IMEBridge::Get()->GetCandidateWindowHandler(); if (candidate_window) - candidate_window->FocusStateChanged(context_focused_); + candidate_window->FocusStateChanged(IsInputFieldFocused()); - if (!GetEngine()) - return; + chromeos::IMEBridge::Get()->SetCurrentTextInputType(GetTextInputType()); - // We only focus in |context_| when the focus is in a normal textfield. - // Even if focus is not changed, a text input type change causes a focus - // blink. - // ibus_input_context_focus_{in|out}() run asynchronously. - bool input_type_change = - (current_text_input_type != previous_textinput_type_); - if (old_context_focused && (!context_focused_ || input_type_change)) - GetEngine()->FocusOut(); - if (context_focused_ && (!old_context_focused || input_type_change)) { - chromeos::IBusEngineHandlerInterface::InputContext context( - current_text_input_type, GetTextInputMode()); - GetEngine()->FocusIn(context); + if (!IsTextInputTypeNone()) OnCaretBoundsChanged(GetTextInputClient()); - } } -void InputMethodIBus::ProcessKeyEventPostIME( +void InputMethodChromeOS::ProcessKeyEventPostIME( const ui::KeyEvent& event, bool handled) { TextInputClient* client = GetTextInputClient(); @@ -378,7 +360,8 @@ void InputMethodIBus::ProcessKeyEventPostIME( DispatchKeyEventPostIME(event); } -void InputMethodIBus::ProcessFilteredKeyPressEvent(const ui::KeyEvent& event) { +void InputMethodChromeOS::ProcessFilteredKeyPressEvent( + const ui::KeyEvent& event) { if (NeedInsertChar()) { DispatchKeyEventPostIME(event); } else { @@ -390,7 +373,7 @@ void InputMethodIBus::ProcessFilteredKeyPressEvent(const ui::KeyEvent& event) { } } -void InputMethodIBus::ProcessUnfilteredKeyPressEvent( +void InputMethodChromeOS::ProcessUnfilteredKeyPressEvent( const ui::KeyEvent& event) { const TextInputClient* prev_client = GetTextInputClient(); DispatchKeyEventPostIME(event); @@ -409,33 +392,19 @@ void InputMethodIBus::ProcessUnfilteredKeyPressEvent( // If a key event was not filtered by |context_| and |character_composer_|, // then it means the key event didn't generate any result text. So we need // to send corresponding character to the focused text input client. - const uint32 event_flags = event.flags(); - uint16 ch = 0; - if (event.HasNativeEvent()) { - const base::NativeEvent& native_event = event.native_event(); - - if (!(event_flags & ui::EF_CONTROL_DOWN)) - ch = ui::GetCharacterFromXEvent(native_event); - if (!ch) { - ch = ui::GetCharacterFromKeyCode( - ui::KeyboardCodeFromNative(native_event), event_flags); - } - } else { - ch = ui::GetCharacterFromKeyCode(event.key_code(), event_flags); - } - + uint16 ch = event.GetCharacter(); if (ch) - client->InsertChar(ch, event_flags); + client->InsertChar(ch, event.flags()); } -void InputMethodIBus::ProcessInputMethodResult(const ui::KeyEvent& event, +void InputMethodChromeOS::ProcessInputMethodResult(const ui::KeyEvent& event, bool handled) { TextInputClient* client = GetTextInputClient(); DCHECK(client); if (result_text_.length()) { if (handled && NeedInsertChar()) { - for (string16::const_iterator i = result_text_.begin(); + for (base::string16::const_iterator i = result_text_.begin(); i != result_text_.end(); ++i) { client->InsertChar(*i, event.flags()); } @@ -460,22 +429,32 @@ void InputMethodIBus::ProcessInputMethodResult(const ui::KeyEvent& event, composition_changed_ = false; } -bool InputMethodIBus::NeedInsertChar() const { +bool InputMethodChromeOS::NeedInsertChar() const { return GetTextInputClient() && (IsTextInputTypeNone() || (!composing_text_ && result_text_.length() == 1)); } -bool InputMethodIBus::HasInputMethodResult() const { +bool InputMethodChromeOS::HasInputMethodResult() const { return result_text_.length() || composition_changed_; } -void InputMethodIBus::AbandonAllPendingKeyEvents() { +void InputMethodChromeOS::SendFakeProcessKeyEvent(bool pressed) const { + if (!GetTextInputClient()) + return; + KeyEvent evt(pressed ? ET_KEY_PRESSED : ET_KEY_RELEASED, + pressed ? VKEY_PROCESSKEY : VKEY_UNKNOWN, + EF_IME_FABRICATED_KEY, + false); // is_char + DispatchKeyEventPostIME(evt); +} + +void InputMethodChromeOS::AbandonAllPendingKeyEvents() { pending_key_events_.clear(); } -void InputMethodIBus::CommitText(const std::string& text) { - if (suppress_next_result_ || text.empty()) +void InputMethodChromeOS::CommitText(const std::string& text) { + if (text.empty()) return; // We need to receive input method result even if the text input type is @@ -484,7 +463,7 @@ void InputMethodIBus::CommitText(const std::string& text) { if (!GetTextInputClient()) return; - const string16 utf16_text = UTF8ToUTF16(text); + const base::string16 utf16_text = base::UTF8ToUTF16(text); if (utf16_text.empty()) return; @@ -495,20 +474,23 @@ void InputMethodIBus::CommitText(const std::string& text) { // If we are not handling key event, do not bother sending text result if the // focused text input client does not support text input. if (pending_key_events_.empty() && !IsTextInputTypeNone()) { + SendFakeProcessKeyEvent(true); GetTextInputClient()->InsertText(utf16_text); + SendFakeProcessKeyEvent(false); result_text_.clear(); } } -void InputMethodIBus::UpdatePreeditText(const chromeos::IBusText& text, - uint32 cursor_pos, - bool visible) { - if (suppress_next_result_ || IsTextInputTypeNone()) +void InputMethodChromeOS::UpdateCompositionText( + const chromeos::CompositionText& text, + uint32 cursor_pos, + bool visible) { + if (IsTextInputTypeNone()) return; if (!CanComposeInline()) { - chromeos::IBusPanelCandidateWindowHandlerInterface* candidate_window = - chromeos::IBusBridge::Get()->GetCandidateWindowHandler(); + chromeos::IMECandidateWindowHandlerInterface* candidate_window = + chromeos::IMEBridge::Get()->GetCandidateWindowHandler(); if (candidate_window) candidate_window->UpdatePreeditText(text.text(), cursor_pos, visible); } @@ -536,13 +518,15 @@ void InputMethodIBus::UpdatePreeditText(const chromeos::IBusText& text, // If we receive a composition text without pending key event, then we need to // send it to the focused text input client directly. if (pending_key_events_.empty()) { + SendFakeProcessKeyEvent(true); GetTextInputClient()->SetCompositionText(composition_); + SendFakeProcessKeyEvent(false); composition_changed_ = false; composition_.Clear(); } } -void InputMethodIBus::HidePreeditText() { +void InputMethodChromeOS::HidePreeditText() { if (composition_.text.empty() || IsTextInputTypeNone()) return; @@ -552,13 +536,16 @@ void InputMethodIBus::HidePreeditText() { if (pending_key_events_.empty()) { TextInputClient* client = GetTextInputClient(); - if (client && client->HasCompositionText()) + if (client && client->HasCompositionText()) { + SendFakeProcessKeyEvent(true); client->ClearCompositionText(); + SendFakeProcessKeyEvent(false); + } composition_changed_ = false; } } -void InputMethodIBus::DeleteSurroundingText(int32 offset, uint32 length) { +void InputMethodChromeOS::DeleteSurroundingText(int32 offset, uint32 length) { if (!composition_.text.empty()) return; // do nothing if there is ongoing composition. if (offset < 0 && static_cast<uint32>(-1 * offset) != length) @@ -567,29 +554,29 @@ void InputMethodIBus::DeleteSurroundingText(int32 offset, uint32 length) { GetTextInputClient()->ExtendSelectionAndDelete(length, 0U); } -bool InputMethodIBus::ExecuteCharacterComposer(const ui::KeyEvent& event) { - bool consumed = character_composer_.FilterKeyPress(event); +bool InputMethodChromeOS::ExecuteCharacterComposer(const ui::KeyEvent& event) { + if (!character_composer_.FilterKeyPress(event)) + return false; - suppress_next_result_ = false; - chromeos::IBusText preedit; - preedit.set_text( - UTF16ToUTF8(character_composer_.preedit_string())); - UpdatePreeditText(preedit, preedit.text().size(), - !preedit.text().empty()); - std::string commit_text = - UTF16ToUTF8(character_composer_.composed_character()); + // CharacterComposer consumed the key event. Update the composition text. + chromeos::CompositionText preedit; + preedit.set_text(character_composer_.preedit_string()); + UpdateCompositionText(preedit, preedit.text().size(), + !preedit.text().empty()); + std::string commit_text = + base::UTF16ToUTF8(character_composer_.composed_character()); if (!commit_text.empty()) { CommitText(commit_text); } - return consumed; + return true; } -void InputMethodIBus::ExtractCompositionText( - const chromeos::IBusText& text, +void InputMethodChromeOS::ExtractCompositionText( + const chromeos::CompositionText& text, uint32 cursor_position, CompositionText* out_composition) const { out_composition->Clear(); - out_composition->text = UTF8ToUTF16(text.text()); + out_composition->text = text.text(); if (out_composition->text.empty()) return; @@ -613,7 +600,7 @@ void InputMethodIBus::ExtractCompositionText( out_composition->selection = gfx::Range(cursor_offset); - const std::vector<chromeos::IBusText::UnderlineAttribute>& + const std::vector<chromeos::CompositionText::UnderlineAttribute>& underline_attributes = text.underline_attributes(); if (!underline_attributes.empty()) { for (size_t i = 0; i < underline_attributes.size(); ++i) { @@ -621,14 +608,16 @@ void InputMethodIBus::ExtractCompositionText( const uint32 end = underline_attributes[i].end_index; if (start >= end) continue; - CompositionUnderline underline( - char16_offsets[start], char16_offsets[end], - SK_ColorBLACK, false /* thick */); + CompositionUnderline underline(char16_offsets[start], + char16_offsets[end], + SK_ColorBLACK, + false /* thick */, + SK_ColorTRANSPARENT); if (underline_attributes[i].type == - chromeos::IBusText::IBUS_TEXT_UNDERLINE_DOUBLE) + chromeos::CompositionText::COMPOSITION_TEXT_UNDERLINE_DOUBLE) underline.thick = true; else if (underline_attributes[i].type == - chromeos::IBusText::IBUS_TEXT_UNDERLINE_ERROR) + chromeos::CompositionText::COMPOSITION_TEXT_UNDERLINE_ERROR) underline.color = SK_ColorRED; out_composition->underlines.push_back(underline); } @@ -638,9 +627,11 @@ void InputMethodIBus::ExtractCompositionText( if (text.selection_start() < text.selection_end()) { const uint32 start = text.selection_start(); const uint32 end = text.selection_end(); - CompositionUnderline underline( - char16_offsets[start], char16_offsets[end], - SK_ColorBLACK, true /* thick */); + CompositionUnderline underline(char16_offsets[start], + char16_offsets[end], + SK_ColorBLACK, + true /* thick */, + SK_ColorTRANSPARENT); out_composition->underlines.push_back(underline); // If the cursor is at start or end of this underline, then we treat @@ -658,8 +649,13 @@ void InputMethodIBus::ExtractCompositionText( // Use a black thin underline by default. if (out_composition->underlines.empty()) { out_composition->underlines.push_back(CompositionUnderline( - 0, length, SK_ColorBLACK, false /* thick */)); + 0, length, SK_ColorBLACK, false /* thick */, SK_ColorTRANSPARENT)); } } +bool InputMethodChromeOS::IsInputFieldFocused() { + TextInputType type = GetTextInputType(); + return (type != TEXT_INPUT_TYPE_NONE) && (type != TEXT_INPUT_TYPE_PASSWORD); +} + } // namespace ui diff --git a/chromium/ui/base/ime/input_method_ibus.h b/chromium/ui/base/ime/input_method_chromeos.h index 01f958db16d..98b42aed445 100644 --- a/chromium/ui/base/ime/input_method_ibus.h +++ b/chromium/ui/base/ime/input_method_chromeos.h @@ -1,9 +1,9 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef UI_BASE_IME_INPUT_METHOD_IBUS_H_ -#define UI_BASE_IME_INPUT_METHOD_IBUS_H_ +#ifndef UI_BASE_IME_INPUT_METHOD_CHROMEOS_H_ +#define UI_BASE_IME_INPUT_METHOD_CHROMEOS_H_ #include <set> #include <string> @@ -13,28 +13,19 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "ui/base/ime/chromeos/character_composer.h" -#include "ui/base/ime/chromeos/ibus_bridge.h" +#include "ui/base/ime/chromeos/ime_bridge.h" #include "ui/base/ime/composition_text.h" #include "ui/base/ime/input_method_base.h" -namespace dbus { -class ObjectPath; -} -namespace chromeos { -namespace ibus { -class IBusText; -} // namespace ibus -} // namespace chromeos - namespace ui { // A ui::InputMethod implementation based on IBus. -class UI_EXPORT InputMethodIBus +class UI_BASE_EXPORT InputMethodChromeOS : public InputMethodBase, - public chromeos::IBusInputContextHandlerInterface { + public chromeos::IMEInputContextHandlerInterface { public: - explicit InputMethodIBus(internal::InputMethodDelegate* delegate); - virtual ~InputMethodIBus(); + explicit InputMethodChromeOS(internal::InputMethodDelegate* delegate); + virtual ~InputMethodChromeOS(); // Overridden from InputMethod: virtual void OnFocus() OVERRIDE; @@ -47,13 +38,12 @@ class UI_EXPORT InputMethodIBus virtual void CancelComposition(const TextInputClient* client) OVERRIDE; virtual void OnInputLocaleChanged() OVERRIDE; virtual std::string GetInputLocale() OVERRIDE; - virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE; virtual bool IsActive() OVERRIDE; virtual bool IsCandidatePopupOpen() const OVERRIDE; protected: // Converts |text| into CompositionText. - void ExtractCompositionText(const chromeos::IBusText& text, + void ExtractCompositionText(const chromeos::CompositionText& text, uint32 cursor_position, CompositionText* out_composition) const; @@ -98,6 +88,9 @@ class UI_EXPORT InputMethodIBus // Checks if there is pending input method result. bool HasInputMethodResult() const; + // Sends a fake key event for IME composing without physical key events. + void SendFakeProcessKeyEvent(bool pressed) const; + // Abandons all pending key events. It usually happends when we lose keyboard // focus, the text input type is changed or we are destroyed. void AbandonAllPendingKeyEvents(); @@ -106,19 +99,23 @@ class UI_EXPORT InputMethodIBus // true if character composer comsumes key event. bool ExecuteCharacterComposer(const ui::KeyEvent& event); - // chromeos::IBusInputContextHandlerInterface overrides: + // chromeos::IMEInputContextHandlerInterface overrides: virtual void CommitText(const std::string& text) OVERRIDE; - virtual void UpdatePreeditText(const chromeos::IBusText& text, - uint32 cursor_pos, - bool visible) OVERRIDE; + virtual void UpdateCompositionText(const chromeos::CompositionText& text, + uint32 cursor_pos, + bool visible) OVERRIDE; virtual void DeleteSurroundingText(int32 offset, uint32 length) OVERRIDE; // Hides the composition text. void HidePreeditText(); - // Callback function for IBusEngineHandlerInterface::ProcessKeyEvent. + // Callback function for IMEEngineHandlerInterface::ProcessKeyEvent. void ProcessKeyEventDone(uint32 id, ui::KeyEvent* event, bool is_handled); + // Returns whether an input field is focused. Note that password field is not + // considered as an input field. + bool IsInputFieldFocused(); + // All pending key events. Note: we do not own these object, we just save // pointers to these object so that we can abandon them when necessary. // They will be deleted in ProcessKeyEventDone(). @@ -132,24 +129,17 @@ class UI_EXPORT InputMethodIBus // Pending result text generated by the current pending key event. // It'll be sent to the focused text input client as soon as we receive the // processing result of the pending key event. - string16 result_text_; + base::string16 result_text_; - string16 previous_surrounding_text_; + base::string16 previous_surrounding_text_; gfx::Range previous_selection_range_; - // Indicates if input context is focused or not. - bool context_focused_; - // Indicates if there is an ongoing composition text. bool composing_text_; // Indicates if the composition text is changed or deleted. bool composition_changed_; - // If it's true then all input method result received before the next key - // event will be discarded. - bool suppress_next_result_; - // The latest id of key event. uint32 current_keyevent_id_; @@ -157,14 +147,12 @@ class UI_EXPORT InputMethodIBus // including dead key etc. CharacterComposer character_composer_; - TextInputType previous_textinput_type_; - // Used for making callbacks. - base::WeakPtrFactory<InputMethodIBus> weak_ptr_factory_; + base::WeakPtrFactory<InputMethodChromeOS> weak_ptr_factory_; - DISALLOW_COPY_AND_ASSIGN(InputMethodIBus); + DISALLOW_COPY_AND_ASSIGN(InputMethodChromeOS); }; } // namespace ui -#endif // UI_BASE_IME_INPUT_METHOD_IBUS_H_ +#endif // UI_BASE_IME_INPUT_METHOD_CHROMEOS_H_ diff --git a/chromium/ui/base/ime/input_method_ibus_unittest.cc b/chromium/ui/base/ime/input_method_chromeos_unittest.cc index e381aa4fb53..0470f0c36ad 100644 --- a/chromium/ui/base/ime/input_method_ibus_unittest.cc +++ b/chromium/ui/base/ime/input_method_chromeos_unittest.cc @@ -1,7 +1,9 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "ui/base/ime/input_method_chromeos.h" + #include <X11/Xlib.h> #undef Bool #undef FocusIn @@ -13,27 +15,33 @@ #include "base/i18n/char_iterator.h" #include "base/memory/scoped_ptr.h" #include "base/strings/utf_string_conversions.h" -#include "chromeos/dbus/dbus_thread_manager.h" -#include "chromeos/ime/ibus_keymap.h" -#include "chromeos/ime/ibus_text.h" +#include "chromeos/ime/composition_text.h" #include "testing/gtest/include/gtest/gtest.h" -#include "ui/base/ime/chromeos/ibus_bridge.h" +#include "ui/base/ime/chromeos/ime_bridge.h" #include "ui/base/ime/chromeos/mock_ime_candidate_window_handler.h" #include "ui/base/ime/chromeos/mock_ime_engine_handler.h" #include "ui/base/ime/input_method_delegate.h" -#include "ui/base/ime/input_method_ibus.h" #include "ui/base/ime/text_input_client.h" +#include "ui/base/ime/text_input_focus_manager.h" +#include "ui/base/ui_base_switches_util.h" #include "ui/events/event.h" #include "ui/events/test/events_test_utils_x11.h" -#include "ui/gfx/rect.h" +#include "ui/gfx/geometry/rect.h" + +using base::UTF8ToUTF16; +using base::UTF16ToUTF8; namespace ui { namespace { -typedef chromeos::IBusEngineHandlerInterface::KeyEventDoneCallback + +const base::string16 kSampleText = base::UTF8ToUTF16( + "\xE3\x81\x82\xE3\x81\x84\xE3\x81\x86\xE3\x81\x88\xE3\x81\x8A"); + +typedef chromeos::IMEEngineHandlerInterface::KeyEventDoneCallback KeyEventCallback; -uint32 GetOffsetInUTF16(const std::string& utf8_string, uint32 utf8_offset) { - string16 utf16_string = UTF8ToUTF16(utf8_string); +uint32 GetOffsetInUTF16( + const base::string16& utf16_string, uint32 utf8_offset) { DCHECK_LT(utf8_offset, utf16_string.size()); base::i18n::UTF16CharIterator char_iterator(&utf16_string); for (size_t i = 0; i < utf8_offset; ++i) @@ -57,10 +65,10 @@ enum KeyEventHandlerBehavior { } // namespace -class TestableInputMethodIBus : public InputMethodIBus { +class TestableInputMethodChromeOS : public InputMethodChromeOS { public: - explicit TestableInputMethodIBus(internal::InputMethodDelegate* delegate) - : InputMethodIBus(delegate), + explicit TestableInputMethodChromeOS(internal::InputMethodDelegate* delegate) + : InputMethodChromeOS(delegate), process_key_event_post_ime_call_count_(0) { } @@ -70,7 +78,7 @@ class TestableInputMethodIBus : public InputMethodIBus { bool handled; }; - // InputMethodIBus override. + // Overridden from InputMethodChromeOS: virtual void ProcessKeyEventPostIME(const ui::KeyEvent& key_event, bool handled) OVERRIDE { process_key_event_post_ime_args_.event = &key_event; @@ -91,8 +99,8 @@ class TestableInputMethodIBus : public InputMethodIBus { } // Change access rights for testing. - using InputMethodIBus::ExtractCompositionText; - using InputMethodIBus::ResetContext; + using InputMethodChromeOS::ExtractCompositionText; + using InputMethodChromeOS::ResetContext; private: ProcessKeyEventPostIMEArgs process_key_event_post_ime_args_; @@ -190,62 +198,60 @@ class SetSurroundingTextVerifier { DISALLOW_COPY_AND_ASSIGN(SetSurroundingTextVerifier); }; -class InputMethodIBusTest : public internal::InputMethodDelegate, - public testing::Test, - public TextInputClient { +class InputMethodChromeOSTest : public internal::InputMethodDelegate, + public testing::Test, + public TextInputClient { public: - InputMethodIBusTest() { + InputMethodChromeOSTest() + : dispatched_key_event_(ui::ET_UNKNOWN, ui::VKEY_UNKNOWN, 0, false) { ResetFlags(); } - virtual ~InputMethodIBusTest() { + virtual ~InputMethodChromeOSTest() { } - // testing::Test overrides: virtual void SetUp() OVERRIDE { - chromeos::IBusBridge::Initialize(); + chromeos::IMEBridge::Initialize(); mock_ime_engine_handler_.reset( new chromeos::MockIMEEngineHandler()); - chromeos::IBusBridge::Get()->SetCurrentEngineHandler( + chromeos::IMEBridge::Get()->SetCurrentEngineHandler( mock_ime_engine_handler_.get()); mock_ime_candidate_window_handler_.reset( new chromeos::MockIMECandidateWindowHandler()); - chromeos::IBusBridge::Get()->SetCandidateWindowHandler( + chromeos::IMEBridge::Get()->SetCandidateWindowHandler( mock_ime_candidate_window_handler_.get()); - ime_.reset(new TestableInputMethodIBus(this)); - ime_->SetFocusedTextInputClient(this); + ime_.reset(new TestableInputMethodChromeOS(this)); + if (switches::IsTextInputFocusManagerEnabled()) + TextInputFocusManager::GetInstance()->FocusTextInputClient(this); + else + ime_->SetFocusedTextInputClient(this); } virtual void TearDown() OVERRIDE { - if (ime_.get()) - ime_->SetFocusedTextInputClient(NULL); + if (ime_.get()) { + if (switches::IsTextInputFocusManagerEnabled()) + TextInputFocusManager::GetInstance()->BlurTextInputClient(this); + else + ime_->SetFocusedTextInputClient(NULL); + } ime_.reset(); - chromeos::IBusBridge::Get()->SetCurrentEngineHandler(NULL); - chromeos::IBusBridge::Get()->SetCandidateWindowHandler(NULL); + chromeos::IMEBridge::Get()->SetCurrentEngineHandler(NULL); + chromeos::IMEBridge::Get()->SetCandidateWindowHandler(NULL); mock_ime_engine_handler_.reset(); mock_ime_candidate_window_handler_.reset(); - chromeos::IBusBridge::Shutdown(); + chromeos::IMEBridge::Shutdown(); } - // ui::internal::InputMethodDelegate overrides: - virtual bool DispatchKeyEventPostIME( - const base::NativeEvent& native_key_event) OVERRIDE { - dispatched_native_event_ = native_key_event; - return false; - } - virtual bool DispatchFabricatedKeyEventPostIME(ui::EventType type, - ui::KeyboardCode key_code, - int flags) OVERRIDE { - dispatched_fabricated_event_type_ = type; - dispatched_fabricated_event_key_code_ = key_code; - dispatched_fabricated_event_flags_ = flags; + // Overridden from ui::internal::InputMethodDelegate: + virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) OVERRIDE { + dispatched_key_event_ = event; return false; } - // ui::TextInputClient overrides: + // Overridden from ui::TextInputClient: virtual void SetCompositionText( const CompositionText& composition) OVERRIDE { composition_text_ = composition; @@ -257,10 +263,10 @@ class InputMethodIBusTest : public internal::InputMethodDelegate, virtual void ClearCompositionText() OVERRIDE { composition_text_.Clear(); } - virtual void InsertText(const string16& text) OVERRIDE { + virtual void InsertText(const base::string16& text) OVERRIDE { inserted_text_ = text; } - virtual void InsertChar(char16 ch, int flags) OVERRIDE { + virtual void InsertChar(base::char16 ch, int flags) OVERRIDE { inserted_char_ = ch; inserted_char_flags_ = flags; } @@ -299,10 +305,12 @@ class InputMethodIBusTest : public internal::InputMethodDelegate, return true; } - virtual bool SetSelectionRange(const gfx::Range& range) OVERRIDE { return false; } + virtual bool SetSelectionRange(const gfx::Range& range) OVERRIDE { + return false; + } virtual bool DeleteRange(const gfx::Range& range) OVERRIDE { return false; } virtual bool GetTextFromRange(const gfx::Range& range, - string16* text) const OVERRIDE { + base::string16* text) const OVERRIDE { *text = surrounding_text_.substr(range.GetMin(), range.length()); return true; } @@ -312,26 +320,23 @@ class InputMethodIBusTest : public internal::InputMethodDelegate, virtual bool ChangeTextDirectionAndLayoutAlignment( base::i18n::TextDirection direction) OVERRIDE { return false; } virtual void ExtendSelectionAndDelete(size_t before, - size_t after) OVERRIDE { } - virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE { } - virtual void OnCandidateWindowShown() OVERRIDE { } - virtual void OnCandidateWindowUpdated() OVERRIDE { } - virtual void OnCandidateWindowHidden() OVERRIDE { } + size_t after) OVERRIDE {} + virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE {} + virtual void OnCandidateWindowShown() OVERRIDE {} + virtual void OnCandidateWindowUpdated() OVERRIDE {} + virtual void OnCandidateWindowHidden() OVERRIDE {} + virtual bool IsEditingCommandEnabled(int command_id) OVERRIDE { + return false; + } + virtual void ExecuteEditingCommand(int command_id) OVERRIDE {} bool HasNativeEvent() const { - base::NativeEvent empty; - std::memset(&empty, 0, sizeof(empty)); - return !!std::memcmp(&dispatched_native_event_, - &empty, - sizeof(dispatched_native_event_)); + return dispatched_key_event_.HasNativeEvent(); } void ResetFlags() { - std::memset(&dispatched_native_event_, 0, sizeof(dispatched_native_event_)); - DCHECK(!HasNativeEvent()); - dispatched_fabricated_event_type_ = ET_UNKNOWN; - dispatched_fabricated_event_key_code_ = VKEY_UNKNOWN; - dispatched_fabricated_event_flags_ = 0; + dispatched_key_event_ = ui::KeyEvent(ui::ET_UNKNOWN, ui::VKEY_UNKNOWN, 0, + false); composition_text_.Clear(); confirmed_text_.Clear(); @@ -346,21 +351,17 @@ class InputMethodIBusTest : public internal::InputMethodDelegate, caret_bounds_ = gfx::Rect(); } - scoped_ptr<TestableInputMethodIBus> ime_; + scoped_ptr<TestableInputMethodChromeOS> ime_; - // Variables for remembering the parameters that are passed to - // ui::internal::InputMethodDelegate functions. - base::NativeEvent dispatched_native_event_; - ui::EventType dispatched_fabricated_event_type_; - ui::KeyboardCode dispatched_fabricated_event_key_code_; - int dispatched_fabricated_event_flags_; + // Copy of the dispatched key event. + ui::KeyEvent dispatched_key_event_; // Variables for remembering the parameters that are passed to // ui::TextInputClient functions. CompositionText composition_text_; CompositionText confirmed_text_; - string16 inserted_text_; - char16 inserted_char_; + base::string16 inserted_text_; + base::char16 inserted_char_; unsigned int on_input_method_changed_call_count_; int inserted_char_flags_; @@ -371,36 +372,30 @@ class InputMethodIBusTest : public internal::InputMethodDelegate, gfx::Rect caret_bounds_; gfx::Range text_range_; gfx::Range selection_range_; - string16 surrounding_text_; + base::string16 surrounding_text_; scoped_ptr<chromeos::MockIMEEngineHandler> mock_ime_engine_handler_; scoped_ptr<chromeos::MockIMECandidateWindowHandler> mock_ime_candidate_window_handler_; - DISALLOW_COPY_AND_ASSIGN(InputMethodIBusTest); + DISALLOW_COPY_AND_ASSIGN(InputMethodChromeOSTest); }; // Tests public APIs in ui::InputMethod first. -TEST_F(InputMethodIBusTest, GetInputLocale) { - // ui::InputMethodIBus does not support the API. +TEST_F(InputMethodChromeOSTest, GetInputLocale) { + // ui::InputMethodChromeOS does not support the API. ime_->Init(true); EXPECT_EQ("", ime_->GetInputLocale()); } -TEST_F(InputMethodIBusTest, GetInputTextDirection) { - // ui::InputMethodIBus does not support the API. - ime_->Init(true); - EXPECT_EQ(base::i18n::UNKNOWN_DIRECTION, ime_->GetInputTextDirection()); -} - -TEST_F(InputMethodIBusTest, IsActive) { +TEST_F(InputMethodChromeOSTest, IsActive) { ime_->Init(true); - // ui::InputMethodIBus always returns true. + // ui::InputMethodChromeOS always returns true. EXPECT_TRUE(ime_->IsActive()); } -TEST_F(InputMethodIBusTest, GetInputTextType) { +TEST_F(InputMethodChromeOSTest, GetInputTextType) { ime_->Init(true); EXPECT_EQ(TEXT_INPUT_TYPE_NONE, ime_->GetTextInputType()); input_type_ = TEXT_INPUT_TYPE_PASSWORD; @@ -411,7 +406,7 @@ TEST_F(InputMethodIBusTest, GetInputTextType) { EXPECT_EQ(TEXT_INPUT_TYPE_TEXT, ime_->GetTextInputType()); } -TEST_F(InputMethodIBusTest, CanComposeInline) { +TEST_F(InputMethodChromeOSTest, CanComposeInline) { ime_->Init(true); EXPECT_TRUE(ime_->CanComposeInline()); can_compose_inline_ = false; @@ -419,44 +414,64 @@ TEST_F(InputMethodIBusTest, CanComposeInline) { EXPECT_FALSE(ime_->CanComposeInline()); } -TEST_F(InputMethodIBusTest, GetTextInputClient) { +TEST_F(InputMethodChromeOSTest, GetTextInputClient) { ime_->Init(true); EXPECT_EQ(this, ime_->GetTextInputClient()); - ime_->SetFocusedTextInputClient(NULL); + if (switches::IsTextInputFocusManagerEnabled()) + TextInputFocusManager::GetInstance()->BlurTextInputClient(this); + else + ime_->SetFocusedTextInputClient(NULL); EXPECT_EQ(NULL, ime_->GetTextInputClient()); } -TEST_F(InputMethodIBusTest, GetInputTextType_WithoutFocusedClient) { +TEST_F(InputMethodChromeOSTest, GetInputTextType_WithoutFocusedClient) { ime_->Init(true); EXPECT_EQ(TEXT_INPUT_TYPE_NONE, ime_->GetTextInputType()); - ime_->SetFocusedTextInputClient(NULL); + if (switches::IsTextInputFocusManagerEnabled()) + TextInputFocusManager::GetInstance()->BlurTextInputClient(this); + else + ime_->SetFocusedTextInputClient(NULL); input_type_ = TEXT_INPUT_TYPE_PASSWORD; ime_->OnTextInputTypeChanged(this); // The OnTextInputTypeChanged() call above should be ignored since |this| is // not the current focused client. EXPECT_EQ(TEXT_INPUT_TYPE_NONE, ime_->GetTextInputType()); - ime_->SetFocusedTextInputClient(this); + if (switches::IsTextInputFocusManagerEnabled()) + TextInputFocusManager::GetInstance()->FocusTextInputClient(this); + else + ime_->SetFocusedTextInputClient(this); ime_->OnTextInputTypeChanged(this); EXPECT_EQ(TEXT_INPUT_TYPE_PASSWORD, ime_->GetTextInputType()); } -TEST_F(InputMethodIBusTest, GetInputTextType_WithoutFocusedWindow) { +TEST_F(InputMethodChromeOSTest, GetInputTextType_WithoutFocusedWindow) { ime_->Init(true); EXPECT_EQ(TEXT_INPUT_TYPE_NONE, ime_->GetTextInputType()); - ime_->OnBlur(); + if (switches::IsTextInputFocusManagerEnabled()) + TextInputFocusManager::GetInstance()->BlurTextInputClient(this); + else + ime_->OnBlur(); input_type_ = TEXT_INPUT_TYPE_PASSWORD; ime_->OnTextInputTypeChanged(this); // The OnTextInputTypeChanged() call above should be ignored since the top- // level window which the ime_ is attached to is not currently focused. EXPECT_EQ(TEXT_INPUT_TYPE_NONE, ime_->GetTextInputType()); - ime_->OnFocus(); + if (switches::IsTextInputFocusManagerEnabled()) + TextInputFocusManager::GetInstance()->FocusTextInputClient(this); + else + ime_->OnFocus(); ime_->OnTextInputTypeChanged(this); EXPECT_EQ(TEXT_INPUT_TYPE_PASSWORD, ime_->GetTextInputType()); } -TEST_F(InputMethodIBusTest, GetInputTextType_WithoutFocusedWindow2) { +TEST_F(InputMethodChromeOSTest, GetInputTextType_WithoutFocusedWindow2) { + // We no longer support the case that |ime_->Init(false)| because no one + // actually uses it. + if (switches::IsTextInputFocusManagerEnabled()) + return; + ime_->Init(false); // the top-level is initially unfocused. EXPECT_EQ(TEXT_INPUT_TYPE_NONE, ime_->GetTextInputType()); input_type_ = TEXT_INPUT_TYPE_PASSWORD; @@ -470,7 +485,7 @@ TEST_F(InputMethodIBusTest, GetInputTextType_WithoutFocusedWindow2) { // Confirm that IBusClient::FocusIn is called on "connected" if input_type_ is // TEXT. -TEST_F(InputMethodIBusTest, FocusIn_Text) { +TEST_F(InputMethodChromeOSTest, FocusIn_Text) { ime_->Init(true); // A context shouldn't be created since the daemon is not running. EXPECT_EQ(0U, on_input_method_changed_call_count_); @@ -483,25 +498,25 @@ TEST_F(InputMethodIBusTest, FocusIn_Text) { 1, mock_ime_candidate_window_handler_->set_cursor_bounds_call_count()); // ui::TextInputClient::OnInputMethodChanged() should be called when - // ui::InputMethodIBus connects/disconnects to/from ibus-daemon and the + // ui::InputMethodChromeOS connects/disconnects to/from ibus-daemon and the // current text input type is not NONE. EXPECT_EQ(1U, on_input_method_changed_call_count_); } -// Confirm that IBusClient::FocusIn is NOT called on "connected" if input_type_ -// is PASSWORD. -TEST_F(InputMethodIBusTest, FocusIn_Password) { +// Confirm that InputMethodEngine::FocusIn is called on "connected" even if +// input_type_ is PASSWORD. +TEST_F(InputMethodChromeOSTest, FocusIn_Password) { ime_->Init(true); EXPECT_EQ(0U, on_input_method_changed_call_count_); input_type_ = TEXT_INPUT_TYPE_PASSWORD; ime_->OnTextInputTypeChanged(this); - // Since a form has focus, IBusClient::FocusIn() should NOT be called. - EXPECT_EQ(0, mock_ime_engine_handler_->focus_in_call_count()); + // InputMethodEngine::FocusIn() should be called even for password field. + EXPECT_EQ(1, mock_ime_engine_handler_->focus_in_call_count()); EXPECT_EQ(1U, on_input_method_changed_call_count_); } // Confirm that IBusClient::FocusOut is called as expected. -TEST_F(InputMethodIBusTest, FocusOut_None) { +TEST_F(InputMethodChromeOSTest, FocusOut_None) { input_type_ = TEXT_INPUT_TYPE_TEXT; ime_->Init(true); EXPECT_EQ(1, mock_ime_engine_handler_->focus_in_call_count()); @@ -513,19 +528,19 @@ TEST_F(InputMethodIBusTest, FocusOut_None) { } // Confirm that IBusClient::FocusOut is called as expected. -TEST_F(InputMethodIBusTest, FocusOut_Password) { +TEST_F(InputMethodChromeOSTest, FocusOut_Password) { input_type_ = TEXT_INPUT_TYPE_TEXT; ime_->Init(true); EXPECT_EQ(1, mock_ime_engine_handler_->focus_in_call_count()); EXPECT_EQ(0, mock_ime_engine_handler_->focus_out_call_count()); input_type_ = TEXT_INPUT_TYPE_PASSWORD; ime_->OnTextInputTypeChanged(this); - EXPECT_EQ(1, mock_ime_engine_handler_->focus_in_call_count()); + EXPECT_EQ(2, mock_ime_engine_handler_->focus_in_call_count()); EXPECT_EQ(1, mock_ime_engine_handler_->focus_out_call_count()); } // FocusIn/FocusOut scenario test -TEST_F(InputMethodIBusTest, Focus_Scenario) { +TEST_F(InputMethodChromeOSTest, Focus_Scenario) { ime_->Init(true); // Confirm that both FocusIn and FocusOut are NOT called. EXPECT_EQ(0, mock_ime_engine_handler_->focus_in_call_count()); @@ -549,28 +564,41 @@ TEST_F(InputMethodIBusTest, Focus_Scenario) { input_mode_ = TEXT_INPUT_MODE_KANA; ime_->OnTextInputTypeChanged(this); - // Confirm that both FocusIn and FocusOut are NOT called. - EXPECT_EQ(1, mock_ime_engine_handler_->focus_in_call_count()); - EXPECT_EQ(0, mock_ime_engine_handler_->focus_out_call_count()); + // Confirm that both FocusIn and FocusOut are called for mode change. + EXPECT_EQ(2, mock_ime_engine_handler_->focus_in_call_count()); + EXPECT_EQ(1, mock_ime_engine_handler_->focus_out_call_count()); EXPECT_EQ(TEXT_INPUT_TYPE_TEXT, mock_ime_engine_handler_->last_text_input_context().type); - EXPECT_EQ(TEXT_INPUT_MODE_LATIN, + EXPECT_EQ(TEXT_INPUT_MODE_KANA, mock_ime_engine_handler_->last_text_input_context().mode); input_type_ = TEXT_INPUT_TYPE_URL; ime_->OnTextInputTypeChanged(this); // Confirm that both FocusIn and FocusOut are called and the TextInputType is - // URL. - EXPECT_EQ(2, mock_ime_engine_handler_->focus_in_call_count()); - EXPECT_EQ(1, mock_ime_engine_handler_->focus_out_call_count()); + // changed to URL. + EXPECT_EQ(3, mock_ime_engine_handler_->focus_in_call_count()); + EXPECT_EQ(2, mock_ime_engine_handler_->focus_out_call_count()); EXPECT_EQ(TEXT_INPUT_TYPE_URL, mock_ime_engine_handler_->last_text_input_context().type); EXPECT_EQ(TEXT_INPUT_MODE_KANA, mock_ime_engine_handler_->last_text_input_context().mode); + + // When IsTextInputFocusManagerEnabled, InputMethod::SetFocusedTextInputClient + // is not supported and it's no-op. + if (switches::IsTextInputFocusManagerEnabled()) + return; + // Confirm that FocusOut is called when set focus to NULL client. + ime_->SetFocusedTextInputClient(NULL); + EXPECT_EQ(3, mock_ime_engine_handler_->focus_in_call_count()); + EXPECT_EQ(3, mock_ime_engine_handler_->focus_out_call_count()); + // Confirm that FocusIn is called when set focus to this client. + ime_->SetFocusedTextInputClient(this); + EXPECT_EQ(4, mock_ime_engine_handler_->focus_in_call_count()); + EXPECT_EQ(3, mock_ime_engine_handler_->focus_out_call_count()); } // Test if the new |caret_bounds_| is correctly sent to ibus-daemon. -TEST_F(InputMethodIBusTest, OnCaretBoundsChanged) { +TEST_F(InputMethodChromeOSTest, OnCaretBoundsChanged) { input_type_ = TEXT_INPUT_TYPE_TEXT; ime_->Init(true); EXPECT_EQ( @@ -588,24 +616,24 @@ TEST_F(InputMethodIBusTest, OnCaretBoundsChanged) { mock_ime_candidate_window_handler_->set_cursor_bounds_call_count()); caret_bounds_ = gfx::Rect(0, 2, 3, 4); // unchanged ime_->OnCaretBoundsChanged(this); - // Current InputMethodIBus implementation performs the IPC regardless of the - // bounds are changed or not. + // Current InputMethodChromeOS implementation performs the IPC + // regardless of the bounds are changed or not. EXPECT_EQ( 4, mock_ime_candidate_window_handler_->set_cursor_bounds_call_count()); } -TEST_F(InputMethodIBusTest, ExtractCompositionTextTest_NoAttribute) { - const char kSampleText[] = "Sample Text"; +TEST_F(InputMethodChromeOSTest, ExtractCompositionTextTest_NoAttribute) { + const base::string16 kSampleAsciiText = UTF8ToUTF16("Sample Text"); const uint32 kCursorPos = 2UL; - const string16 utf16_string = UTF8ToUTF16(kSampleText); - chromeos::IBusText ibus_text; - ibus_text.set_text(kSampleText); + chromeos::CompositionText chromeos_composition_text; + chromeos_composition_text.set_text(kSampleAsciiText); CompositionText composition_text; - ime_->ExtractCompositionText(ibus_text, kCursorPos, &composition_text); - EXPECT_EQ(UTF8ToUTF16(kSampleText), composition_text.text); + ime_->ExtractCompositionText( + chromeos_composition_text, kCursorPos, &composition_text); + EXPECT_EQ(kSampleAsciiText, composition_text.text); // If there is no selection, |selection| represents cursor position. EXPECT_EQ(kCursorPos, composition_text.selection.start()); EXPECT_EQ(kCursorPos, composition_text.selection.end()); @@ -613,27 +641,27 @@ TEST_F(InputMethodIBusTest, ExtractCompositionTextTest_NoAttribute) { // whole text underline. ASSERT_EQ(1UL, composition_text.underlines.size()); EXPECT_EQ(0UL, composition_text.underlines[0].start_offset); - EXPECT_EQ(utf16_string.size(), composition_text.underlines[0].end_offset); + EXPECT_EQ(kSampleAsciiText.size(), composition_text.underlines[0].end_offset); EXPECT_FALSE(composition_text.underlines[0].thick); } -TEST_F(InputMethodIBusTest, ExtractCompositionTextTest_SingleUnderline) { - const char kSampleText[] = "\xE3\x81\x82\xE3\x81\x84\xE3\x81\x86" - "\xE3\x81\x88\xE3\x81\x8A"; +TEST_F(InputMethodChromeOSTest, ExtractCompositionTextTest_SingleUnderline) { const uint32 kCursorPos = 2UL; - // Set up ibus text with one underline attribute. - chromeos::IBusText ibus_text; - ibus_text.set_text(kSampleText); - chromeos::IBusText::UnderlineAttribute underline; - underline.type = chromeos::IBusText::IBUS_TEXT_UNDERLINE_SINGLE; + // Set up chromeos composition text with one underline attribute. + chromeos::CompositionText chromeos_composition_text; + chromeos_composition_text.set_text(kSampleText); + chromeos::CompositionText::UnderlineAttribute underline; + underline.type = chromeos::CompositionText::COMPOSITION_TEXT_UNDERLINE_SINGLE; underline.start_index = 1UL; underline.end_index = 4UL; - ibus_text.mutable_underline_attributes()->push_back(underline); + chromeos_composition_text.mutable_underline_attributes()->push_back( + underline); CompositionText composition_text; - ime_->ExtractCompositionText(ibus_text, kCursorPos, &composition_text); - EXPECT_EQ(UTF8ToUTF16(kSampleText), composition_text.text); + ime_->ExtractCompositionText( + chromeos_composition_text, kCursorPos, &composition_text); + EXPECT_EQ(kSampleText, composition_text.text); // If there is no selection, |selection| represents cursor position. EXPECT_EQ(kCursorPos, composition_text.selection.start()); EXPECT_EQ(kCursorPos, composition_text.selection.end()); @@ -645,25 +673,27 @@ TEST_F(InputMethodIBusTest, ExtractCompositionTextTest_SingleUnderline) { // Single underline represents as black thin line. EXPECT_EQ(SK_ColorBLACK, composition_text.underlines[0].color); EXPECT_FALSE(composition_text.underlines[0].thick); + EXPECT_EQ(static_cast<SkColor>(SK_ColorTRANSPARENT), + composition_text.underlines[0].background_color); } -TEST_F(InputMethodIBusTest, ExtractCompositionTextTest_DoubleUnderline) { - const char kSampleText[] = "\xE3\x81\x82\xE3\x81\x84\xE3\x81\x86" - "\xE3\x81\x88\xE3\x81\x8A"; +TEST_F(InputMethodChromeOSTest, ExtractCompositionTextTest_DoubleUnderline) { const uint32 kCursorPos = 2UL; - // Set up ibus text with one underline attribute. - chromeos::IBusText ibus_text; - ibus_text.set_text(kSampleText); - chromeos::IBusText::UnderlineAttribute underline; - underline.type = chromeos::IBusText::IBUS_TEXT_UNDERLINE_DOUBLE; + // Set up chromeos composition text with one underline attribute. + chromeos::CompositionText chromeos_composition_text; + chromeos_composition_text.set_text(kSampleText); + chromeos::CompositionText::UnderlineAttribute underline; + underline.type = chromeos::CompositionText::COMPOSITION_TEXT_UNDERLINE_DOUBLE; underline.start_index = 1UL; underline.end_index = 4UL; - ibus_text.mutable_underline_attributes()->push_back(underline); + chromeos_composition_text.mutable_underline_attributes()->push_back( + underline); CompositionText composition_text; - ime_->ExtractCompositionText(ibus_text, kCursorPos, &composition_text); - EXPECT_EQ(UTF8ToUTF16(kSampleText), composition_text.text); + ime_->ExtractCompositionText( + chromeos_composition_text, kCursorPos, &composition_text); + EXPECT_EQ(kSampleText, composition_text.text); // If there is no selection, |selection| represents cursor position. EXPECT_EQ(kCursorPos, composition_text.selection.start()); EXPECT_EQ(kCursorPos, composition_text.selection.end()); @@ -675,25 +705,27 @@ TEST_F(InputMethodIBusTest, ExtractCompositionTextTest_DoubleUnderline) { // Double underline represents as black thick line. EXPECT_EQ(SK_ColorBLACK, composition_text.underlines[0].color); EXPECT_TRUE(composition_text.underlines[0].thick); + EXPECT_EQ(static_cast<SkColor>(SK_ColorTRANSPARENT), + composition_text.underlines[0].background_color); } -TEST_F(InputMethodIBusTest, ExtractCompositionTextTest_ErrorUnderline) { - const char kSampleText[] = "\xE3\x81\x82\xE3\x81\x84\xE3\x81\x86" - "\xE3\x81\x88\xE3\x81\x8A"; +TEST_F(InputMethodChromeOSTest, ExtractCompositionTextTest_ErrorUnderline) { const uint32 kCursorPos = 2UL; - // Set up ibus text with one underline attribute. - chromeos::IBusText ibus_text; - ibus_text.set_text(kSampleText); - chromeos::IBusText::UnderlineAttribute underline; - underline.type = chromeos::IBusText::IBUS_TEXT_UNDERLINE_ERROR; + // Set up chromeos composition text with one underline attribute. + chromeos::CompositionText chromeos_composition_text; + chromeos_composition_text.set_text(kSampleText); + chromeos::CompositionText::UnderlineAttribute underline; + underline.type = chromeos::CompositionText::COMPOSITION_TEXT_UNDERLINE_ERROR; underline.start_index = 1UL; underline.end_index = 4UL; - ibus_text.mutable_underline_attributes()->push_back(underline); + chromeos_composition_text.mutable_underline_attributes()->push_back( + underline); CompositionText composition_text; - ime_->ExtractCompositionText(ibus_text, kCursorPos, &composition_text); - EXPECT_EQ(UTF8ToUTF16(kSampleText), composition_text.text); + ime_->ExtractCompositionText( + chromeos_composition_text, kCursorPos, &composition_text); + EXPECT_EQ(kSampleText, composition_text.text); EXPECT_EQ(kCursorPos, composition_text.selection.start()); EXPECT_EQ(kCursorPos, composition_text.selection.end()); ASSERT_EQ(1UL, composition_text.underlines.size()); @@ -706,91 +738,103 @@ TEST_F(InputMethodIBusTest, ExtractCompositionTextTest_ErrorUnderline) { EXPECT_FALSE(composition_text.underlines[0].thick); } -TEST_F(InputMethodIBusTest, ExtractCompositionTextTest_Selection) { - const char kSampleText[] = "\xE3\x81\x82\xE3\x81\x84\xE3\x81\x86" - "\xE3\x81\x88\xE3\x81\x8A"; +TEST_F(InputMethodChromeOSTest, ExtractCompositionTextTest_Selection) { const uint32 kCursorPos = 2UL; - // Set up ibus text with one underline attribute. - chromeos::IBusText ibus_text; - ibus_text.set_text(kSampleText); - ibus_text.set_selection_start(1UL); - ibus_text.set_selection_end(4UL); + // Set up chromeos composition text with one underline attribute. + chromeos::CompositionText chromeos_composition_text; + chromeos_composition_text.set_text(kSampleText); + chromeos_composition_text.set_selection_start(1UL); + chromeos_composition_text.set_selection_end(4UL); CompositionText composition_text; - ime_->ExtractCompositionText(ibus_text, kCursorPos, &composition_text); - EXPECT_EQ(UTF8ToUTF16(kSampleText), composition_text.text); + ime_->ExtractCompositionText( + chromeos_composition_text, kCursorPos, &composition_text); + EXPECT_EQ(kSampleText, composition_text.text); EXPECT_EQ(kCursorPos, composition_text.selection.start()); EXPECT_EQ(kCursorPos, composition_text.selection.end()); ASSERT_EQ(1UL, composition_text.underlines.size()); - EXPECT_EQ(GetOffsetInUTF16(kSampleText, ibus_text.selection_start()), + EXPECT_EQ(GetOffsetInUTF16(kSampleText, + chromeos_composition_text.selection_start()), composition_text.underlines[0].start_offset); - EXPECT_EQ(GetOffsetInUTF16(kSampleText, ibus_text.selection_end()), + EXPECT_EQ(GetOffsetInUTF16(kSampleText, + chromeos_composition_text.selection_end()), composition_text.underlines[0].end_offset); EXPECT_EQ(SK_ColorBLACK, composition_text.underlines[0].color); EXPECT_TRUE(composition_text.underlines[0].thick); + EXPECT_EQ(static_cast<SkColor>(SK_ColorTRANSPARENT), + composition_text.underlines[0].background_color); } -TEST_F(InputMethodIBusTest, +TEST_F(InputMethodChromeOSTest, ExtractCompositionTextTest_SelectionStartWithCursor) { - const char kSampleText[] = "\xE3\x81\x82\xE3\x81\x84\xE3\x81\x86" - "\xE3\x81\x88\xE3\x81\x8A"; const uint32 kCursorPos = 1UL; - // Set up ibus text with one underline attribute. - chromeos::IBusText ibus_text; - ibus_text.set_text(kSampleText); - ibus_text.set_selection_start(kCursorPos); - ibus_text.set_selection_end(4UL); + // Set up chromeos composition text with one underline attribute. + chromeos::CompositionText chromeos_composition_text; + chromeos_composition_text.set_text(kSampleText); + chromeos_composition_text.set_selection_start(kCursorPos); + chromeos_composition_text.set_selection_end(4UL); CompositionText composition_text; - ime_->ExtractCompositionText(ibus_text, kCursorPos, &composition_text); - EXPECT_EQ(UTF8ToUTF16(kSampleText), composition_text.text); + ime_->ExtractCompositionText( + chromeos_composition_text, kCursorPos, &composition_text); + EXPECT_EQ(kSampleText, composition_text.text); // If the cursor position is same as selection bounds, selection start // position become opposit side of selection from cursor. - EXPECT_EQ(GetOffsetInUTF16(kSampleText, ibus_text.selection_end()), + EXPECT_EQ(GetOffsetInUTF16(kSampleText, + chromeos_composition_text.selection_end()), composition_text.selection.start()); EXPECT_EQ(GetOffsetInUTF16(kSampleText, kCursorPos), composition_text.selection.end()); ASSERT_EQ(1UL, composition_text.underlines.size()); - EXPECT_EQ(GetOffsetInUTF16(kSampleText, ibus_text.selection_start()), + EXPECT_EQ(GetOffsetInUTF16(kSampleText, + chromeos_composition_text.selection_start()), composition_text.underlines[0].start_offset); - EXPECT_EQ(GetOffsetInUTF16(kSampleText, ibus_text.selection_end()), + EXPECT_EQ(GetOffsetInUTF16(kSampleText, + chromeos_composition_text.selection_end()), composition_text.underlines[0].end_offset); EXPECT_EQ(SK_ColorBLACK, composition_text.underlines[0].color); EXPECT_TRUE(composition_text.underlines[0].thick); + EXPECT_EQ(static_cast<SkColor>(SK_ColorTRANSPARENT), + composition_text.underlines[0].background_color); } -TEST_F(InputMethodIBusTest, ExtractCompositionTextTest_SelectionEndWithCursor) { - const char kSampleText[] = "\xE3\x81\x82\xE3\x81\x84\xE3\x81\x86" - "\xE3\x81\x88\xE3\x81\x8A"; +TEST_F(InputMethodChromeOSTest, + ExtractCompositionTextTest_SelectionEndWithCursor) { const uint32 kCursorPos = 4UL; - // Set up ibus text with one underline attribute. - chromeos::IBusText ibus_text; - ibus_text.set_text(kSampleText); - ibus_text.set_selection_start(1UL); - ibus_text.set_selection_end(kCursorPos); + // Set up chromeos composition text with one underline attribute. + chromeos::CompositionText chromeos_composition_text; + chromeos_composition_text.set_text(kSampleText); + chromeos_composition_text.set_selection_start(1UL); + chromeos_composition_text.set_selection_end(kCursorPos); CompositionText composition_text; - ime_->ExtractCompositionText(ibus_text, kCursorPos, &composition_text); - EXPECT_EQ(UTF8ToUTF16(kSampleText), composition_text.text); + ime_->ExtractCompositionText( + chromeos_composition_text, kCursorPos, &composition_text); + EXPECT_EQ(kSampleText, composition_text.text); // If the cursor position is same as selection bounds, selection start // position become opposit side of selection from cursor. - EXPECT_EQ(GetOffsetInUTF16(kSampleText, ibus_text.selection_start()), + EXPECT_EQ(GetOffsetInUTF16(kSampleText, + chromeos_composition_text.selection_start()), composition_text.selection.start()); EXPECT_EQ(GetOffsetInUTF16(kSampleText, kCursorPos), composition_text.selection.end()); ASSERT_EQ(1UL, composition_text.underlines.size()); - EXPECT_EQ(GetOffsetInUTF16(kSampleText, ibus_text.selection_start()), + EXPECT_EQ(GetOffsetInUTF16(kSampleText, + chromeos_composition_text.selection_start()), composition_text.underlines[0].start_offset); - EXPECT_EQ(GetOffsetInUTF16(kSampleText, ibus_text.selection_end()), + EXPECT_EQ(GetOffsetInUTF16(kSampleText, + chromeos_composition_text.selection_end()), composition_text.underlines[0].end_offset); EXPECT_EQ(SK_ColorBLACK, composition_text.underlines[0].color); EXPECT_TRUE(composition_text.underlines[0].thick); + EXPECT_EQ(static_cast<SkColor>(SK_ColorTRANSPARENT), + composition_text.underlines[0].background_color); } -TEST_F(InputMethodIBusTest, SurroundingText_NoSelectionTest) { +TEST_F(InputMethodChromeOSTest, SurroundingText_NoSelectionTest) { ime_->Init(true); // Click a text input form. input_type_ = TEXT_INPUT_TYPE_TEXT; @@ -818,7 +862,7 @@ TEST_F(InputMethodIBusTest, SurroundingText_NoSelectionTest) { mock_ime_engine_handler_->last_set_surrounding_anchor_pos()); } -TEST_F(InputMethodIBusTest, SurroundingText_SelectionTest) { +TEST_F(InputMethodChromeOSTest, SurroundingText_SelectionTest) { ime_->Init(true); // Click a text input form. input_type_ = TEXT_INPUT_TYPE_TEXT; @@ -845,7 +889,7 @@ TEST_F(InputMethodIBusTest, SurroundingText_SelectionTest) { mock_ime_engine_handler_->last_set_surrounding_anchor_pos()); } -TEST_F(InputMethodIBusTest, SurroundingText_PartialText) { +TEST_F(InputMethodChromeOSTest, SurroundingText_PartialText) { ime_->Init(true); // Click a text input form. input_type_ = TEXT_INPUT_TYPE_TEXT; @@ -871,7 +915,7 @@ TEST_F(InputMethodIBusTest, SurroundingText_PartialText) { mock_ime_engine_handler_->last_set_surrounding_anchor_pos()); } -TEST_F(InputMethodIBusTest, SurroundingText_BecomeEmptyText) { +TEST_F(InputMethodChromeOSTest, SurroundingText_BecomeEmptyText) { ime_->Init(true); // Click a text input form. input_type_ = TEXT_INPUT_TYPE_TEXT; @@ -896,20 +940,20 @@ TEST_F(InputMethodIBusTest, SurroundingText_BecomeEmptyText) { mock_ime_engine_handler_->set_surrounding_text_call_count()); } -class InputMethodIBusKeyEventTest : public InputMethodIBusTest { +class InputMethodChromeOSKeyEventTest : public InputMethodChromeOSTest { public: - InputMethodIBusKeyEventTest() {} - virtual ~InputMethodIBusKeyEventTest() {} + InputMethodChromeOSKeyEventTest() {} + virtual ~InputMethodChromeOSKeyEventTest() {} virtual void SetUp() OVERRIDE { - InputMethodIBusTest::SetUp(); + InputMethodChromeOSTest::SetUp(); ime_->Init(true); } - DISALLOW_COPY_AND_ASSIGN(InputMethodIBusKeyEventTest); + DISALLOW_COPY_AND_ASSIGN(InputMethodChromeOSKeyEventTest); }; -TEST_F(InputMethodIBusKeyEventTest, KeyEventDelayResponseTest) { +TEST_F(InputMethodChromeOSKeyEventTest, KeyEventDelayResponseTest) { const int kFlags = ui::EF_SHIFT_DOWN; ScopedXI2Event xevent; xevent.InitKeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_A, kFlags); @@ -941,7 +985,7 @@ TEST_F(InputMethodIBusKeyEventTest, KeyEventDelayResponseTest) { EXPECT_TRUE(ime_->process_key_event_post_ime_args().handled); } -TEST_F(InputMethodIBusKeyEventTest, MultiKeyEventDelayResponseTest) { +TEST_F(InputMethodChromeOSKeyEventTest, MultiKeyEventDelayResponseTest) { // Preparation input_type_ = TEXT_INPUT_TYPE_TEXT; ime_->OnTextInputTypeChanged(this); @@ -1001,7 +1045,7 @@ TEST_F(InputMethodIBusKeyEventTest, MultiKeyEventDelayResponseTest) { EXPECT_FALSE(ime_->process_key_event_post_ime_args().handled); } -TEST_F(InputMethodIBusKeyEventTest, KeyEventDelayResponseResetTest) { +TEST_F(InputMethodChromeOSKeyEventTest, KeyEventDelayResponseResetTest) { ScopedXI2Event xevent; xevent.InitKeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::EF_SHIFT_DOWN); const ui::KeyEvent event(xevent, true); diff --git a/chromium/ui/base/ime/input_method_delegate.h b/chromium/ui/base/ime/input_method_delegate.h index ac332025d70..080a8f6f334 100644 --- a/chromium/ui/base/ime/input_method_delegate.h +++ b/chromium/ui/base/ime/input_method_delegate.h @@ -5,29 +5,23 @@ #ifndef UI_BASE_IME_INPUT_METHOD_DELEGATE_H_ #define UI_BASE_IME_INPUT_METHOD_DELEGATE_H_ -#include "base/event_types.h" -#include "ui/base/ui_export.h" -#include "ui/events/event_constants.h" -#include "ui/events/keycodes/keyboard_codes.h" +#include "ui/base/ui_base_export.h" namespace ui { + +class KeyEvent; + namespace internal { // An interface implemented by the object that handles events sent back from an // ui::InputMethod implementation. -class UI_EXPORT InputMethodDelegate { +class UI_BASE_EXPORT InputMethodDelegate { public: virtual ~InputMethodDelegate() {} // Dispatch a key event already processed by the input method. // Returns true if the event was processed. - virtual bool DispatchKeyEventPostIME( - const base::NativeEvent& native_key_event) = 0; - - // TODO(komatsu): Unify this function to DispatchKeyEventPostIME. - virtual bool DispatchFabricatedKeyEventPostIME(ui::EventType type, - ui::KeyboardCode key_code, - int flags) = 0; + virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& key_event) = 0; }; } // namespace internal diff --git a/chromium/ui/base/ime/input_method_factory.cc b/chromium/ui/base/ime/input_method_factory.cc index 616dd22bd24..876817c86a4 100644 --- a/chromium/ui/base/ime/input_method_factory.cc +++ b/chromium/ui/base/ime/input_method_factory.cc @@ -4,17 +4,17 @@ #include "ui/base/ime/input_method_factory.h" -#include "base/memory/singleton.h" #include "ui/base/ime/mock_input_method.h" #if defined(OS_CHROMEOS) && defined(USE_X11) -#include "ui/base/ime/input_method_ibus.h" +#include "ui/base/ime/input_method_chromeos.h" #elif defined(OS_WIN) #include "base/win/metro.h" -#include "ui/base/ime/input_method_imm32.h" -#include "ui/base/ime/input_method_tsf.h" +#include "ui/base/ime/input_method_win.h" #include "ui/base/ime/remote_input_method_win.h" -#elif defined(USE_AURA) && defined(USE_X11) +#elif defined(OS_MACOSX) +#include "ui/base/ime/input_method_mac.h" +#elif defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS) #include "ui/base/ime/input_method_auralinux.h" #else #include "ui/base/ime/input_method_minimal.h" @@ -22,103 +22,48 @@ namespace { -ui::InputMethodFactory* g_input_method_factory = NULL; +bool g_input_method_set_for_testing = false; -#if defined(OS_WIN) -ui::InputMethod* g_shared_input_method = NULL; -#endif +bool g_create_input_method_called = false; } // namespace namespace ui { -// static -InputMethodFactory* InputMethodFactory::GetInstance() { - if (!g_input_method_factory) - SetInstance(DefaultInputMethodFactory::GetInstance()); - - return g_input_method_factory; -} - -// static -void InputMethodFactory::SetInstance(InputMethodFactory* instance) { - CHECK(!g_input_method_factory); - CHECK(instance); - - g_input_method_factory = instance; -} - -// static -void InputMethodFactory::ClearInstance() { - // It's a client's duty to delete the object. - g_input_method_factory = NULL; -} - -// DefaultInputMethodFactory - -// static -DefaultInputMethodFactory* DefaultInputMethodFactory::GetInstance() { - return Singleton<DefaultInputMethodFactory>::get(); -} - -scoped_ptr<InputMethod> DefaultInputMethodFactory::CreateInputMethod( +scoped_ptr<InputMethod> CreateInputMethod( internal::InputMethodDelegate* delegate, gfx::AcceleratedWidget widget) { + if (!g_create_input_method_called) + g_create_input_method_called = true; + + if (g_input_method_set_for_testing) + return scoped_ptr<InputMethod>(new MockInputMethod(delegate)); + #if defined(OS_CHROMEOS) && defined(USE_X11) - return scoped_ptr<InputMethod>(new InputMethodIBus(delegate)); + return scoped_ptr<InputMethod>(new InputMethodChromeOS(delegate)); #elif defined(OS_WIN) - if (base::win::IsTSFAwareRequired()) - return scoped_ptr<InputMethod>(new InputMethodTSF(delegate, widget)); if (IsRemoteInputMethodWinRequired(widget)) return CreateRemoteInputMethodWin(delegate); - return scoped_ptr<InputMethod>(new InputMethodIMM32(delegate, widget)); -#elif defined(USE_AURA) && defined(USE_X11) + return scoped_ptr<InputMethod>(new InputMethodWin(delegate, widget)); +#elif defined(OS_MACOSX) + return scoped_ptr<InputMethod>(new InputMethodMac(delegate)); +#elif defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS) return scoped_ptr<InputMethod>(new InputMethodAuraLinux(delegate)); #else return scoped_ptr<InputMethod>(new InputMethodMinimal(delegate)); #endif } -// MockInputMethodFactory - -// static -MockInputMethodFactory* MockInputMethodFactory::GetInstance() { - return Singleton<MockInputMethodFactory>::get(); -} - -scoped_ptr<InputMethod> MockInputMethodFactory::CreateInputMethod( - internal::InputMethodDelegate* delegate, - gfx::AcceleratedWidget /* widget */) { - return scoped_ptr<InputMethod>(new MockInputMethod(delegate)); -} - -// Shorthands - -scoped_ptr<InputMethod> CreateInputMethod( - internal::InputMethodDelegate* delegate, - gfx::AcceleratedWidget widget) { - return InputMethodFactory::GetInstance()->CreateInputMethod(delegate, widget); -} - void SetUpInputMethodFactoryForTesting() { - InputMethodFactory::SetInstance(MockInputMethodFactory::GetInstance()); -} + if (g_input_method_set_for_testing) + return; -#if defined(OS_WIN) -InputMethod* GetSharedInputMethod() { - if (!g_shared_input_method) - g_shared_input_method = CreateInputMethod(NULL, NULL).release(); - return g_shared_input_method; -} - -namespace internal { + CHECK(!g_create_input_method_called) + << "ui::SetUpInputMethodFactoryForTesting was called after use of " + << "ui::CreateInputMethod. You must call " + << "ui::SetUpInputMethodFactoryForTesting earlier."; -void DestroySharedInputMethod() { - delete g_shared_input_method; - g_shared_input_method = NULL; + g_input_method_set_for_testing = true; } -} // namespace internal -#endif - } // namespace ui diff --git a/chromium/ui/base/ime/input_method_factory.h b/chromium/ui/base/ime/input_method_factory.h index b7386205521..3debc82cd3e 100644 --- a/chromium/ui/base/ime/input_method_factory.h +++ b/chromium/ui/base/ime/input_method_factory.h @@ -9,11 +9,9 @@ #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" #include "ui/base/ime/input_method_initializer.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/native_widget_types.h" -template <typename T> struct DefaultSingletonTraits; - namespace ui { namespace internal { class InputMethodDelegate; @@ -21,94 +19,13 @@ class InputMethodDelegate; class InputMethod; -class UI_EXPORT InputMethodFactory { - public: - // Returns the current active factory. - // If no factory was set, sets the DefaultInputMethodFactory by default. Once - // a factory was set, you cannot change the factory, and always the same - // factory is returned. - static InputMethodFactory* GetInstance(); - - // Sets an InputMethodFactory to be used. - // This function must be called at most once. |instance| is not owned by this - // class or marked automatically as a leaky object. It's a caller's duty to - // destroy the object or mark it as leaky. - static void SetInstance(InputMethodFactory* instance); - - virtual ~InputMethodFactory() {} - - // Creates and returns an input method implementation. - virtual scoped_ptr<InputMethod> CreateInputMethod( - internal::InputMethodDelegate* delegate, - gfx::AcceleratedWidget widget) = 0; - - private: - static void ClearInstance(); - - friend UI_EXPORT void ShutdownInputMethod(); - friend UI_EXPORT void ShutdownInputMethodForTesting(); -}; - -class DefaultInputMethodFactory : public InputMethodFactory { - public: - // For Singleton - static DefaultInputMethodFactory* GetInstance(); - - // Overridden from InputMethodFactory. - virtual scoped_ptr<InputMethod> CreateInputMethod( - internal::InputMethodDelegate* delegate, - gfx::AcceleratedWidget widget) OVERRIDE; - - private: - DefaultInputMethodFactory() {} - - friend struct DefaultSingletonTraits<DefaultInputMethodFactory>; - - DISALLOW_COPY_AND_ASSIGN(DefaultInputMethodFactory); -}; - -class MockInputMethodFactory : public InputMethodFactory { - public: - // For Singleton - static MockInputMethodFactory* GetInstance(); - - // Overridden from InputMethodFactory. - virtual scoped_ptr<InputMethod> CreateInputMethod( - internal::InputMethodDelegate* delegate, - gfx::AcceleratedWidget widget) OVERRIDE; - - private: - MockInputMethodFactory() {} - - friend struct DefaultSingletonTraits<MockInputMethodFactory>; - - DISALLOW_COPY_AND_ASSIGN(MockInputMethodFactory); -}; - -// Shorthand for -// InputMethodFactory::GetInstance()->CreateInputMethod(delegate, widget). -UI_EXPORT scoped_ptr<InputMethod> CreateInputMethod( +// Creates a new instance of InputMethod and returns it. +UI_BASE_EXPORT scoped_ptr<InputMethod> CreateInputMethod( internal::InputMethodDelegate* delegate, gfx::AcceleratedWidget widget); -// Shorthand for InputMethodFactory::SetInstance(new MockInputMethodFactory()). -// TODO(yukishiino): Retires this shorthand, and makes ui::InitializeInputMethod -// and ui::InitializeInputMethodForTesting set the appropriate factory. -UI_EXPORT void SetUpInputMethodFactoryForTesting(); - -#if defined(OS_WIN) -// Returns a shared input method object for the platform. Caller must not -// delete the object. Currently supported only on Windows. This method is -// for non-Aura environment, where only one input method object is created for -// the browser process. -UI_EXPORT InputMethod* GetSharedInputMethod(); - -namespace internal { -// Destroys the shared input method object returned by GetSharedInputMethod(). -// This function must be called only from input_method_initializer.cc. -void DestroySharedInputMethod(); -} // namespace internal -#endif +// Makes CreateInputMethod return a MockInputMethod. +UI_BASE_EXPORT void SetUpInputMethodFactoryForTesting(); } // namespace ui; diff --git a/chromium/ui/base/ime/input_method_imm32.cc b/chromium/ui/base/ime/input_method_imm32.cc deleted file mode 100644 index 16a33a1128c..00000000000 --- a/chromium/ui/base/ime/input_method_imm32.cc +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/ime/input_method_imm32.h" - -#include "base/basictypes.h" -#include "ui/base/ime/composition_text.h" -#include "ui/base/ime/text_input_client.h" -#include "ui/base/ime/win/tsf_input_scope.h" - - -namespace ui { - -InputMethodIMM32::InputMethodIMM32(internal::InputMethodDelegate* delegate, - HWND toplevel_window_handle) - : InputMethodWin(delegate, toplevel_window_handle), - enabled_(false), is_candidate_popup_open_(false), - composing_window_handle_(NULL) { - // In non-Aura environment, appropriate callbacks to OnFocus() and OnBlur() - // are not implemented yet. To work around this limitation, here we use - // "always focused" model. - // TODO(ime): Fix the caller of OnFocus() and OnBlur() so that appropriate - // focus event will be passed. - InputMethodWin::OnFocus(); -} - -void InputMethodIMM32::OnFocus() { - // Ignore OnFocus event for "always focused" model. See the comment in the - // constructor. - // TODO(ime): Implement OnFocus once the callers are fixed. -} - -void InputMethodIMM32::OnBlur() { - // Ignore OnBlur event for "always focused" model. See the comment in the - // constructor. - // TODO(ime): Implement OnFocus once the callers are fixed. -} - -bool InputMethodIMM32::OnUntranslatedIMEMessage( - const base::NativeEvent& event, InputMethod::NativeEventResult* result) { - LRESULT original_result = 0; - BOOL handled = FALSE; - switch (event.message) { - case WM_IME_SETCONTEXT: - original_result = OnImeSetContext( - event.hwnd, event.message, event.wParam, event.lParam, &handled); - break; - case WM_IME_STARTCOMPOSITION: - original_result = OnImeStartComposition( - event.hwnd, event.message, event.wParam, event.lParam, &handled); - break; - case WM_IME_COMPOSITION: - original_result = OnImeComposition( - event.hwnd, event.message, event.wParam, event.lParam, &handled); - break; - case WM_IME_ENDCOMPOSITION: - original_result = OnImeEndComposition( - event.hwnd, event.message, event.wParam, event.lParam, &handled); - break; - case WM_IME_REQUEST: - original_result = OnImeRequest( - event.message, event.wParam, event.lParam, &handled); - break; - case WM_CHAR: - case WM_SYSCHAR: - original_result = OnChar( - event.hwnd, event.message, event.wParam, event.lParam, &handled); - break; - case WM_DEADCHAR: - case WM_SYSDEADCHAR: - original_result = OnDeadChar( - event.message, event.wParam, event.lParam, &handled); - break; - case WM_IME_NOTIFY: - original_result = OnImeNotify( - event.message, event.wParam, event.lParam, &handled); - break; - default: - NOTREACHED() << "Unknown IME message:" << event.message; - break; - } - if (result) - *result = original_result; - return !!handled; -} - -void InputMethodIMM32::OnTextInputTypeChanged(const TextInputClient* client) { - if (IsTextInputClientFocused(client) && IsWindowFocused(client)) { - imm32_manager_.CancelIME(GetAttachedWindowHandle(client)); - UpdateIMEState(); - } - InputMethodWin::OnTextInputTypeChanged(client); -} - -void InputMethodIMM32::OnCaretBoundsChanged(const TextInputClient* client) { - if (!enabled_ || !IsTextInputClientFocused(client) || - !IsWindowFocused(client)) { - return; - } - // The current text input type should not be NONE if |client| is focused. - DCHECK(!IsTextInputTypeNone()); - gfx::Rect screen_bounds(GetTextInputClient()->GetCaretBounds()); - - HWND attached_window = GetAttachedWindowHandle(client); - // TODO(ime): see comment in TextInputClient::GetCaretBounds(), this - // conversion shouldn't be necessary. - RECT r = {}; - GetClientRect(attached_window, &r); - POINT window_point = { screen_bounds.x(), screen_bounds.y() }; - ScreenToClient(attached_window, &window_point); - gfx::Rect caret_rect(gfx::Point(window_point.x, window_point.y), - screen_bounds.size()); - imm32_manager_.UpdateCaretRect(attached_window, caret_rect); -} - -void InputMethodIMM32::CancelComposition(const TextInputClient* client) { - if (enabled_ && IsTextInputClientFocused(client)) - imm32_manager_.CancelIME(GetAttachedWindowHandle(client)); -} - -bool InputMethodIMM32::IsCandidatePopupOpen() const { - return is_candidate_popup_open_; -} - -void InputMethodIMM32::OnWillChangeFocusedClient( - TextInputClient* focused_before, - TextInputClient* focused) { - if (IsWindowFocused(focused_before)) { - ConfirmCompositionText(); - } -} - -void InputMethodIMM32::OnDidChangeFocusedClient(TextInputClient* focused_before, - TextInputClient* focused) { - if (IsWindowFocused(focused)) { - // Force to update the input type since client's TextInputStateChanged() - // function might not be called if text input types before the client loses - // focus and after it acquires focus again are the same. - OnTextInputTypeChanged(focused); - - UpdateIMEState(); - - // Force to update caret bounds, in case the client thinks that the caret - // bounds has not changed. - OnCaretBoundsChanged(focused); - } - InputMethodWin::OnDidChangeFocusedClient(focused_before, focused); -} - -LRESULT InputMethodIMM32::OnImeSetContext(HWND window_handle, - UINT message, - WPARAM wparam, - LPARAM lparam, - BOOL* handled) { - if (!!wparam) - imm32_manager_.CreateImeWindow(window_handle); - - OnInputMethodChanged(); - return imm32_manager_.SetImeWindowStyle( - window_handle, message, wparam, lparam, handled); -} - -LRESULT InputMethodIMM32::OnImeStartComposition(HWND window_handle, - UINT message, - WPARAM wparam, - LPARAM lparam, - BOOL* handled) { - // We have to prevent WTL from calling ::DefWindowProc() because the function - // calls ::ImmSetCompositionWindow() and ::ImmSetCandidateWindow() to - // over-write the position of IME windows. - *handled = TRUE; - - // Reset the composition status and create IME windows. - composing_window_handle_ = window_handle; - imm32_manager_.CreateImeWindow(window_handle); - imm32_manager_.ResetComposition(window_handle); - return 0; -} - -LRESULT InputMethodIMM32::OnImeComposition(HWND window_handle, - UINT message, - WPARAM wparam, - LPARAM lparam, - BOOL* handled) { - // We have to prevent WTL from calling ::DefWindowProc() because we do not - // want for the IMM (Input Method Manager) to send WM_IME_CHAR messages. - *handled = TRUE; - - // At first, update the position of the IME window. - imm32_manager_.UpdateImeWindow(window_handle); - - // Retrieve the result string and its attributes of the ongoing composition - // and send it to a renderer process. - ui::CompositionText composition; - if (imm32_manager_.GetResult(window_handle, lparam, &composition.text)) { - if (!IsTextInputTypeNone()) - GetTextInputClient()->InsertText(composition.text); - imm32_manager_.ResetComposition(window_handle); - // Fall though and try reading the composition string. - // Japanese IMEs send a message containing both GCS_RESULTSTR and - // GCS_COMPSTR, which means an ongoing composition has been finished - // by the start of another composition. - } - // Retrieve the composition string and its attributes of the ongoing - // composition and send it to a renderer process. - if (imm32_manager_.GetComposition(window_handle, lparam, &composition) && - !IsTextInputTypeNone()) - GetTextInputClient()->SetCompositionText(composition); - - return 0; -} - -LRESULT InputMethodIMM32::OnImeEndComposition(HWND window_handle, - UINT message, - WPARAM wparam, - LPARAM lparam, - BOOL* handled) { - // Let WTL call ::DefWindowProc() and release its resources. - *handled = FALSE; - - composing_window_handle_ = NULL; - - if (!IsTextInputTypeNone() && GetTextInputClient()->HasCompositionText()) - GetTextInputClient()->ClearCompositionText(); - - imm32_manager_.ResetComposition(window_handle); - imm32_manager_.DestroyImeWindow(window_handle); - return 0; -} - -LRESULT InputMethodIMM32::OnImeNotify(UINT message, - WPARAM wparam, - LPARAM lparam, - BOOL* handled) { - *handled = FALSE; - - bool previous_state = is_candidate_popup_open_; - - // Update |is_candidate_popup_open_|, whether a candidate window is open. - switch (wparam) { - case IMN_OPENCANDIDATE: - is_candidate_popup_open_ = true; - if (!previous_state) - OnCandidateWindowShown(); - break; - case IMN_CLOSECANDIDATE: - is_candidate_popup_open_ = false; - if (previous_state) - OnCandidateWindowHidden(); - break; - case IMN_CHANGECANDIDATE: - // TODO(kochi): The IME API expects this event to notify window size change, - // while this may fire more often without window resize. There is no generic - // way to get bounds of candidate window. - OnCandidateWindowUpdated(); - break; - } - - return 0; -} - -void InputMethodIMM32::ConfirmCompositionText() { - if (composing_window_handle_) - imm32_manager_.CleanupComposition(composing_window_handle_); - - if (!IsTextInputTypeNone()) { - // Though above line should confirm the client's composition text by sending - // a result text to us, in case the input method and the client are in - // inconsistent states, we check the client's composition state again. - if (GetTextInputClient()->HasCompositionText()) - GetTextInputClient()->ConfirmCompositionText(); - } -} - -void InputMethodIMM32::UpdateIMEState() { - // Use switch here in case we are going to add more text input types. - // We disable input method in password field. - const HWND window_handle = GetAttachedWindowHandle(GetTextInputClient()); - const TextInputType text_input_type = GetTextInputType(); - const TextInputMode text_input_mode = GetTextInputMode(); - switch (text_input_type) { - case ui::TEXT_INPUT_TYPE_NONE: - case ui::TEXT_INPUT_TYPE_PASSWORD: - imm32_manager_.DisableIME(window_handle); - enabled_ = false; - break; - default: - imm32_manager_.EnableIME(window_handle); - enabled_ = true; - break; - } - - imm32_manager_.SetTextInputMode(window_handle, text_input_mode); - tsf_inputscope::SetInputScopeForTsfUnawareWindow( - window_handle, text_input_type, text_input_mode); -} - -} // namespace ui diff --git a/chromium/ui/base/ime/input_method_imm32.h b/chromium/ui/base/ime/input_method_imm32.h deleted file mode 100644 index dc0a4dc8ea6..00000000000 --- a/chromium/ui/base/ime/input_method_imm32.h +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_IME_INPUT_METHOD_IMM32_H_ -#define UI_BASE_IME_INPUT_METHOD_IMM32_H_ - -#include <windows.h> - -#include <string> - -#include "base/basictypes.h" -#include "base/compiler_specific.h" -#include "ui/base/ime/input_method_win.h" - -namespace ui { - -// An InputMethod implementation based on Windows IMM32 API. -class UI_EXPORT InputMethodIMM32 : public InputMethodWin { - public: - InputMethodIMM32(internal::InputMethodDelegate* delegate, - HWND toplevel_window_handle); - - // Overridden from InputMethod: - virtual void OnFocus() OVERRIDE; - virtual void OnBlur() OVERRIDE; - virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event, - NativeEventResult* result) OVERRIDE; - virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE; - virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE; - virtual void CancelComposition(const TextInputClient* client) OVERRIDE; - virtual bool IsCandidatePopupOpen() const OVERRIDE; - - protected: - // Overridden from InputMethodBase: - virtual void OnWillChangeFocusedClient(TextInputClient* focused_before, - TextInputClient* focused) OVERRIDE; - virtual void OnDidChangeFocusedClient(TextInputClient* focused_before, - TextInputClient* focused) OVERRIDE; - - private: - LRESULT OnImeSetContext(HWND window_handle, - UINT message, - WPARAM wparam, - LPARAM lparam, - BOOL* handled); - LRESULT OnImeStartComposition(HWND window_handle, - UINT message, - WPARAM wparam, - LPARAM lparam, - BOOL* handled); - LRESULT OnImeComposition(HWND window_handle, - UINT message, - WPARAM wparam, - LPARAM lparam, - BOOL* handled); - LRESULT OnImeEndComposition(HWND window_handle, - UINT message, - WPARAM wparam, - LPARAM lparam, - BOOL* handled); - LRESULT OnImeNotify(UINT message, - WPARAM wparam, - LPARAM lparam, - BOOL* handled); - - // Asks the client to confirm current composition text. - void ConfirmCompositionText(); - - // Enables or disables the IME according to the current text input type. - void UpdateIMEState(); - - bool enabled_; - - // True if we know for sure that a candidate window is open. - bool is_candidate_popup_open_; - - // Window handle where composition is on-going. NULL when there is no - // composition. - HWND composing_window_handle_; - - DISALLOW_COPY_AND_ASSIGN(InputMethodIMM32); -}; - -} // namespace ui - -#endif // UI_BASE_IME_INPUT_METHOD_IMM32_H_ diff --git a/chromium/ui/base/ime/input_method_initializer.cc b/chromium/ui/base/ime/input_method_initializer.cc index ad29e61f508..2fca46cff47 100644 --- a/chromium/ui/base/ime/input_method_initializer.cc +++ b/chromium/ui/base/ime/input_method_initializer.cc @@ -4,27 +4,16 @@ #include "ui/base/ime/input_method_initializer.h" -#if defined(TOOLKIT_VIEWS) || defined(USE_AURA) -#include "ui/base/ime/input_method_factory.h" -#endif - #if defined(OS_CHROMEOS) +#include "ui/base/ime/chromeos/ime_bridge.h" +#elif defined(USE_AURA) && defined(OS_LINUX) #include "base/logging.h" -#include "chromeos/dbus/dbus_thread_manager.h" -#include "ui/base/ime/chromeos/ibus_bridge.h" -#elif defined(USE_AURA) && defined(USE_X11) -#include "ui/base/ime/input_method_auralinux.h" #include "ui/base/ime/linux/fake_input_method_context_factory.h" -#elif defined(OS_WIN) -#include "base/win/metro.h" -#include "ui/base/ime/win/tsf_bridge.h" #endif namespace { -#if defined(OS_CHROMEOS) -bool dbus_thread_manager_was_initialized = false; -#elif defined(USE_AURA) && defined(USE_X11) +#if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX) const ui::LinuxInputMethodContextFactory* g_linux_input_method_context_factory; #endif @@ -34,37 +23,20 @@ namespace ui { void InitializeInputMethod() { #if defined(OS_CHROMEOS) - chromeos::IBusBridge::Initialize(); -#elif defined(USE_AURA) && defined(USE_X11) - InputMethodAuraLinux::Initialize(); -#elif defined(OS_WIN) - if (base::win::IsTSFAwareRequired()) - TSFBridge::Initialize(); + chromeos::IMEBridge::Initialize(); #endif } void ShutdownInputMethod() { -#if defined(TOOLKIT_VIEWS) || defined(USE_AURA) - InputMethodFactory::ClearInstance(); -#endif #if defined(OS_CHROMEOS) - chromeos::IBusBridge::Shutdown(); -#elif defined(OS_WIN) - internal::DestroySharedInputMethod(); - if (base::win::IsTSFAwareRequired()) - TSFBridge::Shutdown(); + chromeos::IMEBridge::Shutdown(); #endif } void InitializeInputMethodForTesting() { #if defined(OS_CHROMEOS) - chromeos::IBusBridge::Initialize(); - // TODO(nona): Remove DBusThreadManager initialize. - if (!chromeos::DBusThreadManager::IsInitialized()) { - chromeos::DBusThreadManager::InitializeWithStub(); - dbus_thread_manager_was_initialized = true; - } -#elif defined(USE_AURA) && defined(USE_X11) + chromeos::IMEBridge::Initialize(); +#elif defined(USE_AURA) && defined(OS_LINUX) if (!g_linux_input_method_context_factory) g_linux_input_method_context_factory = new FakeInputMethodContextFactory(); const LinuxInputMethodContextFactory* factory = @@ -74,27 +46,13 @@ void InitializeInputMethodForTesting() { << "else."; LinuxInputMethodContextFactory::SetInstance( g_linux_input_method_context_factory); -#elif defined(OS_WIN) - if (base::win::IsTSFAwareRequired()) { - // Make sure COM is initialized because TSF depends on COM. - CoInitialize(NULL); - TSFBridge::Initialize(); - } #endif } void ShutdownInputMethodForTesting() { -#if defined(TOOLKIT_VIEWS) || defined(USE_AURA) - InputMethodFactory::ClearInstance(); -#endif #if defined(OS_CHROMEOS) - chromeos::IBusBridge::Shutdown(); - // TODO(nona): Remove DBusThreadManager finalize. - if (dbus_thread_manager_was_initialized) { - chromeos::DBusThreadManager::Shutdown(); - dbus_thread_manager_was_initialized = false; - } -#elif defined(USE_AURA) && defined(USE_X11) + chromeos::IMEBridge::Shutdown(); +#elif defined(USE_AURA) && defined(OS_LINUX) const LinuxInputMethodContextFactory* factory = LinuxInputMethodContextFactory::instance(); CHECK(!factory || factory == g_linux_input_method_context_factory) @@ -102,12 +60,6 @@ void ShutdownInputMethodForTesting() { LinuxInputMethodContextFactory::SetInstance(NULL); delete g_linux_input_method_context_factory; g_linux_input_method_context_factory = NULL; -#elif defined(OS_WIN) - internal::DestroySharedInputMethod(); - if (base::win::IsTSFAwareRequired()) { - TSFBridge::Shutdown(); - CoUninitialize(); - } #endif } diff --git a/chromium/ui/base/ime/input_method_initializer.h b/chromium/ui/base/ime/input_method_initializer.h index fbdf6733574..065e53ed8dd 100644 --- a/chromium/ui/base/ime/input_method_initializer.h +++ b/chromium/ui/base/ime/input_method_initializer.h @@ -6,25 +6,25 @@ #define UI_BASE_IME_INPUT_METHOD_INITIALIZER_H_ #include "base/basictypes.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { // Initializes thread-local resources for input method. This function should be // called in the UI thread before input method is used. -UI_EXPORT void InitializeInputMethod(); +UI_BASE_EXPORT void InitializeInputMethod(); // Shutdown thread-local resources for input method. This function should be // called in the UI thread after input method is used. -UI_EXPORT void ShutdownInputMethod(); +UI_BASE_EXPORT void ShutdownInputMethod(); // Initializes thread-local resources for input method. This function is // intended to be called from Setup function of unit tests. -UI_EXPORT void InitializeInputMethodForTesting(); +UI_BASE_EXPORT void InitializeInputMethodForTesting(); // Initializes thread-local resources for input method. This function is // intended to be called from TearDown function of unit tests. -UI_EXPORT void ShutdownInputMethodForTesting(); +UI_BASE_EXPORT void ShutdownInputMethodForTesting(); } // namespace ui diff --git a/chromium/ui/base/ime/input_method_mac.h b/chromium/ui/base/ime/input_method_mac.h new file mode 100644 index 00000000000..08f60801e24 --- /dev/null +++ b/chromium/ui/base/ime/input_method_mac.h @@ -0,0 +1,38 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_IME_INPUT_METHOD_MAC_H_ +#define UI_BASE_IME_INPUT_METHOD_MAC_H_ + +#include "ui/base/ime/input_method_base.h" + +namespace ui { + +// A ui::InputMethod implementation for Mac. +// On the Mac, key events don't pass through InputMethod. +// Instead, NSTextInputClient calls are bridged to the currently focused +// ui::TextInputClient object. +class UI_BASE_EXPORT InputMethodMac : public InputMethodBase { + public: + explicit InputMethodMac(internal::InputMethodDelegate* delegate); + virtual ~InputMethodMac(); + + // Overriden from InputMethod. + virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event, + NativeEventResult* result) OVERRIDE; + virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE; + virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE; + virtual void CancelComposition(const TextInputClient* client) OVERRIDE; + virtual void OnInputLocaleChanged() OVERRIDE; + virtual std::string GetInputLocale() OVERRIDE; + virtual bool IsActive() OVERRIDE; + virtual bool IsCandidatePopupOpen() const OVERRIDE; + + private: + DISALLOW_COPY_AND_ASSIGN(InputMethodMac); +}; + +} // namespace ui + +#endif // UI_BASE_IME_INPUT_METHOD_MAC_H_ diff --git a/chromium/ui/base/ime/input_method_mac.mm b/chromium/ui/base/ime/input_method_mac.mm new file mode 100644 index 00000000000..c4b55c984d9 --- /dev/null +++ b/chromium/ui/base/ime/input_method_mac.mm @@ -0,0 +1,49 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/ime/input_method_mac.h" + +namespace ui { + +InputMethodMac::InputMethodMac(internal::InputMethodDelegate* delegate) { + SetDelegate(delegate); +} + +InputMethodMac::~InputMethodMac() { +} + +bool InputMethodMac::OnUntranslatedIMEMessage(const base::NativeEvent& event, + NativeEventResult* result) { + return false; +} + +bool InputMethodMac::DispatchKeyEvent(const ui::KeyEvent& event) { + // IME processing on the Mac does not go through this path. + NOTREACHED(); + return false; +} + +void InputMethodMac::OnCaretBoundsChanged(const TextInputClient* client) { +} + +void InputMethodMac::CancelComposition(const TextInputClient* client) { +} + +void InputMethodMac::OnInputLocaleChanged() { +} + +std::string InputMethodMac::GetInputLocale() { + return ""; +} + +bool InputMethodMac::IsActive() { + return true; +} + +bool InputMethodMac::IsCandidatePopupOpen() const { + // There seems to be no way to tell if a candidate window is open. + return false; +} + +} // namespace ui diff --git a/chromium/ui/base/ime/input_method_minimal.cc b/chromium/ui/base/ime/input_method_minimal.cc index 0b51b9e3ced..9466c4044db 100644 --- a/chromium/ui/base/ime/input_method_minimal.cc +++ b/chromium/ui/base/ime/input_method_minimal.cc @@ -52,10 +52,6 @@ std::string InputMethodMinimal::GetInputLocale() { return std::string(); } -base::i18n::TextDirection InputMethodMinimal::GetInputTextDirection() { - return base::i18n::UNKNOWN_DIRECTION; -} - bool InputMethodMinimal::IsActive() { return true; } diff --git a/chromium/ui/base/ime/input_method_minimal.h b/chromium/ui/base/ime/input_method_minimal.h index 2ba158f1815..84fd066be0c 100644 --- a/chromium/ui/base/ime/input_method_minimal.h +++ b/chromium/ui/base/ime/input_method_minimal.h @@ -11,7 +11,7 @@ namespace ui { // A minimal implementation of ui::InputMethod, which supports only the direct // input without any compositions or conversions. -class UI_EXPORT InputMethodMinimal : public InputMethodBase { +class UI_BASE_EXPORT InputMethodMinimal : public InputMethodBase { public: explicit InputMethodMinimal(internal::InputMethodDelegate* delegate); virtual ~InputMethodMinimal(); @@ -24,7 +24,6 @@ class UI_EXPORT InputMethodMinimal : public InputMethodBase { virtual void CancelComposition(const TextInputClient* client) OVERRIDE; virtual void OnInputLocaleChanged() OVERRIDE; virtual std::string GetInputLocale() OVERRIDE; - virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE; virtual bool IsActive() OVERRIDE; virtual bool IsCandidatePopupOpen() const OVERRIDE; diff --git a/chromium/ui/base/ime/input_method_observer.h b/chromium/ui/base/ime/input_method_observer.h index 9ac177b4d64..d3432c9782d 100644 --- a/chromium/ui/base/ime/input_method_observer.h +++ b/chromium/ui/base/ime/input_method_observer.h @@ -5,14 +5,14 @@ #ifndef UI_BASE_IME_INPUT_METHOD_OBSERVER_H_ #define UI_BASE_IME_INPUT_METHOD_OBSERVER_H_ -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { class InputMethod; class TextInputClient; -class UI_EXPORT InputMethodObserver { +class UI_BASE_EXPORT InputMethodObserver { public: virtual ~InputMethodObserver() {} @@ -39,6 +39,10 @@ class UI_EXPORT InputMethodObserver { // Called when the observed InputMethod is being destroyed. virtual void OnInputMethodDestroyed(const InputMethod* input_method) = 0; + + // Called when a user gesture should trigger showing the virtual keyboard + // or alternate input view (e.g. handwriting palette). Used in ChromeOS. + virtual void OnShowImeIfNeeded() = 0; }; } // namespace ui diff --git a/chromium/ui/base/ime/input_method_tsf.cc b/chromium/ui/base/ime/input_method_tsf.cc deleted file mode 100644 index 5e6de052e55..00000000000 --- a/chromium/ui/base/ime/input_method_tsf.cc +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/ime/input_method_tsf.h" - -#include "ui/base/ime/text_input_client.h" -#include "ui/base/ime/win/tsf_bridge.h" -#include "ui/base/ime/win/tsf_event_router.h" - -namespace ui { - -class InputMethodTSF::TSFEventObserver : public TSFEventRouterObserver { - public: - TSFEventObserver() : is_candidate_popup_open_(false) {} - - // Returns true if we know for sure that a candidate window (or IME suggest, - // etc.) is open. - bool IsCandidatePopupOpen() const { return is_candidate_popup_open_; } - - // Overridden from TSFEventRouterObserver: - virtual void OnCandidateWindowCountChanged(size_t window_count) OVERRIDE { - is_candidate_popup_open_ = (window_count != 0); - } - - private: - // True if we know for sure that a candidate window is open. - bool is_candidate_popup_open_; - - DISALLOW_COPY_AND_ASSIGN(TSFEventObserver); -}; - -InputMethodTSF::InputMethodTSF(internal::InputMethodDelegate* delegate, - HWND toplevel_window_handle) - : InputMethodWin(delegate, toplevel_window_handle), - tsf_event_observer_(new TSFEventObserver()), - tsf_event_router_(new TSFEventRouter(tsf_event_observer_.get())) { - // In non-Aura environment, appropriate callbacks to OnFocus() and OnBlur() - // are not implemented yet. To work around this limitation, here we use - // "always focused" model. - // TODO(ime): Fix the caller of OnFocus() and OnBlur() so that appropriate - // focus event will be passed. - InputMethodWin::OnFocus(); -} - -InputMethodTSF::~InputMethodTSF() {} - -void InputMethodTSF::OnFocus() { - // Do not call baseclass' OnFocus() and discard the event being in - // "always focused" model. See the comment in the constructor. - // TODO(ime): Implement OnFocus once the callers are fixed. - - tsf_event_router_->SetManager( - ui::TSFBridge::GetInstance()->GetThreadManager()); -} - -void InputMethodTSF::OnBlur() { - // Do not call baseclass' OnBlur() and discard the event being in - // "always focused" model. See the comment in the constructor. - // TODO(ime): Implement OnFocus once the callers are fixed. - - tsf_event_router_->SetManager(NULL); -} - -bool InputMethodTSF::OnUntranslatedIMEMessage( - const base::NativeEvent& event, InputMethod::NativeEventResult* result) { - LRESULT original_result = 0; - BOOL handled = FALSE; - // Even when TSF is enabled, following IMM32/Win32 messages must be handled. - switch (event.message) { - case WM_IME_REQUEST: - // Some TSF-native TIPs (Text Input Processors) such as ATOK and Mozc - // still rely on WM_IME_REQUEST message to implement reverse conversion. - original_result = OnImeRequest( - event.message, event.wParam, event.lParam, &handled); - break; - case WM_CHAR: - case WM_SYSCHAR: - // ui::InputMethod interface is responsible for handling Win32 character - // messages. For instance, we will be here in the following cases. - // - TIP is not activated. (e.g, the current language profile is English) - // - TIP does not handle and WM_KEYDOWN and WM_KEYDOWN is translated into - // WM_CHAR by TranslateMessage API. (e.g, TIP is turned off) - // - Another application sends WM_CHAR through SendMessage API. - original_result = OnChar( - event.hwnd, event.message, event.wParam, event.lParam, &handled); - break; - case WM_DEADCHAR: - case WM_SYSDEADCHAR: - // See the comment in WM_CHAR/WM_SYSCHAR. - original_result = OnDeadChar( - event.message, event.wParam, event.lParam, &handled); - break; - } - if (result) - *result = original_result; - return !!handled; -} - -void InputMethodTSF::OnTextInputTypeChanged(const TextInputClient* client) { - if (!IsTextInputClientFocused(client) || !IsWindowFocused(client)) - return; - ui::TSFBridge::GetInstance()->CancelComposition(); - ui::TSFBridge::GetInstance()->OnTextInputTypeChanged(client); -} - -void InputMethodTSF::OnCaretBoundsChanged(const TextInputClient* client) { - if (!IsTextInputClientFocused(client) || !IsWindowFocused(client)) - return; - ui::TSFBridge::GetInstance()->OnTextLayoutChanged(); -} - -void InputMethodTSF::CancelComposition(const TextInputClient* client) { - if (IsTextInputClientFocused(client) && IsWindowFocused(client)) - ui::TSFBridge::GetInstance()->CancelComposition(); -} - -void InputMethodTSF::DetachTextInputClient(TextInputClient* client) { - InputMethodWin::DetachTextInputClient(client); - ui::TSFBridge::GetInstance()->RemoveFocusedClient(client); -} - -bool InputMethodTSF::IsCandidatePopupOpen() const { - return tsf_event_observer_->IsCandidatePopupOpen(); -} - -void InputMethodTSF::OnWillChangeFocusedClient(TextInputClient* focused_before, - TextInputClient* focused) { - if (IsWindowFocused(focused_before)) { - ConfirmCompositionText(); - ui::TSFBridge::GetInstance()->RemoveFocusedClient(focused_before); - } -} - -void InputMethodTSF::OnDidChangeFocusedClient(TextInputClient* focused_before, - TextInputClient* focused) { - if (IsWindowFocused(focused) && IsTextInputClientFocused(focused)) { - ui::TSFBridge::GetInstance()->SetFocusedClient( - GetAttachedWindowHandle(focused), focused); - - // Force to update the input type since client's TextInputStateChanged() - // function might not be called if text input types before the client loses - // focus and after it acquires focus again are the same. - OnTextInputTypeChanged(focused); - - // Force to update caret bounds, in case the client thinks that the caret - // bounds has not changed. - OnCaretBoundsChanged(focused); - } - InputMethodWin::OnDidChangeFocusedClient(focused_before, focused); -} - -void InputMethodTSF::ConfirmCompositionText() { - if (!IsTextInputTypeNone()) - ui::TSFBridge::GetInstance()->ConfirmComposition(); -} - -} // namespace ui diff --git a/chromium/ui/base/ime/input_method_tsf.h b/chromium/ui/base/ime/input_method_tsf.h deleted file mode 100644 index 2b4a9bde10c..00000000000 --- a/chromium/ui/base/ime/input_method_tsf.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_IME_INPUT_METHOD_TSF_H_ -#define UI_BASE_IME_INPUT_METHOD_TSF_H_ - -#include <windows.h> - -#include <string> - -#include "base/memory/scoped_ptr.h" -#include "ui/base/ime/input_method_win.h" - -namespace ui { - -class TSFEventRouter; - -// An InputMethod implementation based on Windows TSF API. -class UI_EXPORT InputMethodTSF : public InputMethodWin { - public: - InputMethodTSF(internal::InputMethodDelegate* delegate, - HWND toplevel_window_handle); - virtual ~InputMethodTSF(); - - // Overridden from InputMethod: - virtual void OnFocus() OVERRIDE; - virtual void OnBlur() OVERRIDE; - virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event, - NativeEventResult* result) OVERRIDE; - virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE; - virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE; - virtual void CancelComposition(const TextInputClient* client) OVERRIDE; - virtual void DetachTextInputClient(TextInputClient* client) OVERRIDE; - virtual bool IsCandidatePopupOpen() const OVERRIDE; - - // Overridden from InputMethodBase: - virtual void OnWillChangeFocusedClient(TextInputClient* focused_before, - TextInputClient* focused) OVERRIDE; - virtual void OnDidChangeFocusedClient(TextInputClient* focused_before, - TextInputClient* focused) OVERRIDE; - - private: - class TSFEventObserver; - - // Asks the client to confirm current composition text. - void ConfirmCompositionText(); - - // TSF event router and observer. - scoped_ptr<TSFEventObserver> tsf_event_observer_; - scoped_ptr<TSFEventRouter> tsf_event_router_; - - DISALLOW_COPY_AND_ASSIGN(InputMethodTSF); -}; - -} // namespace ui - -#endif // UI_BASE_IME_INPUT_METHOD_TSF_H_ diff --git a/chromium/ui/base/ime/input_method_win.cc b/chromium/ui/base/ime/input_method_win.cc index 5a30792e434..9b23c1a0359 100644 --- a/chromium/ui/base/ime/input_method_win.cc +++ b/chromium/ui/base/ime/input_method_win.cc @@ -6,10 +6,12 @@ #include "base/basictypes.h" #include "ui/base/ime/text_input_client.h" +#include "ui/base/ime/win/tsf_input_scope.h" #include "ui/events/event.h" #include "ui/events/event_constants.h" #include "ui/events/event_utils.h" #include "ui/events/keycodes/keyboard_codes.h" +#include "ui/gfx/win/dpi.h" #include "ui/gfx/win/hwnd_util.h" namespace ui { @@ -23,21 +25,85 @@ static const size_t kExtraNumberOfChars = 20; InputMethodWin::InputMethodWin(internal::InputMethodDelegate* delegate, HWND toplevel_window_handle) - : active_(false), - toplevel_window_handle_(toplevel_window_handle), - direction_(base::i18n::UNKNOWN_DIRECTION), + : toplevel_window_handle_(toplevel_window_handle), pending_requested_direction_(base::i18n::UNKNOWN_DIRECTION), - accept_carriage_return_(false) { + accept_carriage_return_(false), + active_(false), + enabled_(false), + is_candidate_popup_open_(false), + composing_window_handle_(NULL) { SetDelegate(delegate); + // In non-Aura environment, appropriate callbacks to OnFocus() and OnBlur() + // are not implemented yet. To work around this limitation, here we use + // "always focused" model. + // TODO(ime): Fix the caller of OnFocus() and OnBlur() so that appropriate + // focus event will be passed. + InputMethodBase::OnFocus(); } void InputMethodWin::Init(bool focused) { - // Gets the initial input locale and text direction information. + // Gets the initial input locale. OnInputLocaleChanged(); InputMethodBase::Init(focused); } +void InputMethodWin::OnFocus() { + // Ignore OnFocus event for "always focused" model. See the comment in the + // constructor. + // TODO(ime): Implement OnFocus once the callers are fixed. +} + +void InputMethodWin::OnBlur() { + // Ignore OnBlur event for "always focused" model. See the comment in the + // constructor. + // TODO(ime): Implement OnFocus once the callers are fixed. +} + +bool InputMethodWin::OnUntranslatedIMEMessage( + const base::NativeEvent& event, + InputMethod::NativeEventResult* result) { + LRESULT original_result = 0; + BOOL handled = FALSE; + switch (event.message) { + case WM_IME_SETCONTEXT: + original_result = OnImeSetContext( + event.hwnd, event.message, event.wParam, event.lParam, &handled); + break; + case WM_IME_STARTCOMPOSITION: + original_result = OnImeStartComposition( + event.hwnd, event.message, event.wParam, event.lParam, &handled); + break; + case WM_IME_COMPOSITION: + original_result = OnImeComposition( + event.hwnd, event.message, event.wParam, event.lParam, &handled); + break; + case WM_IME_ENDCOMPOSITION: + original_result = OnImeEndComposition( + event.hwnd, event.message, event.wParam, event.lParam, &handled); + break; + case WM_IME_REQUEST: + original_result = OnImeRequest( + event.message, event.wParam, event.lParam, &handled); + break; + case WM_CHAR: + case WM_SYSCHAR: + original_result = OnChar( + event.hwnd, event.message, event.wParam, event.lParam, &handled); + break; + case WM_IME_NOTIFY: + original_result = OnImeNotify( + event.message, event.wParam, event.lParam, &handled); + break; + default: + NOTREACHED() << "Unknown IME message:" << event.message; + break; + } + if (result) + *result = original_result; + return !!handled; +} + bool InputMethodWin::DispatchKeyEvent(const ui::KeyEvent& event) { if (!event.HasNativeEvent()) return DispatchFabricatedKeyEvent(event); @@ -76,10 +142,45 @@ bool InputMethodWin::DispatchKeyEvent(const ui::KeyEvent& event) { return DispatchKeyEventPostIME(event); } +void InputMethodWin::OnTextInputTypeChanged(const TextInputClient* client) { + if (!IsTextInputClientFocused(client) || !IsWindowFocused(client)) + return; + imm32_manager_.CancelIME(GetAttachedWindowHandle(client)); + UpdateIMEState(); +} + +void InputMethodWin::OnCaretBoundsChanged(const TextInputClient* client) { + if (!enabled_ || !IsTextInputClientFocused(client) || + !IsWindowFocused(client)) { + return; + } + // The current text input type should not be NONE if |client| is focused. + DCHECK(!IsTextInputTypeNone()); + // Tentatively assume that the returned value is DIP (Density Independent + // Pixel). See the comment in text_input_client.h and http://crbug.com/360334. + const gfx::Rect dip_screen_bounds(GetTextInputClient()->GetCaretBounds()); + const gfx::Rect screen_bounds = gfx::win::DIPToScreenRect(dip_screen_bounds); + + HWND attached_window = GetAttachedWindowHandle(client); + // TODO(ime): see comment in TextInputClient::GetCaretBounds(), this + // conversion shouldn't be necessary. + RECT r = {}; + GetClientRect(attached_window, &r); + POINT window_point = { screen_bounds.x(), screen_bounds.y() }; + ScreenToClient(attached_window, &window_point); + gfx::Rect caret_rect(gfx::Point(window_point.x, window_point.y), + screen_bounds.size()); + imm32_manager_.UpdateCaretRect(attached_window, caret_rect); +} + +void InputMethodWin::CancelComposition(const TextInputClient* client) { + if (enabled_ && IsTextInputClientFocused(client)) + imm32_manager_.CancelIME(GetAttachedWindowHandle(client)); +} + void InputMethodWin::OnInputLocaleChanged() { active_ = imm32_manager_.SetInputLanguage(); locale_ = imm32_manager_.GetInputLanguageName(); - direction_ = imm32_manager_.GetTextDirection(); OnInputMethodChanged(); } @@ -87,47 +188,37 @@ std::string InputMethodWin::GetInputLocale() { return locale_; } -base::i18n::TextDirection InputMethodWin::GetInputTextDirection() { - return direction_; -} - bool InputMethodWin::IsActive() { return active_; } +bool InputMethodWin::IsCandidatePopupOpen() const { + return is_candidate_popup_open_; +} + +void InputMethodWin::OnWillChangeFocusedClient(TextInputClient* focused_before, + TextInputClient* focused) { + if (IsWindowFocused(focused_before)) + ConfirmCompositionText(); +} + void InputMethodWin::OnDidChangeFocusedClient( TextInputClient* focused_before, TextInputClient* focused) { - if (focused_before != focused) - accept_carriage_return_ = false; -} - -LRESULT InputMethodWin::OnImeRequest(UINT message, - WPARAM wparam, - LPARAM lparam, - BOOL* handled) { - *handled = FALSE; + if (IsWindowFocused(focused)) { + // Force to update the input type since client's TextInputStateChanged() + // function might not be called if text input types before the client loses + // focus and after it acquires focus again are the same. + OnTextInputTypeChanged(focused); - // Should not receive WM_IME_REQUEST message, if IME is disabled. - const ui::TextInputType type = GetTextInputType(); - if (type == ui::TEXT_INPUT_TYPE_NONE || - type == ui::TEXT_INPUT_TYPE_PASSWORD) { - return 0; - } + UpdateIMEState(); - switch (wparam) { - case IMR_RECONVERTSTRING: - *handled = TRUE; - return OnReconvertString(reinterpret_cast<RECONVERTSTRING*>(lparam)); - case IMR_DOCUMENTFEED: - *handled = TRUE; - return OnDocumentFeed(reinterpret_cast<RECONVERTSTRING*>(lparam)); - case IMR_QUERYCHARPOSITION: - *handled = TRUE; - return OnQueryCharPosition(reinterpret_cast<IMECHARPOSITION*>(lparam)); - default: - return 0; + // Force to update caret bounds, in case the client thinks that the caret + // bounds has not changed. + OnCaretBoundsChanged(focused); } + if (focused_before != focused) + accept_carriage_return_ = false; } LRESULT InputMethodWin::OnChar(HWND window_handle, @@ -140,8 +231,8 @@ LRESULT InputMethodWin::OnChar(HWND window_handle, // We need to send character events to the focused text input client event if // its text input type is ui::TEXT_INPUT_TYPE_NONE. if (GetTextInputClient()) { - const char16 kCarriageReturn = L'\r'; - const char16 ch = static_cast<char16>(wparam); + const base::char16 kCarriageReturn = L'\r'; + const base::char16 ch = static_cast<base::char16>(wparam); // A mask to determine the previous key state from |lparam|. The value is 1 // if the key is down before the message is sent, or it is 0 if the key is // up. @@ -163,14 +254,146 @@ LRESULT InputMethodWin::OnChar(HWND window_handle, return 0; } -LRESULT InputMethodWin::OnDeadChar(UINT message, - WPARAM wparam, - LPARAM lparam, - BOOL* handled) { +LRESULT InputMethodWin::OnImeSetContext(HWND window_handle, + UINT message, + WPARAM wparam, + LPARAM lparam, + BOOL* handled) { + if (!!wparam) + imm32_manager_.CreateImeWindow(window_handle); + + OnInputMethodChanged(); + return imm32_manager_.SetImeWindowStyle( + window_handle, message, wparam, lparam, handled); +} + +LRESULT InputMethodWin::OnImeStartComposition(HWND window_handle, + UINT message, + WPARAM wparam, + LPARAM lparam, + BOOL* handled) { + // We have to prevent WTL from calling ::DefWindowProc() because the function + // calls ::ImmSetCompositionWindow() and ::ImmSetCandidateWindow() to + // over-write the position of IME windows. *handled = TRUE; + + // Reset the composition status and create IME windows. + composing_window_handle_ = window_handle; + imm32_manager_.CreateImeWindow(window_handle); + imm32_manager_.ResetComposition(window_handle); return 0; } +LRESULT InputMethodWin::OnImeComposition(HWND window_handle, + UINT message, + WPARAM wparam, + LPARAM lparam, + BOOL* handled) { + // We have to prevent WTL from calling ::DefWindowProc() because we do not + // want for the IMM (Input Method Manager) to send WM_IME_CHAR messages. + *handled = TRUE; + + // At first, update the position of the IME window. + imm32_manager_.UpdateImeWindow(window_handle); + + // Retrieve the result string and its attributes of the ongoing composition + // and send it to a renderer process. + ui::CompositionText composition; + if (imm32_manager_.GetResult(window_handle, lparam, &composition.text)) { + if (!IsTextInputTypeNone()) + GetTextInputClient()->InsertText(composition.text); + imm32_manager_.ResetComposition(window_handle); + // Fall though and try reading the composition string. + // Japanese IMEs send a message containing both GCS_RESULTSTR and + // GCS_COMPSTR, which means an ongoing composition has been finished + // by the start of another composition. + } + // Retrieve the composition string and its attributes of the ongoing + // composition and send it to a renderer process. + if (imm32_manager_.GetComposition(window_handle, lparam, &composition) && + !IsTextInputTypeNone()) + GetTextInputClient()->SetCompositionText(composition); + + return 0; +} + +LRESULT InputMethodWin::OnImeEndComposition(HWND window_handle, + UINT message, + WPARAM wparam, + LPARAM lparam, + BOOL* handled) { + // Let WTL call ::DefWindowProc() and release its resources. + *handled = FALSE; + + composing_window_handle_ = NULL; + + if (!IsTextInputTypeNone() && GetTextInputClient()->HasCompositionText()) + GetTextInputClient()->ClearCompositionText(); + + imm32_manager_.ResetComposition(window_handle); + imm32_manager_.DestroyImeWindow(window_handle); + return 0; +} + +LRESULT InputMethodWin::OnImeNotify(UINT message, + WPARAM wparam, + LPARAM lparam, + BOOL* handled) { + *handled = FALSE; + + bool previous_state = is_candidate_popup_open_; + + // Update |is_candidate_popup_open_|, whether a candidate window is open. + switch (wparam) { + case IMN_OPENCANDIDATE: + is_candidate_popup_open_ = true; + if (!previous_state) + OnCandidateWindowShown(); + break; + case IMN_CLOSECANDIDATE: + is_candidate_popup_open_ = false; + if (previous_state) + OnCandidateWindowHidden(); + break; + case IMN_CHANGECANDIDATE: + // TODO(kochi): The IME API expects this event to notify window size change, + // while this may fire more often without window resize. There is no generic + // way to get bounds of candidate window. + OnCandidateWindowUpdated(); + break; + } + + return 0; +} + +LRESULT InputMethodWin::OnImeRequest(UINT message, + WPARAM wparam, + LPARAM lparam, + BOOL* handled) { + *handled = FALSE; + + // Should not receive WM_IME_REQUEST message, if IME is disabled. + const ui::TextInputType type = GetTextInputType(); + if (type == ui::TEXT_INPUT_TYPE_NONE || + type == ui::TEXT_INPUT_TYPE_PASSWORD) { + return 0; + } + + switch (wparam) { + case IMR_RECONVERTSTRING: + *handled = TRUE; + return OnReconvertString(reinterpret_cast<RECONVERTSTRING*>(lparam)); + case IMR_DOCUMENTFEED: + *handled = TRUE; + return OnDocumentFeed(reinterpret_cast<RECONVERTSTRING*>(lparam)); + case IMR_QUERYCHARPOSITION: + *handled = TRUE; + return OnQueryCharPosition(reinterpret_cast<IMECHARPOSITION*>(lparam)); + default: + return 0; + } +} + LRESULT InputMethodWin::OnDocumentFeed(RECONVERTSTRING* reconv) { ui::TextInputClient* client = GetTextInputClient(); if (!client) @@ -210,7 +433,7 @@ LRESULT InputMethodWin::OnDocumentFeed(RECONVERTSTRING* reconv) { if (reconv->dwSize < need_size) return 0; - string16 text; + base::string16 text; if (!GetTextInputClient()->GetTextFromRange(text_range, &text)) return 0; DCHECK_EQ(text_range.length(), text.length()); @@ -266,7 +489,7 @@ LRESULT InputMethodWin::OnReconvertString(RECONVERTSTRING* reconv) { // TODO(penghuang): Return some extra context to help improve IME's // reconversion accuracy. - string16 text; + base::string16 text; if (!GetTextInputClient()->GetTextFromRange(selection_range, &text)) return 0; DCHECK_EQ(selection_range.length(), text.length()); @@ -299,10 +522,13 @@ LRESULT InputMethodWin::OnQueryCharPosition(IMECHARPOSITION* char_positon) { if (!client) return 0; - gfx::Rect rect; + // Tentatively assume that the returned value from |client| is DIP (Density + // Independent Pixel). See the comment in text_input_client.h and + // http://crbug.com/360334. + gfx::Rect dip_rect; if (client->HasCompositionText()) { if (!client->GetCompositionCharacterBounds(char_positon->dwCharPos, - &rect)) { + &dip_rect)) { return 0; } } else { @@ -310,8 +536,9 @@ LRESULT InputMethodWin::OnQueryCharPosition(IMECHARPOSITION* char_positon) { // the caret bounds. This behavior is the same to that of RichEdit control. if (char_positon->dwCharPos != 0) return 0; - rect = client->GetCaretBounds(); + dip_rect = client->GetCaretBounds(); } + const gfx::Rect rect = gfx::win::DIPToScreenRect(dip_rect); char_positon->pt.x = rect.x(); char_positon->pt.y = rect.y(); @@ -325,38 +552,22 @@ HWND InputMethodWin::GetAttachedWindowHandle( // represents the valid top-level window handle because each top-level window // is responsible for lifecycle management of corresponding InputMethod // instance. -#if defined(USE_AURA) return toplevel_window_handle_; -#else - // On Non-Aura environment, TextInputClient::GetAttachedWindow() returns - // window handle to which each input method is bound. - if (!text_input_client) - return NULL; - return text_input_client->GetAttachedWindow(); -#endif } bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const { if (!client) return false; HWND attached_window_handle = GetAttachedWindowHandle(client); -#if defined(USE_AURA) // When Aura is enabled, |attached_window_handle| should always be a top-level // window. So we can safely assume that |attached_window_handle| is ready for // receiving keyboard input as long as it is an active window. This works well // even when the |attached_window_handle| becomes active but has not received // WM_FOCUS yet. return attached_window_handle && GetActiveWindow() == attached_window_handle; -#else - return attached_window_handle && GetFocus() == attached_window_handle; -#endif } bool InputMethodWin::DispatchFabricatedKeyEvent(const ui::KeyEvent& event) { - // TODO(ananta) - // Support IMEs and RTL layout in Windows 8 metro Ash. The code below won't - // work with IMEs. - // Bug: https://code.google.com/p/chromium/issues/detail?id=164964 if (event.is_char()) { if (GetTextInputClient()) { GetTextInputClient()->InsertChar(event.key_code(), @@ -367,4 +578,40 @@ bool InputMethodWin::DispatchFabricatedKeyEvent(const ui::KeyEvent& event) { return DispatchKeyEventPostIME(event); } +void InputMethodWin::ConfirmCompositionText() { + if (composing_window_handle_) + imm32_manager_.CleanupComposition(composing_window_handle_); + + if (!IsTextInputTypeNone()) { + // Though above line should confirm the client's composition text by sending + // a result text to us, in case the input method and the client are in + // inconsistent states, we check the client's composition state again. + if (GetTextInputClient()->HasCompositionText()) + GetTextInputClient()->ConfirmCompositionText(); + } +} + +void InputMethodWin::UpdateIMEState() { + // Use switch here in case we are going to add more text input types. + // We disable input method in password field. + const HWND window_handle = GetAttachedWindowHandle(GetTextInputClient()); + const TextInputType text_input_type = GetTextInputType(); + const TextInputMode text_input_mode = GetTextInputMode(); + switch (text_input_type) { + case ui::TEXT_INPUT_TYPE_NONE: + case ui::TEXT_INPUT_TYPE_PASSWORD: + imm32_manager_.DisableIME(window_handle); + enabled_ = false; + break; + default: + imm32_manager_.EnableIME(window_handle); + enabled_ = true; + break; + } + + imm32_manager_.SetTextInputMode(window_handle, text_input_mode); + tsf_inputscope::SetInputScopeForTsfUnawareWindow( + window_handle, text_input_type, text_input_mode); +} + } // namespace ui diff --git a/chromium/ui/base/ime/input_method_win.h b/chromium/ui/base/ime/input_method_win.h index e034525b375..b02d670c17a 100644 --- a/chromium/ui/base/ime/input_method_win.h +++ b/chromium/ui/base/ime/input_method_win.h @@ -16,45 +16,76 @@ namespace ui { -// A common InputMethod implementation shared between IMM32 and TSF. -class UI_EXPORT InputMethodWin : public InputMethodBase { +// A common InputMethod implementation based on IMM32. +class UI_BASE_EXPORT InputMethodWin : public InputMethodBase { public: InputMethodWin(internal::InputMethodDelegate* delegate, HWND toplevel_window_handle); // Overridden from InputMethod: virtual void Init(bool focused) OVERRIDE; + virtual void OnFocus() OVERRIDE; + virtual void OnBlur() OVERRIDE; + virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event, + NativeEventResult* result) OVERRIDE; virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE; + virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE; + virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE; + virtual void CancelComposition(const TextInputClient* client) OVERRIDE; virtual void OnInputLocaleChanged() OVERRIDE; virtual std::string GetInputLocale() OVERRIDE; - virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE; virtual bool IsActive() OVERRIDE; + virtual bool IsCandidatePopupOpen() const OVERRIDE; protected: // Overridden from InputMethodBase: // If a derived class overrides this method, it should call parent's // implementation. + virtual void OnWillChangeFocusedClient(TextInputClient* focused_before, + TextInputClient* focused) OVERRIDE; virtual void OnDidChangeFocusedClient(TextInputClient* focused_before, TextInputClient* focused) OVERRIDE; - // Some IMEs rely on WM_IME_REQUEST message even when TSF is enabled. So - // OnImeRequest (and its actual implementations as OnDocumentFeed, - // OnReconvertString, and OnQueryCharPosition) are placed in this base class. - LRESULT OnImeRequest(UINT message, - WPARAM wparam, - LPARAM lparam, - BOOL* handled); + private: // For both WM_CHAR and WM_SYSCHAR LRESULT OnChar(HWND window_handle, UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); - // For both WM_DEADCHAR and WM_SYSDEADCHAR - // TODO(yukawa): Stop handling WM_DEADCHAR and WM_SYSDEADCHAR when non-Aura - // build is deprecated. - LRESULT OnDeadChar(UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); + LRESULT OnImeSetContext(HWND window_handle, + UINT message, + WPARAM wparam, + LPARAM lparam, + BOOL* handled); + LRESULT OnImeStartComposition(HWND window_handle, + UINT message, + WPARAM wparam, + LPARAM lparam, + BOOL* handled); + LRESULT OnImeComposition(HWND window_handle, + UINT message, + WPARAM wparam, + LPARAM lparam, + BOOL* handled); + LRESULT OnImeEndComposition(HWND window_handle, + UINT message, + WPARAM wparam, + LPARAM lparam, + BOOL* handled); + LRESULT OnImeNotify(UINT message, + WPARAM wparam, + LPARAM lparam, + BOOL* handled); + + // Some IMEs rely on WM_IME_REQUEST message even when TSF is enabled. So + // OnImeRequest (and its actual implementations as OnDocumentFeed, + // OnReconvertString, and OnQueryCharPosition) are placed in this base class. + LRESULT OnImeRequest(UINT message, + WPARAM wparam, + LPARAM lparam, + BOOL* handled); LRESULT OnDocumentFeed(RECONVERTSTRING* reconv); LRESULT OnReconvertString(RECONVERTSTRING* reconv); LRESULT OnQueryCharPosition(IMECHARPOSITION* char_positon); @@ -67,16 +98,18 @@ class UI_EXPORT InputMethodWin : public InputMethodBase { // to be ready for receiving keyboard input. bool IsWindowFocused(const TextInputClient* client) const; - // Indicates if the current input locale has an IME. - bool active_; + bool DispatchFabricatedKeyEvent(const ui::KeyEvent& event); + + // Asks the client to confirm current composition text. + void ConfirmCompositionText(); + + // Enables or disables the IME according to the current text input type. + void UpdateIMEState(); // Windows IMM32 wrapper. // (See "ui/base/ime/win/ime_input.h" for its details.) ui::IMM32Manager imm32_manager_; - private: - bool DispatchFabricatedKeyEvent(const ui::KeyEvent& event); - // The toplevel window handle. // On non-Aura environment, this value is not used and always NULL. const HWND toplevel_window_handle_; @@ -84,9 +117,6 @@ class UI_EXPORT InputMethodWin : public InputMethodBase { // Name of the current input locale. std::string locale_; - // The current input text direction. - base::i18n::TextDirection direction_; - // The new text direction and layout alignment requested by the user by // pressing ctrl-shift. It'll be sent to the text input client when the key // is released. @@ -98,6 +128,19 @@ class UI_EXPORT InputMethodWin : public InputMethodBase { // TODO(yukawa, IME): Figure out long-term solution. bool accept_carriage_return_; + // Indicates if the current input locale has an IME. + bool active_; + + // True when an IME should be allowed to process key events. + bool enabled_; + + // True if we know for sure that a candidate window is open. + bool is_candidate_popup_open_; + + // Window handle where composition is on-going. NULL when there is no + // composition. + HWND composing_window_handle_; + DISALLOW_COPY_AND_ASSIGN(InputMethodWin); }; diff --git a/chromium/ui/base/ime/linux/fake_input_method_context.cc b/chromium/ui/base/ime/linux/fake_input_method_context.cc index 434dcf67041..fd0d8e2c06d 100644 --- a/chromium/ui/base/ime/linux/fake_input_method_context.cc +++ b/chromium/ui/base/ime/linux/fake_input_method_context.cc @@ -18,11 +18,6 @@ bool FakeInputMethodContext::DispatchKeyEvent( void FakeInputMethodContext::Reset() { } -base::i18n::TextDirection FakeInputMethodContext::GetInputTextDirection() - const { - return base::i18n::UNKNOWN_DIRECTION; -} - void FakeInputMethodContext::OnTextInputTypeChanged( ui::TextInputType /* text_input_type */) { } diff --git a/chromium/ui/base/ime/linux/fake_input_method_context.h b/chromium/ui/base/ime/linux/fake_input_method_context.h index 9d9681a1e7b..67210c13e3d 100644 --- a/chromium/ui/base/ime/linux/fake_input_method_context.h +++ b/chromium/ui/base/ime/linux/fake_input_method_context.h @@ -17,7 +17,6 @@ class FakeInputMethodContext : public LinuxInputMethodContext { // Overriden from ui::LinuxInputMethodContext virtual bool DispatchKeyEvent(const ui::KeyEvent& key_event) OVERRIDE; virtual void Reset() OVERRIDE; - virtual base::i18n::TextDirection GetInputTextDirection() const OVERRIDE; virtual void OnTextInputTypeChanged(ui::TextInputType text_input_type) OVERRIDE; virtual void OnCaretBoundsChanged(const gfx::Rect& caret_bounds) OVERRIDE; diff --git a/chromium/ui/base/ime/linux/linux_input_method_context.h b/chromium/ui/base/ime/linux/linux_input_method_context.h index 2466afd1c73..0bcfd0a41f1 100644 --- a/chromium/ui/base/ime/linux/linux_input_method_context.h +++ b/chromium/ui/base/ime/linux/linux_input_method_context.h @@ -5,10 +5,9 @@ #ifndef UI_BASE_IME_LINUX_LINUX_INPUT_METHOD_CONTEXT_H_ #define UI_BASE_IME_LINUX_LINUX_INPUT_METHOD_CONTEXT_H_ -#include "base/i18n/rtl.h" #include "base/strings/string16.h" #include "ui/base/ime/text_input_type.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace gfx { class Rect; @@ -21,7 +20,7 @@ class KeyEvent; // An interface of input method context for input method frameworks on // GNU/Linux and likes. -class UI_EXPORT LinuxInputMethodContext { +class UI_BASE_EXPORT LinuxInputMethodContext { public: virtual ~LinuxInputMethodContext() {} @@ -34,9 +33,6 @@ class UI_EXPORT LinuxInputMethodContext { // before calling DispatchKeyEvent(). virtual void Reset() = 0; - // Returns the text direction of the current keyboard layout or input method. - virtual base::i18n::TextDirection GetInputTextDirection() const = 0; - // Notifies the context that the text input type has changed. virtual void OnTextInputTypeChanged(TextInputType text_input_type) = 0; @@ -46,7 +42,7 @@ class UI_EXPORT LinuxInputMethodContext { }; // An interface of callback functions called from LinuxInputMethodContext. -class UI_EXPORT LinuxInputMethodContextDelegate { +class UI_BASE_EXPORT LinuxInputMethodContextDelegate { public: virtual ~LinuxInputMethodContextDelegate() {} diff --git a/chromium/ui/base/ime/linux/linux_input_method_context_factory.h b/chromium/ui/base/ime/linux/linux_input_method_context_factory.h index 8ce1ec2a6be..af2a3a0c61e 100644 --- a/chromium/ui/base/ime/linux/linux_input_method_context_factory.h +++ b/chromium/ui/base/ime/linux/linux_input_method_context_factory.h @@ -6,7 +6,7 @@ #define UI_BASE_IME_LINUX_LINUX_INPUT_METHOD_CONTEXT_FACTORY_H_ #include "base/memory/scoped_ptr.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { @@ -16,7 +16,7 @@ class LinuxInputMethodContextDelegate; // An interface that lets different Linux platforms override the // CreateInputMethodContext function declared here to return native input method // contexts. -class UI_EXPORT LinuxInputMethodContextFactory { +class UI_BASE_EXPORT LinuxInputMethodContextFactory { public: // Returns the current active factory or NULL. static const LinuxInputMethodContextFactory* instance(); diff --git a/chromium/ui/base/ime/mock_input_method.cc b/chromium/ui/base/ime/mock_input_method.cc index c0a5c2a1f21..5ffc76fc1dc 100644 --- a/chromium/ui/base/ime/mock_input_method.cc +++ b/chromium/ui/base/ime/mock_input_method.cc @@ -4,6 +4,9 @@ #include "ui/base/ime/mock_input_method.h" +#include "ui/base/ime/text_input_focus_manager.h" +#include "ui/base/ui_base_switches_util.h" + namespace ui { MockInputMethod::MockInputMethod(internal::InputMethodDelegate* delegate) @@ -17,6 +20,9 @@ void MockInputMethod::SetDelegate(internal::InputMethodDelegate* delegate) { } void MockInputMethod::SetFocusedTextInputClient(TextInputClient* client) { + if (switches::IsTextInputFocusManagerEnabled()) + return; + if (text_input_client_ == client) return; text_input_client_ = client; @@ -31,6 +37,9 @@ void MockInputMethod::DetachTextInputClient(TextInputClient* client) { } TextInputClient* MockInputMethod::GetTextInputClient() const { + if (switches::IsTextInputFocusManagerEnabled()) + return TextInputFocusManager::GetInstance()->GetFocusedTextInputClient(); + return text_input_client_; } @@ -81,10 +90,6 @@ std::string MockInputMethod::GetInputLocale() { return ""; } -base::i18n::TextDirection MockInputMethod::GetInputTextDirection() { - return base::i18n::UNKNOWN_DIRECTION; -} - bool MockInputMethod::IsActive() { return true; } @@ -105,6 +110,10 @@ bool MockInputMethod::IsCandidatePopupOpen() const { return false; } +void MockInputMethod::ShowImeIfNeeded() { + FOR_EACH_OBSERVER(InputMethodObserver, observer_list_, OnShowImeIfNeeded()); +} + void MockInputMethod::AddObserver(InputMethodObserver* observer) { observer_list_.AddObserver(observer); } diff --git a/chromium/ui/base/ime/mock_input_method.h b/chromium/ui/base/ime/mock_input_method.h index 997c4aac516..7716065ce98 100644 --- a/chromium/ui/base/ime/mock_input_method.h +++ b/chromium/ui/base/ime/mock_input_method.h @@ -12,7 +12,7 @@ #include "base/observer_list.h" #include "ui/base/ime/input_method.h" #include "ui/base/ime/input_method_observer.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { @@ -23,7 +23,7 @@ class TextInputClient; // of this class as the global input method with calling // SetUpInputMethodFactoryForTesting() which is declared in // ui/base/ime/input_method_factory.h -class UI_EXPORT MockInputMethod : NON_EXPORTED_BASE(public InputMethod) { +class UI_BASE_EXPORT MockInputMethod : NON_EXPORTED_BASE(public InputMethod) { public: explicit MockInputMethod(internal::InputMethodDelegate* delegate); virtual ~MockInputMethod(); @@ -44,12 +44,12 @@ class UI_EXPORT MockInputMethod : NON_EXPORTED_BASE(public InputMethod) { virtual void CancelComposition(const TextInputClient* client) OVERRIDE; virtual void OnInputLocaleChanged() OVERRIDE; virtual std::string GetInputLocale() OVERRIDE; - virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE; virtual bool IsActive() OVERRIDE; virtual TextInputType GetTextInputType() const OVERRIDE; virtual TextInputMode GetTextInputMode() const OVERRIDE; virtual bool CanComposeInline() const OVERRIDE; virtual bool IsCandidatePopupOpen() const OVERRIDE; + virtual void ShowImeIfNeeded() OVERRIDE; virtual void AddObserver(InputMethodObserver* observer) OVERRIDE; virtual void RemoveObserver(InputMethodObserver* observer) OVERRIDE; diff --git a/chromium/ui/base/ime/remote_input_method_delegate_win.h b/chromium/ui/base/ime/remote_input_method_delegate_win.h index 961ccb7cb3f..993faf860bb 100644 --- a/chromium/ui/base/ime/remote_input_method_delegate_win.h +++ b/chromium/ui/base/ime/remote_input_method_delegate_win.h @@ -8,7 +8,7 @@ #include <vector> #include "base/basictypes.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/rect.h" namespace ui { @@ -16,7 +16,7 @@ namespace internal { // An interface implemented by the object to forward events that should be // handled by the IME which is running in the remote metro_driver process. -class UI_EXPORT RemoteInputMethodDelegateWin { +class UI_BASE_EXPORT RemoteInputMethodDelegateWin { public: virtual ~RemoteInputMethodDelegateWin() {} diff --git a/chromium/ui/base/ime/remote_input_method_win.cc b/chromium/ui/base/ime/remote_input_method_win.cc index cc5fc20156c..9fad0adbd95 100644 --- a/chromium/ui/base/ime/remote_input_method_win.cc +++ b/chromium/ui/base/ime/remote_input_method_win.cc @@ -61,7 +61,7 @@ std::string GetLocaleString(LCID Locale_id, LCTYPE locale_type) { if (chars_written <= 1 || arraysize(buffer) < chars_written) return std::string(); std::string result; - WideToUTF8(buffer, chars_written - 1, &result); + base::WideToUTF8(buffer, chars_written - 1, &result); return result; } @@ -85,19 +85,24 @@ std::vector<gfx::Rect> GetCompositionCharacterBounds( if (!client) return std::vector<gfx::Rect>(); - if (!client->HasCompositionText()) { - std::vector<gfx::Rect> caret; - caret.push_back(client->GetCaretBounds()); - return caret; - } - std::vector<gfx::Rect> bounds; - for (uint32 i = 0;; ++i) { - gfx::Rect rect; - if (!client->GetCompositionCharacterBounds(i, &rect)) - break; - bounds.push_back(rect); + if (client->HasCompositionText()) { + gfx::Range range; + if (client->GetCompositionTextRange(&range)) { + for (uint32 i = 0; i < range.length(); ++i) { + gfx::Rect rect; + if (!client->GetCompositionCharacterBounds(i, &rect)) + break; + bounds.push_back(rect); + } + } } + + // Use the caret bounds as a fallback if no composition character bounds is + // available. One typical use case is PPAPI Flash, which does not support + // GetCompositionCharacterBounds at all. crbug.com/133472 + if (bounds.empty()) + bounds.push_back(client->GetCaretBounds()); return bounds; } @@ -185,7 +190,7 @@ class RemoteInputMethodWin : public InputMethod, if (!text_input_client_) return false; text_input_client_->InsertChar( - static_cast<char16>(native_key_event.wParam), + static_cast<base::char16>(native_key_event.wParam), ui::GetModifiersFromKeyState()); return true; } @@ -199,9 +204,7 @@ class RemoteInputMethodWin : public InputMethod, } if (!delegate_) return false; - return delegate_->DispatchFabricatedKeyEventPostIME(event.type(), - event.key_code(), - event.flags()); + return delegate_->DispatchKeyEventPostIME(event); } virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE { @@ -250,20 +253,6 @@ class RemoteInputMethodWin : public InputMethod, return language.append(1, '-').append(region); } - virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE { - switch (PRIMARYLANGID(langid_)) { - case LANG_ARABIC: - case LANG_HEBREW: - case LANG_PERSIAN: - case LANG_SYRIAC: - case LANG_UIGHUR: - case LANG_URDU: - return base::i18n::RIGHT_TO_LEFT; - default: - return base::i18n::LEFT_TO_RIGHT; - } - } - virtual bool IsActive() OVERRIDE { return true; // always turned on } @@ -286,6 +275,9 @@ class RemoteInputMethodWin : public InputMethod, return is_candidate_popup_open_; } + virtual void ShowImeIfNeeded() OVERRIDE { + } + virtual void AddObserver(InputMethodObserver* observer) OVERRIDE { observer_list_.AddObserver(observer); } @@ -308,6 +300,14 @@ class RemoteInputMethodWin : public InputMethod, virtual void OnCandidatePopupChanged(bool visible) OVERRIDE { is_candidate_popup_open_ = visible; + if (!text_input_client_) + return; + // TODO(kochi): Support 'update' case, in addition to show/hide. + // http://crbug.com/238585 + if (visible) + text_input_client_->OnCandidateWindowShown(); + else + text_input_client_->OnCandidateWindowHidden(); } virtual void OnInputSourceChanged(LANGID langid, bool /*is_ime*/) OVERRIDE { diff --git a/chromium/ui/base/ime/remote_input_method_win.h b/chromium/ui/base/ime/remote_input_method_win.h index f8d9fc01762..5258f3d4eac 100644 --- a/chromium/ui/base/ime/remote_input_method_win.h +++ b/chromium/ui/base/ime/remote_input_method_win.h @@ -13,7 +13,7 @@ #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/native_widget_types.h" namespace ui { @@ -32,7 +32,7 @@ struct CompositionText; // metro_driver process via RemoteInputMethodDelegateWin. // - Data retrieval from RemoteInputMethodPrivateWin is implemented with // data cache. Whenever the IME state in the metro_driver process is changed, -// RemoteRootWindowHostWin, which receives IPCs from metro_driver process, +// RemoteWindowTreeHostWin, which receives IPCs from metro_driver process, // will call RemoteInputMethodPrivateWin::OnCandidatePopupChanged and/or // RemoteInputMethodPrivateWin::OnInputSourceChanged accordingly so that // the state cache should be updated. @@ -46,11 +46,11 @@ bool IsRemoteInputMethodWinRequired(gfx::AcceleratedWidget widget); // Returns the public interface of RemoteInputMethodWin. // Caveats: Currently only one instance of RemoteInputMethodWin is able to run // at the same time. -UI_EXPORT scoped_ptr<InputMethod> CreateRemoteInputMethodWin( +UI_BASE_EXPORT scoped_ptr<InputMethod> CreateRemoteInputMethodWin( internal::InputMethodDelegate* delegate); // Private interface of RemoteInputMethodWin. -class UI_EXPORT RemoteInputMethodPrivateWin { +class UI_BASE_EXPORT RemoteInputMethodPrivateWin { public: RemoteInputMethodPrivateWin(); @@ -72,9 +72,8 @@ class UI_EXPORT RemoteInputMethodPrivateWin { virtual void OnCandidatePopupChanged(bool visible) = 0; // Updates internal cache so that subsequent calls of - // RemoteInputMethodWin::GetInputLocale and - // RemoteInputMethodWin::GetInputTextDirection can return the correct - // values based on remote IME activities in the metro_driver process. + // RemoteInputMethodWin::GetInputLocale can return the correct values based on + // remote IME activities in the metro_driver process. virtual void OnInputSourceChanged(LANGID langid, bool is_ime) = 0; // Handles composition-update events occurred in the metro_driver process. diff --git a/chromium/ui/base/ime/remote_input_method_win_unittest.cc b/chromium/ui/base/ime/remote_input_method_win_unittest.cc index 781516872c5..3fa8be0cf32 100644 --- a/chromium/ui/base/ime/remote_input_method_win_unittest.cc +++ b/chromium/ui/base/ime/remote_input_method_win_unittest.cc @@ -30,7 +30,10 @@ class MockTextInputClient : public DummyTextInputClient { text_input_mode_(TEXT_INPUT_MODE_DEFAULT), call_count_set_composition_text_(0), call_count_insert_char_(0), - call_count_insert_text_(0) { + call_count_insert_text_(0), + emulate_pepper_flash_(false), + is_candidate_window_shown_called_(false), + is_candidate_window_hidden_called_(false) { } size_t call_count_set_composition_text() const { @@ -45,6 +48,12 @@ class MockTextInputClient : public DummyTextInputClient { size_t call_count_insert_text() const { return call_count_insert_text_; } + bool is_candidate_window_shown_called() const { + return is_candidate_window_shown_called_; + } + bool is_candidate_window_hidden_called() const { + return is_candidate_window_hidden_called_; + } void Reset() { text_input_type_ = TEXT_INPUT_TYPE_NONE; text_input_mode_ = TEXT_INPUT_MODE_DEFAULT; @@ -54,6 +63,9 @@ class MockTextInputClient : public DummyTextInputClient { call_count_insert_text_ = 0; caret_bounds_ = gfx::Rect(); composition_character_bounds_.clear(); + emulate_pepper_flash_ = false; + is_candidate_window_shown_called_ = false; + is_candidate_window_hidden_called_ = false; } void set_text_input_type(ui::TextInputType type) { text_input_type_ = type; @@ -68,6 +80,9 @@ class MockTextInputClient : public DummyTextInputClient { const std::vector<gfx::Rect>& composition_character_bounds) { composition_character_bounds_ = composition_character_bounds; } + void set_emulate_pepper_flash(bool enabled) { + emulate_pepper_flash_ = enabled; + } private: // Overriden from DummyTextInputClient. @@ -75,11 +90,11 @@ class MockTextInputClient : public DummyTextInputClient { const ui::CompositionText& composition) OVERRIDE { ++call_count_set_composition_text_; } - virtual void InsertChar(char16 ch, int flags) OVERRIDE{ + virtual void InsertChar(base::char16 ch, int flags) OVERRIDE { inserted_text_.append(1, ch); ++call_count_insert_char_; } - virtual void InsertText(const string16& text) OVERRIDE{ + virtual void InsertText(const base::string16& text) OVERRIDE { inserted_text_.append(text); ++call_count_insert_text_; } @@ -94,6 +109,9 @@ class MockTextInputClient : public DummyTextInputClient { } virtual bool GetCompositionCharacterBounds(uint32 index, gfx::Rect* rect) const OVERRIDE { + // Emulate the situation of crbug.com/328237. + if (emulate_pepper_flash_) + return false; if (!rect || composition_character_bounds_.size() <= index) return false; *rect = composition_character_bounds_[index]; @@ -102,6 +120,18 @@ class MockTextInputClient : public DummyTextInputClient { virtual bool HasCompositionText() const OVERRIDE { return !composition_character_bounds_.empty(); } + virtual bool GetCompositionTextRange(gfx::Range* range) const OVERRIDE { + if (composition_character_bounds_.empty()) + return false; + *range = gfx::Range(0, composition_character_bounds_.size()); + return true; + } + virtual void OnCandidateWindowShown() OVERRIDE { + is_candidate_window_shown_called_ = true; + } + virtual void OnCandidateWindowHidden() OVERRIDE { + is_candidate_window_hidden_called_ = true; + } ui::TextInputType text_input_type_; ui::TextInputMode text_input_mode_; @@ -111,6 +141,9 @@ class MockTextInputClient : public DummyTextInputClient { size_t call_count_set_composition_text_; size_t call_count_insert_char_; size_t call_count_insert_text_; + bool emulate_pepper_flash_; + bool is_candidate_window_shown_called_; + bool is_candidate_window_hidden_called_; DISALLOW_COPY_AND_ASSIGN(MockTextInputClient); }; @@ -126,15 +159,9 @@ class MockInputMethodDelegate : public internal::InputMethodDelegate { } private: - virtual bool DispatchKeyEventPostIME( - const base::NativeEvent& native_key_event) OVERRIDE { - EXPECT_TRUE(false) << "Not reach here"; - return true; - } - virtual bool DispatchFabricatedKeyEventPostIME(ui::EventType type, - ui::KeyboardCode key_code, - int flags) OVERRIDE { - fabricated_key_events_.push_back(key_code); + virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) OVERRIDE { + EXPECT_FALSE(event.HasNativeEvent()); + fabricated_key_events_.push_back(event.key_code()); return true; } @@ -224,6 +251,8 @@ class MockInputMethodObserver : public InputMethodObserver { virtual void OnInputMethodDestroyed(const InputMethod* client) OVERRIDE { ++on_input_method_destroyed_changed_; } + virtual void OnShowImeIfNeeded() { + } size_t on_text_input_state_changed_; size_t on_input_method_destroyed_changed_; @@ -260,14 +289,10 @@ TEST(RemoteInputMethodWinTest, OnInputSourceChanged) { private_ptr->OnInputSourceChanged( MAKELANGID(LANG_JAPANESE, SUBLANG_JAPANESE_JAPAN), true); EXPECT_EQ("ja-JP", input_method->GetInputLocale()); - EXPECT_EQ(base::i18n::LEFT_TO_RIGHT, - input_method->GetInputTextDirection()); private_ptr->OnInputSourceChanged( MAKELANGID(LANG_ARABIC, SUBLANG_ARABIC_QATAR), true); EXPECT_EQ("ar-QA", input_method->GetInputLocale()); - EXPECT_EQ(base::i18n::RIGHT_TO_LEFT, - input_method->GetInputTextDirection()); } TEST(RemoteInputMethodWinTest, OnCandidatePopupChanged) { @@ -280,11 +305,28 @@ TEST(RemoteInputMethodWinTest, OnCandidatePopupChanged) { // Initial value EXPECT_FALSE(input_method->IsCandidatePopupOpen()); + // RemoteInputMethodWin::OnCandidatePopupChanged can be called even when the + // focused text input client is NULL. + ASSERT_TRUE(input_method->GetTextInputClient() == NULL); + private_ptr->OnCandidatePopupChanged(false); + private_ptr->OnCandidatePopupChanged(true); + + MockTextInputClient mock_text_input_client; + input_method->SetFocusedTextInputClient(&mock_text_input_client); + + ASSERT_FALSE(mock_text_input_client.is_candidate_window_shown_called()); + ASSERT_FALSE(mock_text_input_client.is_candidate_window_hidden_called()); + mock_text_input_client.Reset(); + private_ptr->OnCandidatePopupChanged(true); EXPECT_TRUE(input_method->IsCandidatePopupOpen()); + EXPECT_TRUE(mock_text_input_client.is_candidate_window_shown_called()); + EXPECT_FALSE(mock_text_input_client.is_candidate_window_hidden_called()); private_ptr->OnCandidatePopupChanged(false); EXPECT_FALSE(input_method->IsCandidatePopupOpen()); + EXPECT_TRUE(mock_text_input_client.is_candidate_window_shown_called()); + EXPECT_TRUE(mock_text_input_client.is_candidate_window_hidden_called()); } TEST(RemoteInputMethodWinTest, CancelComposition) { @@ -424,6 +466,38 @@ TEST(RemoteInputMethodWinTest, OnCaretBoundsChanged) { } } +// Test case against crbug.com/328237. +TEST(RemoteInputMethodWinTest, OnCaretBoundsChangedForPepperFlash) { + MockInputMethodDelegate delegate_; + MockTextInputClient mock_text_input_client; + scoped_ptr<InputMethod> input_method(CreateRemoteInputMethodWin(&delegate_)); + input_method->SetFocusedTextInputClient(&mock_text_input_client); + + RemoteInputMethodPrivateWin* private_ptr = + RemoteInputMethodPrivateWin::Get(input_method.get()); + ASSERT_TRUE(private_ptr != NULL); + MockRemoteInputMethodDelegateWin mock_remote_delegate; + private_ptr->SetRemoteDelegate(&mock_remote_delegate); + + mock_remote_delegate.Reset(); + mock_text_input_client.Reset(); + mock_text_input_client.set_emulate_pepper_flash(true); + + std::vector<gfx::Rect> caret_bounds; + caret_bounds.push_back(gfx::Rect(5, 15, 25, 35)); + mock_text_input_client.set_caret_bounds(caret_bounds[0]); + + std::vector<gfx::Rect> composition_bounds; + composition_bounds.push_back(gfx::Rect(10, 20, 30, 40)); + composition_bounds.push_back(gfx::Rect(40, 30, 20, 10)); + mock_text_input_client.set_composition_character_bounds(composition_bounds); + input_method->OnCaretBoundsChanged(&mock_text_input_client); + EXPECT_TRUE(mock_remote_delegate.text_input_client_updated_called()); + // The caret bounds must be used when + // TextInputClient::GetCompositionCharacterBounds failed. + EXPECT_EQ(caret_bounds, mock_remote_delegate.composition_character_bounds()); +} + TEST(RemoteInputMethodWinTest, OnTextInputTypeChanged) { MockInputMethodDelegate delegate_; MockTextInputClient mock_text_input_client; diff --git a/chromium/ui/base/ime/text_input_client.h b/chromium/ui/base/ime/text_input_client.h index 8623064f3c0..ff1242fae51 100644 --- a/chromium/ui/base/ime/text_input_client.h +++ b/chromium/ui/base/ime/text_input_client.h @@ -11,7 +11,7 @@ #include "ui/base/ime/composition_text.h" #include "ui/base/ime/text_input_mode.h" #include "ui/base/ime/text_input_type.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/range/range.h" @@ -22,7 +22,7 @@ class Rect; namespace ui { // An interface implemented by a View that needs text input support. -class UI_EXPORT TextInputClient { +class UI_BASE_EXPORT TextInputClient { public: virtual ~TextInputClient(); @@ -71,16 +71,24 @@ class UI_EXPORT TextInputClient { // Returns if the client supports inline composition currently. virtual bool CanComposeInline() const = 0; - // Returns current caret (insertion point) bounds relative to the screen + // Returns current caret (insertion point) bounds in the universal screen // coordinates. If there is selection, then the selection bounds will be // returned. + // Note: On Windows, the returned value is supposed to be DIP (Density + // Independent Pixel). + // TODO(ime): Have a clear spec whether the returned value is DIP or not. + // http://crbug.com/360334 virtual gfx::Rect GetCaretBounds() const = 0; - // Retrieves the composition character boundary rectangle relative to the + // Retrieves the composition character boundary rectangle in the universal // screen coordinates. The |index| is zero-based index of character position // in composition text. // Returns false if there is no composition text or |index| is out of range. // The |rect| is not touched in the case of failure. + // Note: On Windows, the returned value is supposed to be DIP + // (Density Independent Pixel). + // TODO(ime): Have a clear spec whether the returned value is DIP or not. + // http://crbug.com/360334 virtual bool GetCompositionCharacterBounds(uint32 index, gfx::Rect* rect) const = 0; @@ -146,6 +154,10 @@ class UI_EXPORT TextInputClient { // Ensure the caret is within |rect|. |rect| is in screen coordinates and // may extend beyond the bounds of this TextInputClient. + // Note: On Windows, the returned value is supposed to be DIP (Density + // Independent Pixel). + // TODO(ime): Have a clear spec whether the returned value is DIP or not. + // http://crbug.com/360334 virtual void EnsureCaretInRect(const gfx::Rect& rect) = 0; // Called when IME shows a candidate window. @@ -154,6 +166,11 @@ class UI_EXPORT TextInputClient { virtual void OnCandidateWindowUpdated() = 0; // Called when IME hides the candidate window. virtual void OnCandidateWindowHidden() = 0; + + // Returns true if |command_id| is currently allowed to be executed. + virtual bool IsEditingCommandEnabled(int command_id) = 0; + // Execute the command specified by |command_id|. + virtual void ExecuteEditingCommand(int command_id) = 0; }; } // namespace ui diff --git a/chromium/ui/base/ime/text_input_focus_manager.cc b/chromium/ui/base/ime/text_input_focus_manager.cc new file mode 100644 index 00000000000..4fd7dcffb3c --- /dev/null +++ b/chromium/ui/base/ime/text_input_focus_manager.cc @@ -0,0 +1,41 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/ime/text_input_focus_manager.h" + +#include "base/logging.h" +#include "base/memory/singleton.h" + +namespace ui { + +TextInputFocusManager* TextInputFocusManager::GetInstance() { + TextInputFocusManager* instance = Singleton<TextInputFocusManager>::get(); + DCHECK(instance->thread_checker_.CalledOnValidThread()); + return instance; +} + +TextInputClient* TextInputFocusManager::GetFocusedTextInputClient() { + DCHECK(thread_checker_.CalledOnValidThread()); + return focused_text_input_client_; +} + +void TextInputFocusManager::FocusTextInputClient( + TextInputClient* text_input_client) { + DCHECK(thread_checker_.CalledOnValidThread()); + focused_text_input_client_ = text_input_client; +} + +void TextInputFocusManager::BlurTextInputClient( + TextInputClient* text_input_client) { + DCHECK(thread_checker_.CalledOnValidThread()); + if (focused_text_input_client_ == text_input_client) + focused_text_input_client_ = NULL; +} + +TextInputFocusManager::TextInputFocusManager() + : focused_text_input_client_(NULL) {} + +TextInputFocusManager::~TextInputFocusManager() {} + +} // namespace ui diff --git a/chromium/ui/base/ime/text_input_focus_manager.h b/chromium/ui/base/ime/text_input_focus_manager.h new file mode 100644 index 00000000000..22f47e3e419 --- /dev/null +++ b/chromium/ui/base/ime/text_input_focus_manager.h @@ -0,0 +1,47 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_IME_TEXT_INPUT_FOCUS_MANAGER_H_ +#define UI_BASE_IME_TEXT_INPUT_FOCUS_MANAGER_H_ + +#include "base/macros.h" +#include "base/threading/thread_checker.h" +#include "ui/base/ui_base_export.h" + +template <typename T> struct DefaultSingletonTraits; + +namespace ui { + +class TextInputClient; + +// Manages the focused TextInputClient across windows and their contents. +class UI_BASE_EXPORT TextInputFocusManager { + public: + static TextInputFocusManager* GetInstance(); + + // Returns the currently focused text input client or NULL. + TextInputClient* GetFocusedTextInputClient(); + + // Changes the text input focus to |text_input_client|. + void FocusTextInputClient(TextInputClient* text_input_client); + + // Removes the text input focus from |text_input_client|. If + // |text_input_client| was not focused, does nothing. + void BlurTextInputClient(TextInputClient* text_input_client); + + private: + friend struct DefaultSingletonTraits<TextInputFocusManager>; + + TextInputFocusManager(); + ~TextInputFocusManager(); + + TextInputClient* focused_text_input_client_; + base::ThreadChecker thread_checker_; + + DISALLOW_COPY_AND_ASSIGN(TextInputFocusManager); +}; + +} // namespace ui + +#endif // UI_BASE_IME_TEXT_INPUT_FOCUS_MANAGER_H_ diff --git a/chromium/ui/base/ime/win/imm32_manager.cc b/chromium/ui/base/ime/win/imm32_manager.cc index 093b0109366..7ad2d875e4c 100644 --- a/chromium/ui/base/ime/win/imm32_manager.cc +++ b/chromium/ui/base/ime/win/imm32_manager.cc @@ -4,8 +4,6 @@ #include "ui/base/ime/win/imm32_manager.h" -#include <atlbase.h> -#include <atlcom.h> #include <msctf.h> #include "base/basictypes.h" @@ -24,7 +22,7 @@ // Following code requires wchar_t to be same as char16. It should always be // true on Windows. -COMPILE_ASSERT(sizeof(wchar_t) == sizeof(char16), wchar_t__char16_diff); +COMPILE_ASSERT(sizeof(wchar_t) == sizeof(base::char16), wchar_t__char16_diff); /////////////////////////////////////////////////////////////////////////////// // IMM32Manager @@ -85,10 +83,11 @@ void GetCompositionUnderlines(HIMC imm_context, underline.end_offset = clause_data[i+1]; underline.color = SK_ColorBLACK; underline.thick = false; + underline.background_color = SK_ColorTRANSPARENT; // Use thick underline for the target clause. - if (underline.start_offset >= static_cast<unsigned>(target_start) && - underline.end_offset <= static_cast<unsigned>(target_end)) { + if (underline.start_offset >= static_cast<uint32>(target_start) && + underline.end_offset <= static_cast<uint32>(target_end)) { underline.thick = true; } underlines->push_back(underline); @@ -344,21 +343,22 @@ void IMM32Manager::GetCompositionInfo(HIMC imm_context, LPARAM lparam, if (!composition->underlines.size()) { CompositionUnderline underline; underline.color = SK_ColorBLACK; + underline.background_color = SK_ColorTRANSPARENT; if (target_start > 0) { - underline.start_offset = 0; - underline.end_offset = target_start; + underline.start_offset = 0U; + underline.end_offset = static_cast<uint32>(target_start); underline.thick = false; composition->underlines.push_back(underline); } if (target_end > target_start) { - underline.start_offset = target_start; - underline.end_offset = target_end; + underline.start_offset = static_cast<uint32>(target_start); + underline.end_offset = static_cast<uint32>(target_end); underline.thick = true; composition->underlines.push_back(underline); } if (target_end < length) { - underline.start_offset = target_end; - underline.end_offset = length; + underline.start_offset = static_cast<uint32>(target_end); + underline.end_offset = static_cast<uint32>(length); underline.thick = false; composition->underlines.push_back(underline); } @@ -368,7 +368,7 @@ void IMM32Manager::GetCompositionInfo(HIMC imm_context, LPARAM lparam, bool IMM32Manager::GetString(HIMC imm_context, WPARAM lparam, int type, - string16* result) { + base::string16* result) { if (!(lparam & type)) return false; LONG string_size = ::ImmGetCompositionString(imm_context, type, NULL, 0); @@ -381,7 +381,7 @@ bool IMM32Manager::GetString(HIMC imm_context, } bool IMM32Manager::GetResult( - HWND window_handle, LPARAM lparam, string16* result) { + HWND window_handle, LPARAM lparam, base::string16* result) { bool ret = false; HIMC imm_context = ::ImmGetContext(window_handle); if (imm_context) { @@ -487,7 +487,7 @@ std::string IMM32Manager::GetInputLanguageName() const { return std::string(); std::string language; - WideToUTF8(buffer, length - 1, &language); + base::WideToUTF8(buffer, length - 1, &language); if (SUBLANGID(input_language_id_) == SUBLANG_NEUTRAL) return language; @@ -498,15 +498,10 @@ std::string IMM32Manager::GetInputLanguageName() const { return language; std::string region; - WideToUTF8(buffer, length - 1, ®ion); + base::WideToUTF8(buffer, length - 1, ®ion); return language.append(1, '-').append(region); } -base::i18n::TextDirection IMM32Manager::GetTextDirection() const { - return IsRTLPrimaryLangID(PRIMARYLANGID(input_language_id_)) ? - base::i18n::RIGHT_TO_LEFT : base::i18n::LEFT_TO_RIGHT; -} - void IMM32Manager::SetTextInputMode(HWND window_handle, TextInputMode input_mode) { if (input_mode == ui::TEXT_INPUT_MODE_DEFAULT) diff --git a/chromium/ui/base/ime/win/imm32_manager.h b/chromium/ui/base/ime/win/imm32_manager.h index 17892cb7640..3a969fd64a6 100644 --- a/chromium/ui/base/ime/win/imm32_manager.h +++ b/chromium/ui/base/ime/win/imm32_manager.h @@ -14,7 +14,7 @@ #include "base/i18n/rtl.h" #include "base/strings/string16.h" #include "ui/base/ime/text_input_mode.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/rect.h" namespace ui { @@ -74,7 +74,7 @@ struct CompositionText; // hand, we can NEVER disable either TSF or CUAS in Windows Vista, i.e. // THIS CLASS IS NOT ONLY USED ON THE INPUT CONTEXTS OF EAST-ASIAN // LANGUAGES BUT ALSO USED ON THE INPUT CONTEXTS OF ALL LANGUAGES. -class UI_EXPORT IMM32Manager { +class UI_BASE_EXPORT IMM32Manager { public: IMM32Manager(); virtual ~IMM32Manager(); @@ -154,7 +154,7 @@ class UI_EXPORT IMM32Manager { // the same parameter of a WM_IME_COMPOSITION message handler. // This parameter is used for checking if the ongoing composition has // its result string, - // * result [out] (string16) + // * result [out] (base::string16) // Represents the object contains the composition result. // Return values // * true @@ -164,7 +164,7 @@ class UI_EXPORT IMM32Manager { // Remarks // This function is designed for being called from WM_IME_COMPOSITION // message handlers. - bool GetResult(HWND window_handle, LPARAM lparam, string16* result); + bool GetResult(HWND window_handle, LPARAM lparam, base::string16* result); // Retrieves the current composition status of the ongoing composition. // Parameters @@ -237,9 +237,6 @@ class UI_EXPORT IMM32Manager { // Returns BCP-47 tag name of the current input language. std::string GetInputLanguageName() const; - // Returns the text direction of the current input language. - base::i18n::TextDirection GetTextDirection() const; - // Sets conversion status corresponding to |input_mode|. virtual void SetTextInputMode(HWND window_handle, TextInputMode input_mode); @@ -274,7 +271,10 @@ class UI_EXPORT IMM32Manager { void CompleteComposition(HWND window_handle, HIMC imm_context); // Retrieves a string from the IMM. - bool GetString(HIMC imm_context, WPARAM lparam, int type, string16* result); + bool GetString(HIMC imm_context, + WPARAM lparam, + int type, + base::string16* result); private: // Represents whether or not there is an ongoing composition in a browser diff --git a/chromium/ui/base/ime/win/mock_tsf_bridge.cc b/chromium/ui/base/ime/win/mock_tsf_bridge.cc deleted file mode 100644 index a26a81b1ebb..00000000000 --- a/chromium/ui/base/ime/win/mock_tsf_bridge.cc +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/ime/win/mock_tsf_bridge.h" - -#include "ui/base/ime/text_input_client.h" -#include "base/logging.h" - -namespace ui { - -MockTSFBridge::MockTSFBridge() - : enable_ime_call_count_(0), - disalbe_ime_call_count_(0), - cancel_composition_call_count_(0), - confirm_composition_call_count_(0), - on_text_layout_changed_(0), - associate_focus_call_count_(0), - set_focused_client_call_count_(0), - remove_focused_client_call_count_(0), - text_input_client_(NULL), - focused_window_(NULL), - latest_text_input_type_(TEXT_INPUT_TYPE_NONE) { -} - -MockTSFBridge::~MockTSFBridge() { -} - -bool MockTSFBridge::CancelComposition() { - ++cancel_composition_call_count_; - return true; -} - -bool MockTSFBridge::ConfirmComposition() { - ++confirm_composition_call_count_; - return true; -} - -void MockTSFBridge::OnTextInputTypeChanged(const TextInputClient* client) { - latest_text_input_type_ = client->GetTextInputType(); -} - -void MockTSFBridge::OnTextLayoutChanged() { - ++on_text_layout_changed_; -} - -void MockTSFBridge::SetFocusedClient(HWND focused_window, - TextInputClient* client) { - ++set_focused_client_call_count_; - focused_window_ = focused_window; - text_input_client_ = client; -} - -void MockTSFBridge::RemoveFocusedClient(TextInputClient* client) { - ++remove_focused_client_call_count_; - DCHECK_EQ(client, text_input_client_); - text_input_client_ = NULL; - focused_window_ = NULL; -} - -base::win::ScopedComPtr<ITfThreadMgr> MockTSFBridge::GetThreadManager() { - return thread_manager_; -} - -TextInputClient* MockTSFBridge::GetFocusedTextInputClient() const { - return text_input_client_; -} - -void MockTSFBridge::Reset() { - enable_ime_call_count_ = 0; - disalbe_ime_call_count_ = 0; - cancel_composition_call_count_ = 0; - confirm_composition_call_count_ = 0; - on_text_layout_changed_ = 0; - associate_focus_call_count_ = 0; - set_focused_client_call_count_ = 0; - remove_focused_client_call_count_ = 0; - text_input_client_ = NULL; - focused_window_ = NULL; - latest_text_input_type_ = TEXT_INPUT_TYPE_NONE; -} - -} // namespace ui diff --git a/chromium/ui/base/ime/win/mock_tsf_bridge.h b/chromium/ui/base/ime/win/mock_tsf_bridge.h deleted file mode 100644 index 1fdfc8ae049..00000000000 --- a/chromium/ui/base/ime/win/mock_tsf_bridge.h +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_IME_WIN_MOCK_TSF_BRIDGE_H_ -#define UI_BASE_IME_WIN_MOCK_TSF_BRIDGE_H_ - -#include <msctf.h> - -#include "base/compiler_specific.h" -#include "base/win/scoped_comptr.h" -#include "ui/base/ime/text_input_type.h" -#include "ui/base/ime/win/tsf_bridge.h" - -namespace ui { - -class MockTSFBridge : public TSFBridge { - public: - MockTSFBridge(); - virtual ~MockTSFBridge(); - - // TSFBridge: - virtual bool CancelComposition() OVERRIDE; - virtual bool ConfirmComposition() OVERRIDE; - virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE; - virtual void OnTextLayoutChanged() OVERRIDE; - virtual void SetFocusedClient(HWND focused_window, - TextInputClient* client) OVERRIDE; - virtual void RemoveFocusedClient(TextInputClient* client) OVERRIDE; - virtual base::win::ScopedComPtr<ITfThreadMgr> GetThreadManager() OVERRIDE; - virtual TextInputClient* GetFocusedTextInputClient() const OVERRIDE; - - // Resets MockTSFBridge state including function call counter. - void Reset(); - - // Call count of EnableIME(). - int enable_ime_call_count() const { return enable_ime_call_count_; } - - // Call count of DisableIME(). - int disalbe_ime_call_count() const { return disalbe_ime_call_count_; } - - // Call count of CancelComposition(). - int cancel_composition_call_count() const { - return cancel_composition_call_count_; - } - - // Call count of ConfirmComposition(). - int confirm_composition_call_count() const { - return confirm_composition_call_count_; - } - - // Call count of OnTextLayoutChanged(). - int on_text_layout_changed() const { - return on_text_layout_changed_; - } - - // Call count of AssociateFocus(). - int associate_focus_call_count() const { return associate_focus_call_count_; } - - // Call count of SetFocusClient(). - int set_focused_client_call_count() const { - return set_focused_client_call_count_; - } - - // Call count of RemoveFocusedClient(). - int remove_focused_client_call_count() const { - return remove_focused_client_call_count_; - } - - // Returns current TextInputClient. - TextInputClient* text_input_clinet() const { return text_input_client_; } - - // Returns currently focused window handle. - HWND focused_window() const { return focused_window_; } - - // Returns latest text input type. - TextInputType latest_text_iput_type() const { - return latest_text_input_type_; - } - - private: - int enable_ime_call_count_; - int disalbe_ime_call_count_; - int cancel_composition_call_count_; - int confirm_composition_call_count_; - int on_text_layout_changed_; - int associate_focus_call_count_; - int set_focused_client_call_count_; - int remove_focused_client_call_count_; - TextInputClient* text_input_client_; - HWND focused_window_; - TextInputType latest_text_input_type_; - base::win::ScopedComPtr<ITfThreadMgr> thread_manager_; - - DISALLOW_COPY_AND_ASSIGN(MockTSFBridge); -}; - -} // namespace ui - -#endif // UI_BASE_IME_WIN_MOCK_TSF_BRIDGE_H_ diff --git a/chromium/ui/base/ime/win/tsf_bridge.cc b/chromium/ui/base/ime/win/tsf_bridge.cc deleted file mode 100644 index bf2820323ef..00000000000 --- a/chromium/ui/base/ime/win/tsf_bridge.cc +++ /dev/null @@ -1,558 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include <msctf.h> - -#include <map> - -#include "base/logging.h" -#include "base/memory/ref_counted.h" -#include "base/memory/scoped_ptr.h" -#include "base/message_loop/message_loop.h" -#include "base/threading/thread_local_storage.h" -#include "base/win/scoped_comptr.h" -#include "base/win/scoped_variant.h" -#include "ui/base/ime/text_input_client.h" -#include "ui/base/ime/win/tsf_bridge.h" -#include "ui/base/ime/win/tsf_text_store.h" - -namespace ui { - -namespace { - -// We use thread local storage for TSFBridge lifespan management. -base::ThreadLocalStorage::StaticSlot tls_tsf_bridge = TLS_INITIALIZER; - - -// TsfBridgeDelegate ----------------------------------------------------------- - -// A TLS implementation of TSFBridge. -class TSFBridgeDelegate : public TSFBridge { - public: - TSFBridgeDelegate(); - virtual ~TSFBridgeDelegate(); - - bool Initialize(); - - // TsfBridge: - virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE; - virtual void OnTextLayoutChanged() OVERRIDE; - virtual bool CancelComposition() OVERRIDE; - virtual bool ConfirmComposition() OVERRIDE; - virtual void SetFocusedClient(HWND focused_window, - TextInputClient* client) OVERRIDE; - virtual void RemoveFocusedClient(TextInputClient* client) OVERRIDE; - virtual base::win::ScopedComPtr<ITfThreadMgr> GetThreadManager() OVERRIDE; - virtual TextInputClient* GetFocusedTextInputClient() const OVERRIDE; - - private: - // Returns true if |tsf_document_map_| is successfully initialized. This - // method should be called from and only from Initialize(). - bool InitializeDocumentMapInternal(); - - // Returns true if |context| is successfully updated to be a disabled - // context, where an IME should be deactivated. This is suitable for some - // special input context such as password fields. - bool InitializeDisabledContext(ITfContext* context); - - // Returns true if a TSF document manager and a TSF context is successfully - // created with associating with given |text_store|. The returned - // |source_cookie| indicates the binding between |text_store| and |context|. - // You can pass NULL to |text_store| and |source_cookie| when text store is - // not necessary. - bool CreateDocumentManager(TSFTextStore* text_store, - ITfDocumentMgr** document_manager, - ITfContext** context, - DWORD* source_cookie); - - // Returns true if |document_manager| is the focused document manager. - bool IsFocused(ITfDocumentMgr* document_manager); - - // Returns true if already initialized. - bool IsInitialized(); - - // Updates or clears the association maintained in the TSF runtime between - // |attached_window_handle_| and the current document manager. Keeping this - // association updated solves some tricky event ordering issues between - // logical text input focus managed by Chrome and native text input focus - // managed by the OS. - // Background: - // TSF runtime monitors some Win32 messages such as WM_ACTIVATE to - // change the focused document manager. This is problematic when - // TSFBridge::SetFocusedClient is called first then the target window - // receives WM_ACTIVATE. This actually occurs in Aura environment where - // WM_NCACTIVATE is used as a trigger to restore text input focus. - // Caveats: - // TSF runtime does not increment the reference count of the attached - // document manager. See the comment inside the method body for - // details. - void UpdateAssociateFocus(); - void ClearAssociateFocus(); - - // A triple of document manager, text store and binding cookie between - // a context owned by the document manager and the text store. This is a - // minimum working set of an editable document in TSF. - struct TSFDocument { - public: - TSFDocument() : cookie(TF_INVALID_COOKIE) {} - TSFDocument(const TSFDocument& src) - : document_manager(src.document_manager), - cookie(src.cookie) {} - base::win::ScopedComPtr<ITfDocumentMgr> document_manager; - scoped_refptr<TSFTextStore> text_store; - DWORD cookie; - }; - - // Returns a pointer to TSFDocument that is associated with the current - // TextInputType of |client_|. - TSFDocument* GetAssociatedDocument(); - - // An ITfThreadMgr object to be used in focus and document management. - base::win::ScopedComPtr<ITfThreadMgr> thread_manager_; - - // A map from TextInputType to an editable document for TSF. We use multiple - // TSF documents that have different InputScopes and TSF attributes based on - // the TextInputType associated with the target document. For a TextInputType - // that is not coverted by this map, a default document, e.g. the document - // for TEXT_INPUT_TYPE_TEXT, should be used. - // Note that some IMEs don't change their state unless the document focus is - // changed. This is why we use multiple documents instead of changing TSF - // metadata of a single document on the fly. - typedef std::map<TextInputType, TSFDocument> TSFDocumentMap; - TSFDocumentMap tsf_document_map_; - - // An identifier of TSF client. - TfClientId client_id_; - - // Current focused text input client. Do not free |client_|. - TextInputClient* client_; - - // Represents the window that is currently owns text input focus. - HWND attached_window_handle_; - - DISALLOW_COPY_AND_ASSIGN(TSFBridgeDelegate); -}; - -TSFBridgeDelegate::TSFBridgeDelegate() - : client_id_(TF_CLIENTID_NULL), - client_(NULL), - attached_window_handle_(NULL) { -} - -TSFBridgeDelegate::~TSFBridgeDelegate() { - DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); - if (!IsInitialized()) - return; - for (TSFDocumentMap::iterator it = tsf_document_map_.begin(); - it != tsf_document_map_.end(); ++it) { - base::win::ScopedComPtr<ITfContext> context; - base::win::ScopedComPtr<ITfSource> source; - if (it->second.cookie != TF_INVALID_COOKIE && - SUCCEEDED(it->second.document_manager->GetBase(context.Receive())) && - SUCCEEDED(source.QueryFrom(context))) { - source->UnadviseSink(it->second.cookie); - } - } - tsf_document_map_.clear(); - - client_id_ = TF_CLIENTID_NULL; -} - -bool TSFBridgeDelegate::Initialize() { - DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); - if (client_id_ != TF_CLIENTID_NULL) { - DVLOG(1) << "Already initialized."; - return false; - } - - if (FAILED(thread_manager_.CreateInstance(CLSID_TF_ThreadMgr))) { - DVLOG(1) << "Failed to create ThreadManager instance."; - return false; - } - - if (FAILED(thread_manager_->Activate(&client_id_))) { - DVLOG(1) << "Failed to activate Thread Manager."; - return false; - } - - if (!InitializeDocumentMapInternal()) - return false; - - // Japanese IME expects the default value of this compartment is - // TF_SENTENCEMODE_PHRASEPREDICT like IMM32 implementation. This value is - // managed per thread, so that it is enough to set this value at once. This - // value does not affect other language's IME behaviors. - base::win::ScopedComPtr<ITfCompartmentMgr> thread_compartment_manager; - if (FAILED(thread_compartment_manager.QueryFrom(thread_manager_))) { - DVLOG(1) << "Failed to get ITfCompartmentMgr."; - return false; - } - - base::win::ScopedComPtr<ITfCompartment> sentence_compartment; - if (FAILED(thread_compartment_manager->GetCompartment( - GUID_COMPARTMENT_KEYBOARD_INPUTMODE_SENTENCE, - sentence_compartment.Receive()))) { - DVLOG(1) << "Failed to get sentence compartment."; - return false; - } - - base::win::ScopedVariant sentence_variant; - sentence_variant.Set(TF_SENTENCEMODE_PHRASEPREDICT); - if (FAILED(sentence_compartment->SetValue(client_id_, &sentence_variant))) { - DVLOG(1) << "Failed to change the sentence mode."; - return false; - } - - return true; -} - -void TSFBridgeDelegate::OnTextInputTypeChanged(const TextInputClient* client) { - DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); - DCHECK(IsInitialized()); - - if (client != client_) { - // Called from not focusing client. Do nothing. - return; - } - - UpdateAssociateFocus(); - - TSFDocument* document = GetAssociatedDocument(); - if (!document) - return; - thread_manager_->SetFocus(document->document_manager.get()); - OnTextLayoutChanged(); -} - -void TSFBridgeDelegate::OnTextLayoutChanged() { - TSFDocument* document = GetAssociatedDocument(); - if (!document) - return; - if (!document->text_store) - return; - document->text_store->SendOnLayoutChange(); -} - -bool TSFBridgeDelegate::CancelComposition() { - DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); - DCHECK(IsInitialized()); - - TSFDocument* document = GetAssociatedDocument(); - if (!document) - return false; - if (!document->text_store) - return false; - - return document->text_store->CancelComposition(); -} - -bool TSFBridgeDelegate::ConfirmComposition() { - DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); - DCHECK(IsInitialized()); - - TSFDocument* document = GetAssociatedDocument(); - if (!document) - return false; - if (!document->text_store) - return false; - - return document->text_store->ConfirmComposition(); -} - -void TSFBridgeDelegate::SetFocusedClient(HWND focused_window, - TextInputClient* client) { - DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); - DCHECK(client); - DCHECK(IsInitialized()); - if (attached_window_handle_ != focused_window) - ClearAssociateFocus(); - client_ = client; - attached_window_handle_ = focused_window; - - for (TSFDocumentMap::iterator it = tsf_document_map_.begin(); - it != tsf_document_map_.end(); ++it) { - if (it->second.text_store.get() == NULL) - continue; - it->second.text_store->SetFocusedTextInputClient(focused_window, - client); - } - - // Synchronize text input type state. - OnTextInputTypeChanged(client); -} - -void TSFBridgeDelegate::RemoveFocusedClient(TextInputClient* client) { - DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); - DCHECK(IsInitialized()); - if (client_ != client) - return; - ClearAssociateFocus(); - client_ = NULL; - attached_window_handle_ = NULL; - for (TSFDocumentMap::iterator it = tsf_document_map_.begin(); - it != tsf_document_map_.end(); ++it) { - if (it->second.text_store.get() == NULL) - continue; - it->second.text_store->SetFocusedTextInputClient(NULL, NULL); - } -} - -TextInputClient* TSFBridgeDelegate::GetFocusedTextInputClient() const { - return client_; -} - -base::win::ScopedComPtr<ITfThreadMgr> TSFBridgeDelegate::GetThreadManager() { - DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); - DCHECK(IsInitialized()); - return thread_manager_; -} - -bool TSFBridgeDelegate::CreateDocumentManager(TSFTextStore* text_store, - ITfDocumentMgr** document_manager, - ITfContext** context, - DWORD* source_cookie) { - if (FAILED(thread_manager_->CreateDocumentMgr(document_manager))) { - DVLOG(1) << "Failed to create Document Manager."; - return false; - } - - DWORD edit_cookie = TF_INVALID_EDIT_COOKIE; - if (FAILED((*document_manager)->CreateContext( - client_id_, - 0, - static_cast<ITextStoreACP*>(text_store), - context, - &edit_cookie))) { - DVLOG(1) << "Failed to create Context."; - return false; - } - - if (FAILED((*document_manager)->Push(*context))) { - DVLOG(1) << "Failed to push context."; - return false; - } - - if (!text_store || !source_cookie) - return true; - - base::win::ScopedComPtr<ITfSource> source; - if (FAILED(source.QueryFrom(*context))) { - DVLOG(1) << "Failed to get source."; - return false; - } - - if (FAILED(source->AdviseSink(IID_ITfTextEditSink, - static_cast<ITfTextEditSink*>(text_store), - source_cookie))) { - DVLOG(1) << "AdviseSink failed."; - return false; - } - - if (*source_cookie == TF_INVALID_COOKIE) { - DVLOG(1) << "The result of cookie is invalid."; - return false; - } - return true; -} - -bool TSFBridgeDelegate::InitializeDocumentMapInternal() { - const TextInputType kTextInputTypes[] = { - TEXT_INPUT_TYPE_NONE, - TEXT_INPUT_TYPE_TEXT, - TEXT_INPUT_TYPE_PASSWORD, - TEXT_INPUT_TYPE_SEARCH, - TEXT_INPUT_TYPE_EMAIL, - TEXT_INPUT_TYPE_NUMBER, - TEXT_INPUT_TYPE_TELEPHONE, - TEXT_INPUT_TYPE_URL, - }; - for (size_t i = 0; i < arraysize(kTextInputTypes); ++i) { - const TextInputType input_type = kTextInputTypes[i]; - base::win::ScopedComPtr<ITfContext> context; - base::win::ScopedComPtr<ITfDocumentMgr> document_manager; - DWORD cookie = TF_INVALID_COOKIE; - const bool use_null_text_store = (input_type == TEXT_INPUT_TYPE_NONE); - DWORD* cookie_ptr = use_null_text_store ? NULL : &cookie; - scoped_refptr<TSFTextStore> text_store = - use_null_text_store ? NULL : new TSFTextStore(); - if (!CreateDocumentManager(text_store, - document_manager.Receive(), - context.Receive(), - cookie_ptr)) - return false; - const bool use_disabled_context = - (input_type == TEXT_INPUT_TYPE_PASSWORD || - input_type == TEXT_INPUT_TYPE_NONE); - if (use_disabled_context && !InitializeDisabledContext(context)) - return false; - tsf_document_map_[input_type].text_store = text_store; - tsf_document_map_[input_type].document_manager = document_manager; - tsf_document_map_[input_type].cookie = cookie; - } - return true; -} - -bool TSFBridgeDelegate::InitializeDisabledContext(ITfContext* context) { - base::win::ScopedComPtr<ITfCompartmentMgr> compartment_mgr; - if (FAILED(compartment_mgr.QueryFrom(context))) { - DVLOG(1) << "Failed to get CompartmentMgr."; - return false; - } - - base::win::ScopedComPtr<ITfCompartment> disabled_compartment; - if (FAILED(compartment_mgr->GetCompartment( - GUID_COMPARTMENT_KEYBOARD_DISABLED, - disabled_compartment.Receive()))) { - DVLOG(1) << "Failed to get keyboard disabled compartment."; - return false; - } - - base::win::ScopedVariant variant; - variant.Set(1); - if (FAILED(disabled_compartment->SetValue(client_id_, &variant))) { - DVLOG(1) << "Failed to disable the DocumentMgr."; - return false; - } - - base::win::ScopedComPtr<ITfCompartment> empty_context; - if (FAILED(compartment_mgr->GetCompartment(GUID_COMPARTMENT_EMPTYCONTEXT, - empty_context.Receive()))) { - DVLOG(1) << "Failed to get empty context compartment."; - return false; - } - base::win::ScopedVariant empty_context_variant; - empty_context_variant.Set(static_cast<int32>(1)); - if (FAILED(empty_context->SetValue(client_id_, &empty_context_variant))) { - DVLOG(1) << "Failed to set empty context."; - return false; - } - - return true; -} - -bool TSFBridgeDelegate::IsFocused(ITfDocumentMgr* document_manager) { - base::win::ScopedComPtr<ITfDocumentMgr> focused_document_manager; - if (FAILED(thread_manager_->GetFocus(focused_document_manager.Receive()))) - return false; - return focused_document_manager.IsSameObject(document_manager); -} - -bool TSFBridgeDelegate::IsInitialized() { - return client_id_ != TF_CLIENTID_NULL; -} - -void TSFBridgeDelegate::UpdateAssociateFocus() { - if (attached_window_handle_ == NULL) - return; - TSFDocument* document = GetAssociatedDocument(); - if (document == NULL) { - ClearAssociateFocus(); - return; - } - // NOTE: ITfThreadMgr::AssociateFocus does not increment the ref count of - // the document manager to be attached. It is our responsibility to make sure - // the attached document manager will not be destroyed while it is attached. - // This should be true as long as TSFBridge::Shutdown() is called late phase - // of UI thread shutdown. - base::win::ScopedComPtr<ITfDocumentMgr> previous_focus; - thread_manager_->AssociateFocus( - attached_window_handle_, document->document_manager.get(), - previous_focus.Receive()); -} - -void TSFBridgeDelegate::ClearAssociateFocus() { - if (attached_window_handle_ == NULL) - return; - base::win::ScopedComPtr<ITfDocumentMgr> previous_focus; - thread_manager_->AssociateFocus( - attached_window_handle_, NULL, previous_focus.Receive()); -} - -TSFBridgeDelegate::TSFDocument* TSFBridgeDelegate::GetAssociatedDocument() { - if (!client_) - return NULL; - TSFDocumentMap::iterator it = - tsf_document_map_.find(client_->GetTextInputType()); - if (it == tsf_document_map_.end()) { - it = tsf_document_map_.find(TEXT_INPUT_TYPE_TEXT); - // This check is necessary because it's possible that we failed to - // initialize |tsf_document_map_| and it has no TEXT_INPUT_TYPE_TEXT. - if (it == tsf_document_map_.end()) - return NULL; - } - return &it->second; -} - -} // namespace - - -// TsfBridge ----------------------------------------------------------------- - -TSFBridge::TSFBridge() { -} - -TSFBridge::~TSFBridge() { -} - -// static -bool TSFBridge::Initialize() { - if (base::MessageLoop::current()->type() != base::MessageLoop::TYPE_UI) { - DVLOG(1) << "Do not use TSFBridge without UI thread."; - return false; - } - if (!tls_tsf_bridge.initialized()) { - tls_tsf_bridge.Initialize(TSFBridge::Finalize); - } - TSFBridgeDelegate* delegate = - static_cast<TSFBridgeDelegate*>(tls_tsf_bridge.Get()); - if (delegate) - return true; - delegate = new TSFBridgeDelegate(); - tls_tsf_bridge.Set(delegate); - return delegate->Initialize(); -} - -// static -TSFBridge* TSFBridge::ReplaceForTesting(TSFBridge* bridge) { - if (base::MessageLoop::current()->type() != base::MessageLoop::TYPE_UI) { - DVLOG(1) << "Do not use TSFBridge without UI thread."; - return NULL; - } - TSFBridge* old_bridge = TSFBridge::GetInstance(); - tls_tsf_bridge.Set(bridge); - return old_bridge; -} - -// static -void TSFBridge::Shutdown() { - if (base::MessageLoop::current()->type() != base::MessageLoop::TYPE_UI) { - DVLOG(1) << "Do not use TSFBridge without UI thread."; - } - if (tls_tsf_bridge.initialized()) { - TSFBridgeDelegate* delegate = - static_cast<TSFBridgeDelegate*>(tls_tsf_bridge.Get()); - tls_tsf_bridge.Set(NULL); - delete delegate; - } -} - -// static -TSFBridge* TSFBridge::GetInstance() { - if (base::MessageLoop::current()->type() != base::MessageLoop::TYPE_UI) { - DVLOG(1) << "Do not use TSFBridge without UI thread."; - return NULL; - } - TSFBridgeDelegate* delegate = - static_cast<TSFBridgeDelegate*>(tls_tsf_bridge.Get()); - DCHECK(delegate) << "Do no call GetInstance before TSFBridge::Initialize."; - return delegate; -} - -// static -void TSFBridge::Finalize(void* data) { - TSFBridgeDelegate* delegate = static_cast<TSFBridgeDelegate*>(data); - delete delegate; -} - -} // namespace ui diff --git a/chromium/ui/base/ime/win/tsf_bridge.h b/chromium/ui/base/ime/win/tsf_bridge.h deleted file mode 100644 index 6256fac166a..00000000000 --- a/chromium/ui/base/ime/win/tsf_bridge.h +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_IME_WIN_TSF_BRIDGE_H_ -#define UI_BASE_IME_WIN_TSF_BRIDGE_H_ - -#include <Windows.h> -#include <msctf.h> - -#include "base/basictypes.h" -#include "base/win/scoped_comptr.h" -#include "ui/base/ui_export.h" - -namespace ui { -class TextInputClient; - -// TSFBridge provides high level IME related operations on top of Text Services -// Framework (TSF). TSFBridge is managed by TLS because TSF related stuff is -// associated with each thread and not allowed to access across thread boundary. -// To be consistent with IMM32 behavior, TSFBridge is shared in the same thread. -// TSFBridge is used by the web content text inputting field, for example -// DisableIME() should be called if a password field is focused. -// -// TSFBridge also manages connectivity between TSFTextStore which is the backend -// of text inputting and current focused TextInputClient. -// -// All methods in this class must be used in UI thread. -class UI_EXPORT TSFBridge { - public: - virtual ~TSFBridge(); - - // Returns the thread local TSFBridge instance. Initialize() must be called - // first. Do not cache this pointer and use it after TSFBridge Shutdown(). - static TSFBridge* GetInstance(); - - // Sets the thread local instance. Must be called before any calls to - // GetInstance(). - static bool Initialize(); - - // Injects an alternative TSFBridge such as MockTSFBridge for testing. The - // injected object should be released by the caller. This function returns - // previous TSFBridge pointer with ownership. - static TSFBridge* ReplaceForTesting(TSFBridge* bridge); - - // Destroys the thread local instance. - static void Shutdown(); - - // Handles TextInputTypeChanged event. RWHVW is responsible for calling this - // handler whenever renderer's input text type is changed. Does nothing - // unless |client| is focused. - virtual void OnTextInputTypeChanged(const TextInputClient* client) = 0; - - // Sends an event to TSF manager that the text layout should be updated. - virtual void OnTextLayoutChanged() = 0; - - // Cancels the ongoing composition if exists. - // Returns true if there is no composition. - // Returns false if an edit session is on-going. - // Returns false if an error occures. - virtual bool CancelComposition() = 0; - - // Confirms the ongoing composition if exists. - // Returns true if there is no composition. - // Returns false if an edit session is on-going. - // Returns false if an error occures. - virtual bool ConfirmComposition() = 0; - - // Sets currently focused TextInputClient. - // Caller must free |client|. - virtual void SetFocusedClient(HWND focused_window, - TextInputClient* client) = 0; - - // Removes currently focused TextInputClient. - // Caller must free |client|. - virtual void RemoveFocusedClient(TextInputClient* client) = 0; - - // Obtains current thread manager. - virtual base::win::ScopedComPtr<ITfThreadMgr> GetThreadManager() = 0; - - // Returns the focused text input client. - virtual TextInputClient* GetFocusedTextInputClient() const = 0; - - protected: - // Uses GetInstance() instead. - TSFBridge(); - - private: - // Releases TLS instance. - static void Finalize(void* data); - - DISALLOW_COPY_AND_ASSIGN(TSFBridge); -}; - -} // namespace ui - -#endif // UI_BASE_IME_WIN_TSF_BRIDGE_H_ diff --git a/chromium/ui/base/ime/win/tsf_event_router.cc b/chromium/ui/base/ime/win/tsf_event_router.cc deleted file mode 100644 index 4f34a048eec..00000000000 --- a/chromium/ui/base/ime/win/tsf_event_router.cc +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/ime/win/tsf_event_router.h" - -#include <msctf.h> -#include <set> -#include <utility> - -#include "base/bind.h" -#include "base/win/scoped_comptr.h" -#include "base/win/metro.h" -#include "ui/base/win/atl_module.h" -#include "ui/gfx/range/range.h" - -namespace ui { - - -// TSFEventRouter::Delegate ------------------------------------ - -// The implementation class of ITfUIElementSink, whose member functions will be -// called back by TSF when the UI element status is changed, for example when -// the candidate window is opened or closed. This class also implements -// ITfTextEditSink, whose member function is called back by TSF when the text -// editting session is finished. -class ATL_NO_VTABLE TSFEventRouter::Delegate - : public ATL::CComObjectRootEx<CComSingleThreadModel>, - public ITfUIElementSink, - public ITfTextEditSink { - public: - BEGIN_COM_MAP(Delegate) - COM_INTERFACE_ENTRY(ITfUIElementSink) - COM_INTERFACE_ENTRY(ITfTextEditSink) - END_COM_MAP() - - Delegate(); - ~Delegate(); - - // ITfTextEditSink: - STDMETHOD(OnEndEdit)(ITfContext* context, TfEditCookie read_only_cookie, - ITfEditRecord* edit_record) OVERRIDE; - - // ITfUiElementSink: - STDMETHOD(BeginUIElement)(DWORD element_id, BOOL* is_show) OVERRIDE; - STDMETHOD(UpdateUIElement)(DWORD element_id) OVERRIDE; - STDMETHOD(EndUIElement)(DWORD element_id) OVERRIDE; - - // Sets |thread_manager| to be monitored. |thread_manager| can be NULL. - void SetManager(ITfThreadMgr* thread_manager); - - // Returns true if the IME is composing text. - bool IsImeComposing(); - - // Sets |router| to be forwarded TSF-related events. - void SetRouter(TSFEventRouter* router); - - private: - // Returns current composition range. Returns gfx::Range::InvalidRange if - // there is no composition. - static gfx::Range GetCompositionRange(ITfContext* context); - - // Returns true if the given |element_id| represents the candidate window. - bool IsCandidateWindowInternal(DWORD element_id); - - // A context associated with this class. - base::win::ScopedComPtr<ITfContext> context_; - - // The ITfSource associated with |context_|. - base::win::ScopedComPtr<ITfSource> context_source_; - - // The cookie for |context_source_|. - DWORD context_source_cookie_; - - // A UIElementMgr associated with this class. - base::win::ScopedComPtr<ITfUIElementMgr> ui_element_manager_; - - // The ITfSouce associated with |ui_element_manager_|. - base::win::ScopedComPtr<ITfSource> ui_source_; - - // The set of currently opened candidate window ids. - std::set<DWORD> open_candidate_window_ids_; - - // The cookie for |ui_source_|. - DWORD ui_source_cookie_; - - TSFEventRouter* router_; - gfx::Range previous_composition_range_; - - DISALLOW_COPY_AND_ASSIGN(Delegate); -}; - -TSFEventRouter::Delegate::Delegate() - : context_source_cookie_(TF_INVALID_COOKIE), - ui_source_cookie_(TF_INVALID_COOKIE), - router_(NULL), - previous_composition_range_(gfx::Range::InvalidRange()) { -} - -TSFEventRouter::Delegate::~Delegate() {} - -void TSFEventRouter::Delegate::SetRouter(TSFEventRouter* router) { - router_ = router; -} - -STDMETHODIMP TSFEventRouter::Delegate::OnEndEdit(ITfContext* context, - TfEditCookie read_only_cookie, - ITfEditRecord* edit_record) { - if (!edit_record || !context) - return E_INVALIDARG; - if (!router_) - return S_OK; - - // |edit_record| can be used to obtain updated ranges in terms of text - // contents and/or text attributes. Here we are interested only in text update - // so we use TF_GTP_INCL_TEXT and check if there is any range which contains - // updated text. - base::win::ScopedComPtr<IEnumTfRanges> ranges; - if (FAILED(edit_record->GetTextAndPropertyUpdates(TF_GTP_INCL_TEXT, NULL, 0, - ranges.Receive()))) - return S_OK; // Don't care about failures. - - ULONG fetched_count = 0; - base::win::ScopedComPtr<ITfRange> range; - if (FAILED(ranges->Next(1, range.Receive(), &fetched_count))) - return S_OK; // Don't care about failures. - - const gfx::Range composition_range = GetCompositionRange(context); - - if (!previous_composition_range_.IsValid() && composition_range.IsValid()) - router_->OnTSFStartComposition(); - - // |fetched_count| != 0 means there is at least one range that contains - // updated text. - if (fetched_count != 0) - router_->OnTextUpdated(composition_range); - - if (previous_composition_range_.IsValid() && !composition_range.IsValid()) - router_->OnTSFEndComposition(); - - previous_composition_range_ = composition_range; - return S_OK; -} - -STDMETHODIMP TSFEventRouter::Delegate::BeginUIElement(DWORD element_id, - BOOL* is_show) { - if (is_show) - *is_show = TRUE; // Without this the UI element will not be shown. - - if (!IsCandidateWindowInternal(element_id)) - return S_OK; - - std::pair<std::set<DWORD>::iterator, bool> insert_result = - open_candidate_window_ids_.insert(element_id); - // Don't call if |router_| is null or |element_id| is already handled. - if (router_ && insert_result.second) - router_->OnCandidateWindowCountChanged(open_candidate_window_ids_.size()); - - return S_OK; -} - -STDMETHODIMP TSFEventRouter::Delegate::UpdateUIElement( - DWORD element_id) { - return S_OK; -} - -STDMETHODIMP TSFEventRouter::Delegate::EndUIElement( - DWORD element_id) { - if ((open_candidate_window_ids_.erase(element_id) != 0) && router_) - router_->OnCandidateWindowCountChanged(open_candidate_window_ids_.size()); - return S_OK; -} - -void TSFEventRouter::Delegate::SetManager( - ITfThreadMgr* thread_manager) { - context_.Release(); - - if (context_source_) { - context_source_->UnadviseSink(context_source_cookie_); - context_source_.Release(); - } - context_source_cookie_ = TF_INVALID_COOKIE; - - ui_element_manager_.Release(); - if (ui_source_) { - ui_source_->UnadviseSink(ui_source_cookie_); - ui_source_.Release(); - } - ui_source_cookie_ = TF_INVALID_COOKIE; - - if (!thread_manager) - return; - - base::win::ScopedComPtr<ITfDocumentMgr> document_manager; - if (FAILED(thread_manager->GetFocus(document_manager.Receive())) || - !document_manager.get() || - FAILED(document_manager->GetBase(context_.Receive())) || - FAILED(context_source_.QueryFrom(context_))) - return; - context_source_->AdviseSink(IID_ITfTextEditSink, - static_cast<ITfTextEditSink*>(this), - &context_source_cookie_); - - if (FAILED(ui_element_manager_.QueryFrom(thread_manager)) || - FAILED(ui_source_.QueryFrom(ui_element_manager_))) - return; - ui_source_->AdviseSink(IID_ITfUIElementSink, - static_cast<ITfUIElementSink*>(this), - &ui_source_cookie_); -} - -bool TSFEventRouter::Delegate::IsImeComposing() { - return context_ && GetCompositionRange(context_).IsValid(); -} - -// static -gfx::Range TSFEventRouter::Delegate::GetCompositionRange( - ITfContext* context) { - DCHECK(context); - base::win::ScopedComPtr<ITfContextComposition> context_composition; - if (FAILED(context_composition.QueryFrom(context))) - return gfx::Range::InvalidRange(); - base::win::ScopedComPtr<IEnumITfCompositionView> enum_composition_view; - if (FAILED(context_composition->EnumCompositions( - enum_composition_view.Receive()))) - return gfx::Range::InvalidRange(); - base::win::ScopedComPtr<ITfCompositionView> composition_view; - if (enum_composition_view->Next(1, composition_view.Receive(), - NULL) != S_OK) - return gfx::Range::InvalidRange(); - - base::win::ScopedComPtr<ITfRange> range; - if (FAILED(composition_view->GetRange(range.Receive()))) - return gfx::Range::InvalidRange(); - - base::win::ScopedComPtr<ITfRangeACP> range_acp; - if (FAILED(range_acp.QueryFrom(range))) - return gfx::Range::InvalidRange(); - - LONG start = 0; - LONG length = 0; - if (FAILED(range_acp->GetExtent(&start, &length))) - return gfx::Range::InvalidRange(); - - return gfx::Range(start, start + length); -} - -bool TSFEventRouter::Delegate::IsCandidateWindowInternal(DWORD element_id) { - DCHECK(ui_element_manager_.get()); - base::win::ScopedComPtr<ITfUIElement> ui_element; - if (FAILED(ui_element_manager_->GetUIElement(element_id, - ui_element.Receive()))) - return false; - base::win::ScopedComPtr<ITfCandidateListUIElement> candidate_list_ui_element; - return SUCCEEDED(candidate_list_ui_element.QueryFrom(ui_element)); -} - - -// TSFEventRouter ------------------------------------------------------------ - -TSFEventRouter::TSFEventRouter(TSFEventRouterObserver* observer) - : observer_(observer), - delegate_(NULL) { - DCHECK(base::win::IsTSFAwareRequired()) - << "Do not use TSFEventRouter without TSF environment."; - DCHECK(observer_); - CComObject<Delegate>* delegate; - ui::win::CreateATLModuleIfNeeded(); - if (SUCCEEDED(CComObject<Delegate>::CreateInstance(&delegate))) { - delegate->AddRef(); - delegate_.Attach(delegate); - delegate_->SetRouter(this); - } -} - -TSFEventRouter::~TSFEventRouter() { - if (delegate_) { - delegate_->SetManager(NULL); - delegate_->SetRouter(NULL); - } -} - -bool TSFEventRouter::IsImeComposing() { - return delegate_->IsImeComposing(); -} - -void TSFEventRouter::OnCandidateWindowCountChanged(size_t window_count) { - observer_->OnCandidateWindowCountChanged(window_count); -} - -void TSFEventRouter::OnTSFStartComposition() { - observer_->OnTSFStartComposition(); -} - -void TSFEventRouter::OnTextUpdated(const gfx::Range& composition_range) { - observer_->OnTextUpdated(composition_range); -} - -void TSFEventRouter::OnTSFEndComposition() { - observer_->OnTSFEndComposition(); -} - -void TSFEventRouter::SetManager(ITfThreadMgr* thread_manager) { - delegate_->SetManager(thread_manager); -} - -} // namespace ui diff --git a/chromium/ui/base/ime/win/tsf_event_router.h b/chromium/ui/base/ime/win/tsf_event_router.h deleted file mode 100644 index 04a2a1e9eb0..00000000000 --- a/chromium/ui/base/ime/win/tsf_event_router.h +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_IME_WIN_TSF_EVENT_ROUTER_H_ -#define UI_BASE_IME_WIN_TSF_EVENT_ROUTER_H_ - -#include <atlbase.h> -#include <atlcom.h> -#include <msctf.h> - -#include <set> - -#include "base/basictypes.h" -#include "base/callback.h" -#include "base/compiler_specific.h" -#include "ui/base/ime/text_input_type.h" -#include "ui/base/ui_export.h" -#include "ui/gfx/range/range.h" - -struct ITfDocumentMgr; - -namespace ui { - -class TSFEventRouterObserver { - public: - TSFEventRouterObserver() {} - - // Called when the number of currently opened candidate windows changes. - virtual void OnCandidateWindowCountChanged(size_t window_count) {} - - // Called when a composition is started. - virtual void OnTSFStartComposition() {} - - // Called when the text contents are updated. If there is no composition, - // gfx::Range::InvalidRange is passed to |composition_range|. - virtual void OnTextUpdated(const gfx::Range& composition_range) {} - - // Called when a composition is terminated. - virtual void OnTSFEndComposition() {} - - protected: - virtual ~TSFEventRouterObserver() {} - - private: - DISALLOW_COPY_AND_ASSIGN(TSFEventRouterObserver); -}; - -// This class monitores TSF related events and forwards them to given -// |observer|. -class UI_EXPORT TSFEventRouter { - public: - // Do not pass NULL to |observer|. - explicit TSFEventRouter(TSFEventRouterObserver* observer); - virtual ~TSFEventRouter(); - - // Returns true if the IME is composing text. - bool IsImeComposing(); - - // Callbacks from the TSFEventRouterDelegate: - void OnCandidateWindowCountChanged(size_t window_count); - void OnTSFStartComposition(); - void OnTextUpdated(const gfx::Range& composition_range); - void OnTSFEndComposition(); - - // Sets |thread_manager| to be monitored. |thread_manager| can be NULL. - void SetManager(ITfThreadMgr* thread_manager); - - private: - class Delegate; - - CComPtr<Delegate> delegate_; - - TSFEventRouterObserver* observer_; - - DISALLOW_COPY_AND_ASSIGN(TSFEventRouter); -}; - -} // namespace ui - -#endif // UI_BASE_IME_WIN_TSF_EVENT_ROUTER_H_ diff --git a/chromium/ui/base/ime/win/tsf_input_scope.cc b/chromium/ui/base/ime/win/tsf_input_scope.cc index 06481e9d8f0..f40f928a5f7 100644 --- a/chromium/ui/base/ime/win/tsf_input_scope.cc +++ b/chromium/ui/base/ime/win/tsf_input_scope.cc @@ -29,7 +29,7 @@ void AppendNonTrivialInputScope(std::vector<InputScope>* input_scopes, input_scopes->push_back(input_scope); } -class TSFInputScope : public ITfInputScope { +class TSFInputScope FINAL : public ITfInputScope { public: explicit TSFInputScope(const std::vector<InputScope>& input_scopes) : input_scopes_(input_scopes), @@ -116,7 +116,7 @@ SetInputScopesFunc g_set_input_scopes = NULL; bool g_get_proc_done = false; SetInputScopesFunc GetSetInputScopes() { - DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); + DCHECK(base::MessageLoopForUI::IsCurrent()); // Thread safety is not required because this function is under UI thread. if (!g_get_proc_done) { g_get_proc_done = true; diff --git a/chromium/ui/base/ime/win/tsf_input_scope.h b/chromium/ui/base/ime/win/tsf_input_scope.h index 2e5856c60d8..536d395dce1 100644 --- a/chromium/ui/base/ime/win/tsf_input_scope.h +++ b/chromium/ui/base/ime/win/tsf_input_scope.h @@ -12,7 +12,7 @@ #include "base/basictypes.h" #include "ui/base/ime/text_input_mode.h" #include "ui/base/ime/text_input_type.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { namespace tsf_inputscope { @@ -20,8 +20,9 @@ namespace tsf_inputscope { // Returns InputScope list corresoponding to ui::TextInputType and // ui::TextInputMode. // This function is only used from following functions but declared for test. -UI_EXPORT std::vector<InputScope> GetInputScopes(TextInputType text_input_type, - TextInputMode text_input_mode); +UI_BASE_EXPORT std::vector<InputScope> GetInputScopes( + TextInputType text_input_type, + TextInputMode text_input_mode); // Returns an instance of ITfInputScope, which is the Windows-specific // category representation corresponding to ui::TextInputType and @@ -29,14 +30,14 @@ UI_EXPORT std::vector<InputScope> GetInputScopes(TextInputType text_input_type, // in the target field. // The returned instance has 0 reference count. The caller must maintain its // reference count. -UI_EXPORT ITfInputScope* CreateInputScope(TextInputType text_input_type, - TextInputMode text_input_mode); +UI_BASE_EXPORT ITfInputScope* CreateInputScope(TextInputType text_input_type, + TextInputMode text_input_mode); // A wrapper of the SetInputScopes API exported by msctf.dll. // http://msdn.microsoft.com/en-us/library/windows/desktop/ms629026.aspx // Does nothing on Windows XP in case TSF is disabled. // NOTE: For TSF-aware window, you should use ITfInputScope instead. -UI_EXPORT void SetInputScopeForTsfUnawareWindow( +UI_BASE_EXPORT void SetInputScopeForTsfUnawareWindow( HWND window_handle, TextInputType text_input_type, TextInputMode text_input_mode); diff --git a/chromium/ui/base/ime/win/tsf_text_store.cc b/chromium/ui/base/ime/win/tsf_text_store.cc deleted file mode 100644 index 0ef34b5be89..00000000000 --- a/chromium/ui/base/ime/win/tsf_text_store.cc +++ /dev/null @@ -1,923 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#define INITGUID // required for GUID_PROP_INPUTSCOPE -#include "ui/base/ime/win/tsf_text_store.h" - -#include <InputScope.h> -#include <OleCtl.h> - -#include <algorithm> - -#include "base/win/scoped_variant.h" -#include "ui/base/ime/text_input_client.h" -#include "ui/base/ime/win/tsf_input_scope.h" -#include "ui/gfx/rect.h" - -namespace ui { -namespace { - -// We support only one view. -const TsViewCookie kViewCookie = 1; - -} // namespace - -TSFTextStore::TSFTextStore() - : ref_count_(0), - text_store_acp_sink_mask_(0), - window_handle_(NULL), - text_input_client_(NULL), - committed_size_(0), - edit_flag_(false), - current_lock_type_(0) { - if (FAILED(category_manager_.CreateInstance(CLSID_TF_CategoryMgr))) { - LOG(FATAL) << "Failed to initialize CategoryMgr."; - return; - } - if (FAILED(display_attribute_manager_.CreateInstance( - CLSID_TF_DisplayAttributeMgr))) { - LOG(FATAL) << "Failed to initialize DisplayAttributeMgr."; - return; - } -} - -TSFTextStore::~TSFTextStore() { -} - -ULONG STDMETHODCALLTYPE TSFTextStore::AddRef() { - return InterlockedIncrement(&ref_count_); -} - -ULONG STDMETHODCALLTYPE TSFTextStore::Release() { - const LONG count = InterlockedDecrement(&ref_count_); - if (!count) { - delete this; - return 0; - } - return static_cast<ULONG>(count); -} - -STDMETHODIMP TSFTextStore::QueryInterface(REFIID iid, void** result) { - if (iid == IID_IUnknown || iid == IID_ITextStoreACP) { - *result = static_cast<ITextStoreACP*>(this); - } else if (iid == IID_ITfContextOwnerCompositionSink) { - *result = static_cast<ITfContextOwnerCompositionSink*>(this); - } else if (iid == IID_ITfTextEditSink) { - *result = static_cast<ITfTextEditSink*>(this); - } else { - *result = NULL; - return E_NOINTERFACE; - } - AddRef(); - return S_OK; -} - -STDMETHODIMP TSFTextStore::AdviseSink(REFIID iid, - IUnknown* unknown, - DWORD mask) { - if (!IsEqualGUID(iid, IID_ITextStoreACPSink)) - return E_INVALIDARG; - if (text_store_acp_sink_) { - if (text_store_acp_sink_.IsSameObject(unknown)) { - text_store_acp_sink_mask_ = mask; - return S_OK; - } else { - return CONNECT_E_ADVISELIMIT; - } - } - if (FAILED(text_store_acp_sink_.QueryFrom(unknown))) - return E_UNEXPECTED; - text_store_acp_sink_mask_ = mask; - - return S_OK; -} - -STDMETHODIMP TSFTextStore::FindNextAttrTransition( - LONG acp_start, - LONG acp_halt, - ULONG num_filter_attributes, - const TS_ATTRID* filter_attributes, - DWORD flags, - LONG* acp_next, - BOOL* found, - LONG* found_offset) { - if (!acp_next || !found || !found_offset) - return E_INVALIDARG; - // We don't support any attributes. - // So we always return "not found". - *acp_next = 0; - *found = FALSE; - *found_offset = 0; - return S_OK; -} - -STDMETHODIMP TSFTextStore::GetACPFromPoint(TsViewCookie view_cookie, - const POINT* point, - DWORD flags, - LONG* acp) { - NOTIMPLEMENTED(); - if (view_cookie != kViewCookie) - return E_INVALIDARG; - return E_NOTIMPL; -} - -STDMETHODIMP TSFTextStore::GetActiveView(TsViewCookie* view_cookie) { - if (!view_cookie) - return E_INVALIDARG; - // We support only one view. - *view_cookie = kViewCookie; - return S_OK; -} - -STDMETHODIMP TSFTextStore::GetEmbedded(LONG acp_pos, - REFGUID service, - REFIID iid, - IUnknown** unknown) { - // We don't support any embedded objects. - NOTIMPLEMENTED(); - if (!unknown) - return E_INVALIDARG; - *unknown = NULL; - return E_NOTIMPL; -} - -STDMETHODIMP TSFTextStore::GetEndACP(LONG* acp) { - if (!acp) - return E_INVALIDARG; - if (!HasReadLock()) - return TS_E_NOLOCK; - *acp = string_buffer_.size(); - return S_OK; -} - -STDMETHODIMP TSFTextStore::GetFormattedText(LONG acp_start, LONG acp_end, - IDataObject** data_object) { - NOTIMPLEMENTED(); - return E_NOTIMPL; -} - -STDMETHODIMP TSFTextStore::GetScreenExt(TsViewCookie view_cookie, RECT* rect) { - if (view_cookie != kViewCookie) - return E_INVALIDARG; - if (!rect) - return E_INVALIDARG; - - // {0, 0, 0, 0} means that the document rect is not currently displayed. - SetRect(rect, 0, 0, 0, 0); - - if (!IsWindow(window_handle_)) - return E_FAIL; - - // Currently ui::TextInputClient does not expose the document rect. So use - // the Win32 client rectangle instead. - // TODO(yukawa): Upgrade TextInputClient so that the client can retrieve the - // document rectangle. - RECT client_rect = {}; - if (!GetClientRect(window_handle_, &client_rect)) - return E_FAIL; - POINT left_top = {client_rect.left, client_rect.top}; - POINT right_bottom = {client_rect.right, client_rect.bottom}; - if (!ClientToScreen(window_handle_, &left_top)) - return E_FAIL; - if (!ClientToScreen(window_handle_, &right_bottom)) - return E_FAIL; - - rect->left = left_top.x; - rect->top = left_top.y; - rect->right = right_bottom.x; - rect->bottom = right_bottom.y; - return S_OK; -} - -STDMETHODIMP TSFTextStore::GetSelection(ULONG selection_index, - ULONG selection_buffer_size, - TS_SELECTION_ACP* selection_buffer, - ULONG* fetched_count) { - if (!selection_buffer) - return E_INVALIDARG; - if (!fetched_count) - return E_INVALIDARG; - if (!HasReadLock()) - return TS_E_NOLOCK; - *fetched_count = 0; - if ((selection_buffer_size > 0) && - ((selection_index == 0) || (selection_index == TS_DEFAULT_SELECTION))) { - selection_buffer[0].acpStart = selection_.start(); - selection_buffer[0].acpEnd = selection_.end(); - selection_buffer[0].style.ase = TS_AE_END; - selection_buffer[0].style.fInterimChar = FALSE; - *fetched_count = 1; - } - return S_OK; -} - -STDMETHODIMP TSFTextStore::GetStatus(TS_STATUS* status) { - if (!status) - return E_INVALIDARG; - - status->dwDynamicFlags = 0; - // We use transitory contexts and we don't support hidden text. - status->dwStaticFlags = TS_SS_TRANSITORY | TS_SS_NOHIDDENTEXT; - - return S_OK; -} - -STDMETHODIMP TSFTextStore::GetText(LONG acp_start, - LONG acp_end, - wchar_t* text_buffer, - ULONG text_buffer_size, - ULONG* text_buffer_copied, - TS_RUNINFO* run_info_buffer, - ULONG run_info_buffer_size, - ULONG* run_info_buffer_copied, - LONG* next_acp) { - if (!text_buffer_copied || !run_info_buffer_copied) - return E_INVALIDARG; - if (!text_buffer && text_buffer_size != 0) - return E_INVALIDARG; - if (!run_info_buffer && run_info_buffer_size != 0) - return E_INVALIDARG; - if (!next_acp) - return E_INVALIDARG; - if (!HasReadLock()) - return TF_E_NOLOCK; - const LONG string_buffer_size = string_buffer_.size(); - if (acp_end == -1) - acp_end = string_buffer_size; - if (!((0 <= acp_start) && - (acp_start <= acp_end) && - (acp_end <= string_buffer_size))) { - return TF_E_INVALIDPOS; - } - acp_end = std::min(acp_end, acp_start + static_cast<LONG>(text_buffer_size)); - *text_buffer_copied = acp_end - acp_start; - - const string16& result = - string_buffer_.substr(acp_start, *text_buffer_copied); - for (size_t i = 0; i < result.size(); ++i) { - text_buffer[i] = result[i]; - } - - if (run_info_buffer_size) { - run_info_buffer[0].uCount = *text_buffer_copied; - run_info_buffer[0].type = TS_RT_PLAIN; - *run_info_buffer_copied = 1; - } - - *next_acp = acp_end; - return S_OK; -} - -STDMETHODIMP TSFTextStore::GetTextExt(TsViewCookie view_cookie, - LONG acp_start, - LONG acp_end, - RECT* rect, - BOOL* clipped) { - if (!rect || !clipped) - return E_INVALIDARG; - if (!text_input_client_) - return E_UNEXPECTED; - if (view_cookie != kViewCookie) - return E_INVALIDARG; - if (!HasReadLock()) - return TS_E_NOLOCK; - if (!((static_cast<LONG>(committed_size_) <= acp_start) && - (acp_start <= acp_end) && - (acp_end <= static_cast<LONG>(string_buffer_.size())))) { - return TS_E_INVALIDPOS; - } - - // According to a behavior of notepad.exe and wordpad.exe, top left corner of - // rect indicates a first character's one, and bottom right corner of rect - // indicates a last character's one. - // We use RECT instead of gfx::Rect since left position may be bigger than - // right position when composition has multiple lines. - RECT result; - gfx::Rect tmp_rect; - const uint32 start_pos = acp_start - committed_size_; - const uint32 end_pos = acp_end - committed_size_; - - if (start_pos == end_pos) { - // According to MSDN document, if |acp_start| and |acp_end| are equal it is - // OK to just return E_INVALIDARG. - // http://msdn.microsoft.com/en-us/library/ms538435 - // But when using Pinin IME of Windows 8, this method is called with the - // equal values of |acp_start| and |acp_end|. So we handle this condition. - if (start_pos == 0) { - if (text_input_client_->GetCompositionCharacterBounds(0, &tmp_rect)) { - tmp_rect.set_width(0); - result = tmp_rect.ToRECT(); - } else if (string_buffer_.size() == committed_size_) { - result = text_input_client_->GetCaretBounds().ToRECT(); - } else { - return TS_E_NOLAYOUT; - } - } else if (text_input_client_->GetCompositionCharacterBounds(start_pos - 1, - &tmp_rect)) { - result.left = tmp_rect.right(); - result.right = tmp_rect.right(); - result.top = tmp_rect.y(); - result.bottom = tmp_rect.bottom(); - } else { - return TS_E_NOLAYOUT; - } - } else { - if (text_input_client_->GetCompositionCharacterBounds(start_pos, - &tmp_rect)) { - result.left = tmp_rect.x(); - result.top = tmp_rect.y(); - result.right = tmp_rect.right(); - result.bottom = tmp_rect.bottom(); - if (text_input_client_->GetCompositionCharacterBounds(end_pos - 1, - &tmp_rect)) { - result.right = tmp_rect.right(); - result.bottom = tmp_rect.bottom(); - } else { - // We may not be able to get the last character bounds, so we use the - // first character bounds instead of returning TS_E_NOLAYOUT. - } - } else { - // Hack for PPAPI flash. PPAPI flash does not support GetCaretBounds, so - // it's better to return previous caret rectangle instead. - // TODO(nona, kinaba): Remove this hack. - if (start_pos == 0) { - result = text_input_client_->GetCaretBounds().ToRECT(); - } else { - return TS_E_NOLAYOUT; - } - } - } - - *rect = result; - *clipped = FALSE; - return S_OK; -} - -STDMETHODIMP TSFTextStore::GetWnd(TsViewCookie view_cookie, - HWND* window_handle) { - if (!window_handle) - return E_INVALIDARG; - if (view_cookie != kViewCookie) - return E_INVALIDARG; - *window_handle = window_handle_; - return S_OK; -} - -STDMETHODIMP TSFTextStore::InsertEmbedded(DWORD flags, - LONG acp_start, - LONG acp_end, - IDataObject* data_object, - TS_TEXTCHANGE* change) { - // We don't support any embedded objects. - NOTIMPLEMENTED(); - return E_NOTIMPL; -} - -STDMETHODIMP TSFTextStore::InsertEmbeddedAtSelection(DWORD flags, - IDataObject* data_object, - LONG* acp_start, - LONG* acp_end, - TS_TEXTCHANGE* change) { - // We don't support any embedded objects. - NOTIMPLEMENTED(); - return E_NOTIMPL; -} - -STDMETHODIMP TSFTextStore::InsertTextAtSelection(DWORD flags, - const wchar_t* text_buffer, - ULONG text_buffer_size, - LONG* acp_start, - LONG* acp_end, - TS_TEXTCHANGE* text_change) { - const LONG start_pos = selection_.start(); - const LONG end_pos = selection_.end(); - const LONG new_end_pos = start_pos + text_buffer_size; - - if (flags & TS_IAS_QUERYONLY) { - if (!HasReadLock()) - return TS_E_NOLOCK; - if (acp_start) - *acp_start = start_pos; - if (acp_end) { - *acp_end = end_pos; - } - return S_OK; - } - - if (!HasReadWriteLock()) - return TS_E_NOLOCK; - if (!text_buffer) - return E_INVALIDARG; - - DCHECK_LE(start_pos, end_pos); - string_buffer_ = string_buffer_.substr(0, start_pos) + - string16(text_buffer, text_buffer + text_buffer_size) + - string_buffer_.substr(end_pos); - if (acp_start) - *acp_start = start_pos; - if (acp_end) - *acp_end = new_end_pos; - if (text_change) { - text_change->acpStart = start_pos; - text_change->acpOldEnd = end_pos; - text_change->acpNewEnd = new_end_pos; - } - selection_.set_start(start_pos); - selection_.set_end(new_end_pos); - return S_OK; -} - -STDMETHODIMP TSFTextStore::QueryInsert( - LONG acp_test_start, - LONG acp_test_end, - ULONG text_size, - LONG* acp_result_start, - LONG* acp_result_end) { - if (!acp_result_start || !acp_result_end || acp_test_start > acp_test_end) - return E_INVALIDARG; - const LONG committed_size = static_cast<LONG>(committed_size_); - const LONG buffer_size = static_cast<LONG>(string_buffer_.size()); - *acp_result_start = std::min(std::max(committed_size, acp_test_start), - buffer_size); - *acp_result_end = std::min(std::max(committed_size, acp_test_end), - buffer_size); - return S_OK; -} - -STDMETHODIMP TSFTextStore::QueryInsertEmbedded(const GUID* service, - const FORMATETC* format, - BOOL* insertable) { - if (!format) - return E_INVALIDARG; - // We don't support any embedded objects. - if (insertable) - *insertable = FALSE; - return S_OK; -} - -STDMETHODIMP TSFTextStore::RequestAttrsAtPosition( - LONG acp_pos, - ULONG attribute_buffer_size, - const TS_ATTRID* attribute_buffer, - DWORD flags) { - // We don't support any document attributes. - // This method just returns S_OK, and the subsequently called - // RetrieveRequestedAttrs() returns 0 as the number of supported attributes. - return S_OK; -} - -STDMETHODIMP TSFTextStore::RequestAttrsTransitioningAtPosition( - LONG acp_pos, - ULONG attribute_buffer_size, - const TS_ATTRID* attribute_buffer, - DWORD flags) { - // We don't support any document attributes. - // This method just returns S_OK, and the subsequently called - // RetrieveRequestedAttrs() returns 0 as the number of supported attributes. - return S_OK; -} - -STDMETHODIMP TSFTextStore::RequestLock(DWORD lock_flags, HRESULT* result) { - if (!text_store_acp_sink_.get()) - return E_FAIL; - if (!result) - return E_INVALIDARG; - - if (current_lock_type_ != 0) { - if (lock_flags & TS_LF_SYNC) { - // Can't lock synchronously. - *result = TS_E_SYNCHRONOUS; - return S_OK; - } - // Queue the lock request. - lock_queue_.push_back(lock_flags & TS_LF_READWRITE); - *result = TS_S_ASYNC; - return S_OK; - } - - // Lock - current_lock_type_ = (lock_flags & TS_LF_READWRITE); - - edit_flag_ = false; - const size_t last_committed_size = committed_size_; - - // Grant the lock. - *result = text_store_acp_sink_->OnLockGranted(current_lock_type_); - - // Unlock - current_lock_type_ = 0; - - // Handles the pending lock requests. - while (!lock_queue_.empty()) { - current_lock_type_ = lock_queue_.front(); - lock_queue_.pop_front(); - text_store_acp_sink_->OnLockGranted(current_lock_type_); - current_lock_type_ = 0; - } - - if (!edit_flag_) { - return S_OK; - } - - // If the text store is edited in OnLockGranted(), we may need to call - // TextInputClient::InsertText() or TextInputClient::SetCompositionText(). - const size_t new_committed_size = committed_size_; - const string16& new_committed_string = - string_buffer_.substr(last_committed_size, - new_committed_size - last_committed_size); - const string16& composition_string = - string_buffer_.substr(new_committed_size); - - // If there is new committed string, calls TextInputClient::InsertText(). - if ((!new_committed_string.empty()) && text_input_client_) { - text_input_client_->InsertText(new_committed_string); - } - - // Calls TextInputClient::SetCompositionText(). - CompositionText composition_text; - composition_text.text = composition_string; - composition_text.underlines = composition_undelines_; - // Adjusts the offset. - for (size_t i = 0; i < composition_text.underlines.size(); ++i) { - composition_text.underlines[i].start_offset -= new_committed_size; - composition_text.underlines[i].end_offset -= new_committed_size; - } - if (selection_.start() < new_committed_size) { - composition_text.selection.set_start(0); - } else { - composition_text.selection.set_start( - selection_.start() - new_committed_size); - } - if (selection_.end() < new_committed_size) { - composition_text.selection.set_end(0); - } else { - composition_text.selection.set_end(selection_.end() - new_committed_size); - } - if (text_input_client_) - text_input_client_->SetCompositionText(composition_text); - - // If there is no composition string, clear the text store status. - // And call OnSelectionChange(), OnLayoutChange(), and OnTextChange(). - if ((composition_string.empty()) && (new_committed_size != 0)) { - string_buffer_.clear(); - committed_size_ = 0; - selection_.set_start(0); - selection_.set_end(0); - if (text_store_acp_sink_mask_ & TS_AS_SEL_CHANGE) - text_store_acp_sink_->OnSelectionChange(); - if (text_store_acp_sink_mask_ & TS_AS_LAYOUT_CHANGE) - text_store_acp_sink_->OnLayoutChange(TS_LC_CHANGE, 0); - if (text_store_acp_sink_mask_ & TS_AS_TEXT_CHANGE) { - TS_TEXTCHANGE textChange; - textChange.acpStart = 0; - textChange.acpOldEnd = new_committed_size; - textChange.acpNewEnd = 0; - text_store_acp_sink_->OnTextChange(0, &textChange); - } - } - - return S_OK; -} - -STDMETHODIMP TSFTextStore::RequestSupportedAttrs( - DWORD /* flags */, // Seems that we should ignore this. - ULONG attribute_buffer_size, - const TS_ATTRID* attribute_buffer) { - if (!attribute_buffer) - return E_INVALIDARG; - if (!text_input_client_) - return E_FAIL; - // We support only input scope attribute. - for (size_t i = 0; i < attribute_buffer_size; ++i) { - if (IsEqualGUID(GUID_PROP_INPUTSCOPE, attribute_buffer[i])) - return S_OK; - } - return E_FAIL; -} - -STDMETHODIMP TSFTextStore::RetrieveRequestedAttrs( - ULONG attribute_buffer_size, - TS_ATTRVAL* attribute_buffer, - ULONG* attribute_buffer_copied) { - if (!attribute_buffer_copied) - return E_INVALIDARG; - if (!attribute_buffer) - return E_INVALIDARG; - if (!text_input_client_) - return E_UNEXPECTED; - // We support only input scope attribute. - *attribute_buffer_copied = 0; - if (attribute_buffer_size == 0) - return S_OK; - - attribute_buffer[0].dwOverlapId = 0; - attribute_buffer[0].idAttr = GUID_PROP_INPUTSCOPE; - attribute_buffer[0].varValue.vt = VT_UNKNOWN; - attribute_buffer[0].varValue.punkVal = tsf_inputscope::CreateInputScope( - text_input_client_->GetTextInputType(), - text_input_client_->GetTextInputMode()); - attribute_buffer[0].varValue.punkVal->AddRef(); - *attribute_buffer_copied = 1; - return S_OK; -} - -STDMETHODIMP TSFTextStore::SetSelection( - ULONG selection_buffer_size, - const TS_SELECTION_ACP* selection_buffer) { - if (!HasReadWriteLock()) - return TF_E_NOLOCK; - if (selection_buffer_size > 0) { - const LONG start_pos = selection_buffer[0].acpStart; - const LONG end_pos = selection_buffer[0].acpEnd; - if (!((static_cast<LONG>(committed_size_) <= start_pos) && - (start_pos <= end_pos) && - (end_pos <= static_cast<LONG>(string_buffer_.size())))) { - return TF_E_INVALIDPOS; - } - selection_.set_start(start_pos); - selection_.set_end(end_pos); - } - return S_OK; -} - -STDMETHODIMP TSFTextStore::SetText(DWORD flags, - LONG acp_start, - LONG acp_end, - const wchar_t* text_buffer, - ULONG text_buffer_size, - TS_TEXTCHANGE* text_change) { - if (!HasReadWriteLock()) - return TS_E_NOLOCK; - if (!((static_cast<LONG>(committed_size_) <= acp_start) && - (acp_start <= acp_end) && - (acp_end <= static_cast<LONG>(string_buffer_.size())))) { - return TS_E_INVALIDPOS; - } - - TS_SELECTION_ACP selection; - selection.acpStart = acp_start; - selection.acpEnd = acp_end; - selection.style.ase = TS_AE_NONE; - selection.style.fInterimChar = 0; - - HRESULT ret; - ret = SetSelection(1, &selection); - if (ret != S_OK) - return ret; - - TS_TEXTCHANGE change; - ret = InsertTextAtSelection(0, text_buffer, text_buffer_size, - &acp_start, &acp_end, &change); - if (ret != S_OK) - return ret; - - if (text_change) - *text_change = change; - - return S_OK; -} - -STDMETHODIMP TSFTextStore::UnadviseSink(IUnknown* unknown) { - if (!text_store_acp_sink_.IsSameObject(unknown)) - return CONNECT_E_NOCONNECTION; - text_store_acp_sink_.Release(); - text_store_acp_sink_mask_ = 0; - return S_OK; -} - -STDMETHODIMP TSFTextStore::OnStartComposition( - ITfCompositionView* composition_view, - BOOL* ok) { - if (ok) - *ok = TRUE; - return S_OK; -} - -STDMETHODIMP TSFTextStore::OnUpdateComposition( - ITfCompositionView* composition_view, - ITfRange* range) { - return S_OK; -} - -STDMETHODIMP TSFTextStore::OnEndComposition( - ITfCompositionView* composition_view) { - return S_OK; -} - -STDMETHODIMP TSFTextStore::OnEndEdit(ITfContext* context, - TfEditCookie read_only_edit_cookie, - ITfEditRecord* edit_record) { - if (!context || !edit_record) - return E_INVALIDARG; - - size_t committed_size; - CompositionUnderlines undelines; - if (!GetCompositionStatus(context, read_only_edit_cookie, &committed_size, - &undelines)) { - return S_OK; - } - composition_undelines_ = undelines; - committed_size_ = committed_size; - edit_flag_ = true; - return S_OK; -} - -bool TSFTextStore::GetDisplayAttribute(TfGuidAtom guid_atom, - TF_DISPLAYATTRIBUTE* attribute) { - GUID guid; - if (FAILED(category_manager_->GetGUID(guid_atom, &guid))) - return false; - - base::win::ScopedComPtr<ITfDisplayAttributeInfo> display_attribute_info; - if (FAILED(display_attribute_manager_->GetDisplayAttributeInfo( - guid, display_attribute_info.Receive(), NULL))) { - return false; - } - return SUCCEEDED(display_attribute_info->GetAttributeInfo(attribute)); -} - -bool TSFTextStore::GetCompositionStatus( - ITfContext* context, - const TfEditCookie read_only_edit_cookie, - size_t* committed_size, - CompositionUnderlines* undelines) { - DCHECK(context); - DCHECK(committed_size); - DCHECK(undelines); - const GUID* rgGuids[2] = {&GUID_PROP_COMPOSING, &GUID_PROP_ATTRIBUTE}; - base::win::ScopedComPtr<ITfReadOnlyProperty> track_property; - if (FAILED(context->TrackProperties(rgGuids, 2, NULL, 0, - track_property.Receive()))) { - return false; - } - - *committed_size = 0; - undelines->clear(); - base::win::ScopedComPtr<ITfRange> start_to_end_range; - base::win::ScopedComPtr<ITfRange> end_range; - if (FAILED(context->GetStart(read_only_edit_cookie, - start_to_end_range.Receive()))) { - return false; - } - if (FAILED(context->GetEnd(read_only_edit_cookie, end_range.Receive()))) - return false; - if (FAILED(start_to_end_range->ShiftEndToRange(read_only_edit_cookie, - end_range, TF_ANCHOR_END))) { - return false; - } - - base::win::ScopedComPtr<IEnumTfRanges> ranges; - if (FAILED(track_property->EnumRanges(read_only_edit_cookie, ranges.Receive(), - start_to_end_range))) { - return false; - } - - while (true) { - base::win::ScopedComPtr<ITfRange> range; - if (ranges->Next(1, range.Receive(), NULL) != S_OK) - break; - base::win::ScopedVariant value; - base::win::ScopedComPtr<IEnumTfPropertyValue> enum_prop_value; - if (FAILED(track_property->GetValue(read_only_edit_cookie, range, - value.Receive()))) { - return false; - } - if (FAILED(enum_prop_value.QueryFrom(value.AsInput()->punkVal))) - return false; - - TF_PROPERTYVAL property_value; - bool is_composition = false; - bool has_display_attribute = false; - TF_DISPLAYATTRIBUTE display_attribute; - while (enum_prop_value->Next(1, &property_value, NULL) == S_OK) { - if (IsEqualGUID(property_value.guidId, GUID_PROP_COMPOSING)) { - is_composition = (property_value.varValue.lVal == TRUE); - } else if (IsEqualGUID(property_value.guidId, GUID_PROP_ATTRIBUTE)) { - TfGuidAtom guid_atom = - static_cast<TfGuidAtom>(property_value.varValue.lVal); - if (GetDisplayAttribute(guid_atom, &display_attribute)) - has_display_attribute = true; - } - VariantClear(&property_value.varValue); - } - - base::win::ScopedComPtr<ITfRangeACP> range_acp; - range_acp.QueryFrom(range); - LONG start_pos, length; - range_acp->GetExtent(&start_pos, &length); - if (!is_composition) { - if (*committed_size < static_cast<size_t>(start_pos + length)) - *committed_size = start_pos + length; - } else { - CompositionUnderline underline; - underline.start_offset = start_pos; - underline.end_offset = start_pos + length; - underline.color = SK_ColorBLACK; - if (has_display_attribute) - underline.thick = !!display_attribute.fBoldLine; - undelines->push_back(underline); - } - } - return true; -} - -void TSFTextStore::SetFocusedTextInputClient( - HWND focused_window, - TextInputClient* text_input_client) { - window_handle_ = focused_window; - text_input_client_ = text_input_client; -} - -void TSFTextStore::RemoveFocusedTextInputClient( - TextInputClient* text_input_client) { - if (text_input_client_ == text_input_client) { - window_handle_ = NULL; - text_input_client_ = NULL; - } -} - -bool TSFTextStore::CancelComposition() { - // If there is an on-going document lock, we must not edit the text. - if (edit_flag_) - return false; - - if (string_buffer_.empty()) - return true; - - // Unlike ImmNotifyIME(NI_COMPOSITIONSTR, CPS_CANCEL, 0) in IMM32, TSF does - // not have a dedicated method to cancel composition. However, CUAS actually - // has a protocol conversion from CPS_CANCEL into TSF operations. According - // to the observations on Windows 7, TIPs are expected to cancel composition - // when an on-going composition text is replaced with an empty string. So - // we use the same operation to cancel composition here to minimize the risk - // of potential compatibility issues. - - const size_t previous_buffer_size = string_buffer_.size(); - string_buffer_.clear(); - committed_size_ = 0; - selection_.set_start(0); - selection_.set_end(0); - if (text_store_acp_sink_mask_ & TS_AS_SEL_CHANGE) - text_store_acp_sink_->OnSelectionChange(); - if (text_store_acp_sink_mask_ & TS_AS_LAYOUT_CHANGE) - text_store_acp_sink_->OnLayoutChange(TS_LC_CHANGE, 0); - if (text_store_acp_sink_mask_ & TS_AS_TEXT_CHANGE) { - TS_TEXTCHANGE textChange = {}; - textChange.acpStart = 0; - textChange.acpOldEnd = previous_buffer_size; - textChange.acpNewEnd = 0; - text_store_acp_sink_->OnTextChange(0, &textChange); - } - return true; -} - -bool TSFTextStore::ConfirmComposition() { - // If there is an on-going document lock, we must not edit the text. - if (edit_flag_) - return false; - - if (string_buffer_.empty()) - return true; - - // See the comment in TSFTextStore::CancelComposition. - // This logic is based on the observation about how to emulate - // ImmNotifyIME(NI_COMPOSITIONSTR, CPS_COMPLETE, 0) by CUAS. - - const string16& composition_text = string_buffer_.substr(committed_size_); - if (!composition_text.empty()) - text_input_client_->InsertText(composition_text); - - const size_t previous_buffer_size = string_buffer_.size(); - string_buffer_.clear(); - committed_size_ = 0; - selection_.set_start(0); - selection_.set_end(0); - if (text_store_acp_sink_mask_ & TS_AS_SEL_CHANGE) - text_store_acp_sink_->OnSelectionChange(); - if (text_store_acp_sink_mask_ & TS_AS_LAYOUT_CHANGE) - text_store_acp_sink_->OnLayoutChange(TS_LC_CHANGE, 0); - if (text_store_acp_sink_mask_ & TS_AS_TEXT_CHANGE) { - TS_TEXTCHANGE textChange = {}; - textChange.acpStart = 0; - textChange.acpOldEnd = previous_buffer_size; - textChange.acpNewEnd = 0; - text_store_acp_sink_->OnTextChange(0, &textChange); - } - return true; -} - -void TSFTextStore::SendOnLayoutChange() { - if (text_store_acp_sink_ && (text_store_acp_sink_mask_ & TS_AS_LAYOUT_CHANGE)) - text_store_acp_sink_->OnLayoutChange(TS_LC_CHANGE, 0); -} - -bool TSFTextStore::HasReadLock() const { - return (current_lock_type_ & TS_LF_READ) == TS_LF_READ; -} - -bool TSFTextStore::HasReadWriteLock() const { - return (current_lock_type_ & TS_LF_READWRITE) == TS_LF_READWRITE; -} - -} // namespace ui diff --git a/chromium/ui/base/ime/win/tsf_text_store.h b/chromium/ui/base/ime/win/tsf_text_store.h deleted file mode 100644 index 87cd6b42991..00000000000 --- a/chromium/ui/base/ime/win/tsf_text_store.h +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_IME_WIN_TSF_TEXT_STORE_H_ -#define UI_BASE_IME_WIN_TSF_TEXT_STORE_H_ - -#include <msctf.h> -#include <deque> - -#include "base/basictypes.h" -#include "base/compiler_specific.h" -#include "base/strings/string16.h" -#include "base/win/scoped_comptr.h" -#include "ui/base/ime/composition_underline.h" -#include "ui/base/ui_export.h" -#include "ui/gfx/range/range.h" - -namespace ui { -class TextInputClient; - -// TSFTextStore is used to interact with the input method via TSF manager. -// TSFTextStore have a string buffer which is manipulated by TSF manager through -// ITextStoreACP interface methods such as SetText(). -// When the input method updates the composition, TSFTextStore calls -// TextInputClient::SetCompositionText(). And when the input method finishes the -// composition, TSFTextStore calls TextInputClient::InsertText() and clears the -// buffer. -// -// How TSFTextStore works: -// - The user enters "a". -// - The input method set composition as "a". -// - TSF manager calls TSFTextStore::RequestLock(). -// - TSFTextStore callbacks ITextStoreACPSink::OnLockGranted(). -// - In OnLockGranted(), TSF manager calls -// - TSFTextStore::OnStartComposition() -// - TSFTextStore::SetText() -// The string buffer is set as "a". -// - TSFTextStore::OnUpdateComposition() -// - TSFTextStore::OnEndEdit() -// TSFTextStore can get the composition information such as underlines. -// - TSFTextStore calls TextInputClient::SetCompositionText(). -// "a" is shown with an underline as composition string. -// - The user enters <space>. -// - The input method set composition as "A". -// - TSF manager calls TSFTextStore::RequestLock(). -// - TSFTextStore callbacks ITextStoreACPSink::OnLockGranted(). -// - In OnLockGranted(), TSF manager calls -// - TSFTextStore::SetText() -// The string buffer is set as "A". -// - TSFTextStore::OnUpdateComposition() -// - TSFTextStore::OnEndEdit() -// - TSFTextStore calls TextInputClient::SetCompositionText(). -// "A" is shown with an underline as composition string. -// - The user enters <enter>. -// - The input method commits "A". -// - TSF manager calls TSFTextStore::RequestLock(). -// - TSFTextStore callbacks ITextStoreACPSink::OnLockGranted(). -// - In OnLockGranted(), TSF manager calls -// - TSFTextStore::OnEndComposition() -// - TSFTextStore::OnEndEdit() -// TSFTextStore knows "A" is committed. -// - TSFTextStore calls TextInputClient::InsertText(). -// "A" is shown as committed string. -// - TSFTextStore clears the string buffer. -// - TSFTextStore calls OnSelectionChange(), OnLayoutChange() and -// OnTextChange() of ITextStoreACPSink to let TSF manager know that the -// string buffer has been changed. -// -// About the locking scheme: -// When TSF manager manipulates the string buffer it calls RequestLock() to get -// the lock of the document. If TSFTextStore can grant the lock request, it -// callbacks ITextStoreACPSink::OnLockGranted(). -// RequestLock() is called from only one thread, but called recursively in -// OnLockGranted() or OnSelectionChange() or OnLayoutChange() or OnTextChange(). -// If the document is locked and the lock request is asynchronous, TSFTextStore -// queues the request. The queued requests will be handled after the current -// lock is removed. -// More information about document locks can be found here: -// http://msdn.microsoft.com/en-us/library/ms538064 -// -// More information about TSF can be found here: -// http://msdn.microsoft.com/en-us/library/ms629032 -class UI_EXPORT TSFTextStore : public ITextStoreACP, - public ITfContextOwnerCompositionSink, - public ITfTextEditSink { - public: - TSFTextStore(); - virtual ~TSFTextStore(); - - // ITextStoreACP: - STDMETHOD_(ULONG, AddRef)() OVERRIDE; - STDMETHOD_(ULONG, Release)() OVERRIDE; - STDMETHOD(QueryInterface)(REFIID iid, void** ppv) OVERRIDE; - STDMETHOD(AdviseSink)(REFIID iid, IUnknown* unknown, DWORD mask) OVERRIDE; - STDMETHOD(FindNextAttrTransition)(LONG acp_start, - LONG acp_halt, - ULONG num_filter_attributes, - const TS_ATTRID* filter_attributes, - DWORD flags, - LONG* acp_next, - BOOL* found, - LONG* found_offset) OVERRIDE; - STDMETHOD(GetACPFromPoint)(TsViewCookie view_cookie, - const POINT* point, - DWORD flags, - LONG* acp) OVERRIDE; - STDMETHOD(GetActiveView)(TsViewCookie* view_cookie) OVERRIDE; - STDMETHOD(GetEmbedded)(LONG acp_pos, - REFGUID service, - REFIID iid, - IUnknown** unknown) OVERRIDE; - STDMETHOD(GetEndACP)(LONG* acp) OVERRIDE; - STDMETHOD(GetFormattedText)(LONG acp_start, - LONG acp_end, - IDataObject** data_object) OVERRIDE; - STDMETHOD(GetScreenExt)(TsViewCookie view_cookie, RECT* rect) OVERRIDE; - STDMETHOD(GetSelection)(ULONG selection_index, - ULONG selection_buffer_size, - TS_SELECTION_ACP* selection_buffer, - ULONG* fetched_count) OVERRIDE; - STDMETHOD(GetStatus)(TS_STATUS* pdcs) OVERRIDE; - STDMETHOD(GetText)(LONG acp_start, - LONG acp_end, - wchar_t* text_buffer, - ULONG text_buffer_size, - ULONG* text_buffer_copied, - TS_RUNINFO* run_info_buffer, - ULONG run_info_buffer_size, - ULONG* run_info_buffer_copied, - LONG* next_acp) OVERRIDE; - STDMETHOD(GetTextExt)(TsViewCookie view_cookie, - LONG acp_start, - LONG acp_end, - RECT* rect, - BOOL* clipped) OVERRIDE; - STDMETHOD(GetWnd)(TsViewCookie view_cookie, HWND* window_handle) OVERRIDE; - STDMETHOD(InsertEmbedded)(DWORD flags, - LONG acp_start, - LONG acp_end, - IDataObject* data_object, - TS_TEXTCHANGE* change) OVERRIDE; - STDMETHOD(InsertEmbeddedAtSelection)(DWORD flags, - IDataObject* data_object, - LONG* acp_start, - LONG* acp_end, - TS_TEXTCHANGE* change) OVERRIDE; - STDMETHOD(InsertTextAtSelection)(DWORD flags, - const wchar_t* text_buffer, - ULONG text_buffer_size, - LONG* acp_start, - LONG* acp_end, - TS_TEXTCHANGE* text_change) OVERRIDE; - STDMETHOD(QueryInsert)(LONG acp_test_start, - LONG acp_test_end, - ULONG text_size, - LONG* acp_result_start, - LONG* acp_result_end) OVERRIDE; - STDMETHOD(QueryInsertEmbedded)(const GUID* service, - const FORMATETC* format, - BOOL* insertable) OVERRIDE; - STDMETHOD(RequestAttrsAtPosition)(LONG acp_pos, - ULONG attribute_buffer_size, - const TS_ATTRID* attribute_buffer, - DWORD flags) OVERRIDE; - STDMETHOD(RequestAttrsTransitioningAtPosition)( - LONG acp_pos, - ULONG attribute_buffer_size, - const TS_ATTRID* attribute_buffer, - DWORD flags) OVERRIDE; - STDMETHOD(RequestLock)(DWORD lock_flags, HRESULT* result) OVERRIDE; - STDMETHOD(RequestSupportedAttrs)(DWORD flags, - ULONG attribute_buffer_size, - const TS_ATTRID* attribute_buffer) OVERRIDE; - STDMETHOD(RetrieveRequestedAttrs)(ULONG attribute_buffer_size, - TS_ATTRVAL* attribute_buffer, - ULONG* attribute_buffer_copied) OVERRIDE; - STDMETHOD(SetSelection)(ULONG selection_buffer_size, - const TS_SELECTION_ACP* selection_buffer) OVERRIDE; - STDMETHOD(SetText)(DWORD flags, - LONG acp_start, - LONG acp_end, - const wchar_t* text_buffer, - ULONG text_buffer_size, - TS_TEXTCHANGE* text_change) OVERRIDE; - STDMETHOD(UnadviseSink)(IUnknown* unknown) OVERRIDE; - - // ITfContextOwnerCompositionSink: - STDMETHOD(OnStartComposition)(ITfCompositionView* composition_view, - BOOL* ok) OVERRIDE; - STDMETHOD(OnUpdateComposition)(ITfCompositionView* composition_view, - ITfRange* range) OVERRIDE; - STDMETHOD(OnEndComposition)(ITfCompositionView* composition_view) OVERRIDE; - - // ITfTextEditSink: - STDMETHOD(OnEndEdit)(ITfContext* context, TfEditCookie read_only_edit_cookie, - ITfEditRecord* edit_record) OVERRIDE; - - // Sets currently focused TextInputClient. - void SetFocusedTextInputClient(HWND focused_window, - TextInputClient* text_input_client); - // Removes currently focused TextInputClient. - void RemoveFocusedTextInputClient(TextInputClient* text_input_client); - - // Cancels the ongoing composition if exists. - bool CancelComposition(); - - // Confirms the ongoing composition if exists. - bool ConfirmComposition(); - - // Sends OnLayoutChange() via |text_store_acp_sink_|. - void SendOnLayoutChange(); - - private: - friend class TSFTextStoreTest; - friend class TSFTextStoreTestCallback; - - // Checks if the document has a read-only lock. - bool HasReadLock() const; - - // Checks if the document has a read and write lock. - bool HasReadWriteLock() const; - - // Gets the display attribute structure. - bool GetDisplayAttribute(TfGuidAtom guid_atom, - TF_DISPLAYATTRIBUTE* attribute); - - // Gets the committed string size and underline information of the context. - bool GetCompositionStatus(ITfContext* context, - const TfEditCookie read_only_edit_cookie, - size_t* committed_size, - CompositionUnderlines* undelines); - - // The refrence count of this instance. - volatile LONG ref_count_; - - // A pointer of ITextStoreACPSink, this instance is given in AdviseSink. - base::win::ScopedComPtr<ITextStoreACPSink> text_store_acp_sink_; - - // The current mask of |text_store_acp_sink_|. - DWORD text_store_acp_sink_mask_; - - // HWND of the current view window which is set in SetFocusedTextInputClient. - HWND window_handle_; - - // Current TextInputClient which is set in SetFocusedTextInputClient. - TextInputClient* text_input_client_; - - // |string_buffer_| contains committed string and composition string. - // Example: "aoi" is committed, and "umi" is under composition. - // |string_buffer_|: "aoiumi" - // |committed_size_|: 3 - string16 string_buffer_; - size_t committed_size_; - - // |selection_start_| and |selection_end_| indicates the selection range. - // Example: "iue" is selected - // |string_buffer_|: "aiueo" - // |selection_.start()|: 1 - // |selection_.end()|: 4 - gfx::Range selection_; - - // |start_offset| and |end_offset| of |composition_undelines_| indicates - // the offsets in |string_buffer_|. - // Example: "aoi" is committed. There are two underlines in "umi" and "no". - // |string_buffer_|: "aoiumino" - // |committed_size_|: 3 - // composition_undelines_.underlines[0].start_offset: 3 - // composition_undelines_.underlines[0].end_offset: 6 - // composition_undelines_.underlines[1].start_offset: 6 - // composition_undelines_.underlines[1].end_offset: 8 - CompositionUnderlines composition_undelines_; - - // |edit_flag_| indicates that the status is edited during - // ITextStoreACPSink::OnLockGranted(). - bool edit_flag_; - - // The type of current lock. - // 0: No lock. - // TS_LF_READ: read-only lock. - // TS_LF_READWRITE: read/write lock. - DWORD current_lock_type_; - - // Queue of the lock request used in RequestLock(). - std::deque<DWORD> lock_queue_; - - // Category manager and Display attribute manager are used to obtain the - // attributes of the composition string. - base::win::ScopedComPtr<ITfCategoryMgr> category_manager_; - base::win::ScopedComPtr<ITfDisplayAttributeMgr> display_attribute_manager_; - - DISALLOW_COPY_AND_ASSIGN(TSFTextStore); -}; - -} // namespace ui - -#endif // UI_BASE_IME_WIN_TSF_TEXT_STORE_H_ diff --git a/chromium/ui/base/ime/win/tsf_text_store_unittest.cc b/chromium/ui/base/ime/win/tsf_text_store_unittest.cc deleted file mode 100644 index 33812a4e01e..00000000000 --- a/chromium/ui/base/ime/win/tsf_text_store_unittest.cc +++ /dev/null @@ -1,1302 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/ime/win/tsf_text_store.h" - -#include <initguid.h> // for GUID_NULL and GUID_PROP_INPUTSCOPE -#include <InputScope.h> -#include <OleCtl.h> - -#include "base/memory/ref_counted.h" -#include "base/win/scoped_com_initializer.h" -#include "base/win/scoped_variant.h" -#include "testing/gtest/include/gtest/gtest.h" -#include "testing/gmock/include/gmock/gmock.h" -#include "ui/base/ime/text_input_client.h" -#include "ui/gfx/rect.h" - -using testing::_; -using testing::Invoke; -using testing::Return; - -namespace ui { -namespace { - -class MockTextInputClient : public TextInputClient { - public: - ~MockTextInputClient() {} - MOCK_METHOD1(SetCompositionText, void(const ui::CompositionText&)); - MOCK_METHOD0(ConfirmCompositionText, void()); - MOCK_METHOD0(ClearCompositionText, void()); - MOCK_METHOD1(InsertText, void(const string16&)); - MOCK_METHOD2(InsertChar, void(char16, int)); - MOCK_CONST_METHOD0(GetAttachedWindow, gfx::NativeWindow()); - MOCK_CONST_METHOD0(GetTextInputType, ui::TextInputType()); - MOCK_CONST_METHOD0(GetTextInputMode, ui::TextInputMode()); - MOCK_CONST_METHOD0(CanComposeInline, bool()); - MOCK_CONST_METHOD0(GetCaretBounds, gfx::Rect()); - MOCK_CONST_METHOD2(GetCompositionCharacterBounds, bool(uint32, gfx::Rect*)); - MOCK_CONST_METHOD0(HasCompositionText, bool()); - MOCK_CONST_METHOD1(GetTextRange, bool(gfx::Range*)); - MOCK_CONST_METHOD1(GetCompositionTextRange, bool(gfx::Range*)); - MOCK_CONST_METHOD1(GetSelectionRange, bool(gfx::Range*)); - MOCK_METHOD1(SetSelectionRange, bool(const gfx::Range&)); - MOCK_METHOD1(DeleteRange, bool(const gfx::Range&)); - MOCK_CONST_METHOD2(GetTextFromRange, bool(const gfx::Range&, string16*)); - MOCK_METHOD0(OnInputMethodChanged, void()); - MOCK_METHOD1(ChangeTextDirectionAndLayoutAlignment, - bool(base::i18n::TextDirection)); - MOCK_METHOD2(ExtendSelectionAndDelete, void(size_t, size_t)); - MOCK_METHOD1(EnsureCaretInRect, void(const gfx::Rect&)); - MOCK_METHOD0(OnCandidateWindowShown, void()); - MOCK_METHOD0(OnCandidateWindowUpdated, void()); - MOCK_METHOD0(OnCandidateWindowHidden, void()); -}; - -class MockStoreACPSink : public ITextStoreACPSink { - public: - MockStoreACPSink() : ref_count_(0) {} - - // IUnknown - virtual ULONG STDMETHODCALLTYPE AddRef() OVERRIDE { - return InterlockedIncrement(&ref_count_); - } - virtual ULONG STDMETHODCALLTYPE Release() OVERRIDE { - const LONG count = InterlockedDecrement(&ref_count_); - if (!count) { - delete this; - return 0; - } - return static_cast<ULONG>(count); - } - virtual HRESULT STDMETHODCALLTYPE QueryInterface( - REFIID iid, void** report) OVERRIDE { - if (iid == IID_IUnknown || iid == IID_ITextStoreACPSink) { - *report = static_cast<ITextStoreACPSink*>(this); - } else { - *report = NULL; - return E_NOINTERFACE; - } - AddRef(); - return S_OK; - } - - // ITextStoreACPSink - MOCK_METHOD2_WITH_CALLTYPE(STDMETHODCALLTYPE, OnTextChange, - HRESULT(DWORD, const TS_TEXTCHANGE*)); - MOCK_METHOD0_WITH_CALLTYPE(STDMETHODCALLTYPE, OnSelectionChange, - HRESULT()); - MOCK_METHOD2_WITH_CALLTYPE(STDMETHODCALLTYPE, OnLayoutChange, - HRESULT(TsLayoutCode, TsViewCookie)); - MOCK_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, OnStatusChange, - HRESULT(DWORD)); - MOCK_METHOD4_WITH_CALLTYPE(STDMETHODCALLTYPE, OnAttrsChange, - HRESULT(LONG, LONG, ULONG, const TS_ATTRID*)); - MOCK_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, OnLockGranted, - HRESULT(DWORD)); - MOCK_METHOD0_WITH_CALLTYPE(STDMETHODCALLTYPE, OnStartEditTransaction, - HRESULT()); - MOCK_METHOD0_WITH_CALLTYPE(STDMETHODCALLTYPE, OnEndEditTransaction, - HRESULT()); - - private: - virtual ~MockStoreACPSink() {} - - volatile LONG ref_count_; -}; - -const HWND kWindowHandle = reinterpret_cast<HWND>(1); - -} // namespace - -class TSFTextStoreTest : public testing::Test { - protected: - virtual void SetUp() OVERRIDE { - text_store_ = new TSFTextStore(); - sink_ = new MockStoreACPSink(); - EXPECT_EQ(S_OK, text_store_->AdviseSink(IID_ITextStoreACPSink, - sink_, TS_AS_ALL_SINKS)); - text_store_->SetFocusedTextInputClient(kWindowHandle, - &text_input_client_); - } - - virtual void TearDown() OVERRIDE { - EXPECT_EQ(S_OK, text_store_->UnadviseSink(sink_)); - sink_ = NULL; - text_store_ = NULL; - } - - // Accessors to the internal state of TSFTextStore. - string16* string_buffer() { return &text_store_->string_buffer_; } - size_t* committed_size() { return &text_store_->committed_size_; } - - base::win::ScopedCOMInitializer com_initializer_; - MockTextInputClient text_input_client_; - scoped_refptr<TSFTextStore> text_store_; - scoped_refptr<MockStoreACPSink> sink_; -}; - -class TSFTextStoreTestCallback { - public: - explicit TSFTextStoreTestCallback(TSFTextStore* text_store) - : text_store_(text_store) { - CHECK(text_store_); - } - virtual ~TSFTextStoreTestCallback() {} - - protected: - // Accessors to the internal state of TSFTextStore. - bool* edit_flag() { return &text_store_->edit_flag_; } - string16* string_buffer() { return &text_store_->string_buffer_; } - size_t* committed_size() { return &text_store_->committed_size_; } - gfx::Range* selection() { return &text_store_->selection_; } - CompositionUnderlines* composition_undelines() { - return &text_store_->composition_undelines_; - } - - void SetInternalState(const string16& new_string_buffer, - LONG new_committed_size, LONG new_selection_start, - LONG new_selection_end) { - ASSERT_LE(0, new_committed_size); - ASSERT_LE(new_committed_size, new_selection_start); - ASSERT_LE(new_selection_start, new_selection_end); - ASSERT_LE(new_selection_end, static_cast<LONG>(new_string_buffer.size())); - *string_buffer() = new_string_buffer; - *committed_size() = new_committed_size; - selection()->set_start(new_selection_start); - selection()->set_end(new_selection_end); - } - - bool HasReadLock() const { return text_store_->HasReadLock(); } - bool HasReadWriteLock() const { return text_store_->HasReadWriteLock(); } - - void GetSelectionTest(LONG expected_acp_start, LONG expected_acp_end) { - TS_SELECTION_ACP selection = {}; - ULONG fetched = 0; - EXPECT_EQ(S_OK, text_store_->GetSelection(0, 1, &selection, &fetched)); - EXPECT_EQ(1, fetched); - EXPECT_EQ(expected_acp_start, selection.acpStart); - EXPECT_EQ(expected_acp_end, selection.acpEnd); - } - - void SetSelectionTest(LONG acp_start, LONG acp_end, HRESULT expected_result) { - TS_SELECTION_ACP selection = {}; - selection.acpStart = acp_start; - selection.acpEnd = acp_end; - selection.style.ase = TS_AE_NONE; - selection.style.fInterimChar = 0; - EXPECT_EQ(expected_result, text_store_->SetSelection(1, &selection)); - if (expected_result == S_OK) { - GetSelectionTest(acp_start, acp_end); - } - } - - void SetTextTest(LONG acp_start, LONG acp_end, - const string16& text, HRESULT error_code) { - TS_TEXTCHANGE change = {}; - ASSERT_EQ(error_code, - text_store_->SetText(0, acp_start, acp_end, - text.c_str(), text.size(), &change)); - if (error_code == S_OK) { - EXPECT_EQ(acp_start, change.acpStart); - EXPECT_EQ(acp_end, change.acpOldEnd); - EXPECT_EQ(acp_start + text.size(), change.acpNewEnd); - } - } - - void GetTextTest(LONG acp_start, LONG acp_end, - const string16& expected_string, - LONG expected_next_acp) { - wchar_t buffer[1024] = {}; - ULONG text_buffer_copied = 0; - TS_RUNINFO run_info = {}; - ULONG run_info_buffer_copied = 0; - LONG next_acp = 0; - ASSERT_EQ(S_OK, - text_store_->GetText(acp_start, acp_end, buffer, 1024, - &text_buffer_copied, - &run_info, 1, &run_info_buffer_copied, - &next_acp)); - ASSERT_EQ(expected_string.size(), text_buffer_copied); - EXPECT_EQ(expected_string, string16(buffer, buffer + text_buffer_copied)); - EXPECT_EQ(1, run_info_buffer_copied); - EXPECT_EQ(expected_string.size(), run_info.uCount); - EXPECT_EQ(TS_RT_PLAIN, run_info.type); - EXPECT_EQ(expected_next_acp, next_acp); - } - - void GetTextErrorTest(LONG acp_start, LONG acp_end, HRESULT error_code) { - wchar_t buffer[1024] = {}; - ULONG text_buffer_copied = 0; - TS_RUNINFO run_info = {}; - ULONG run_info_buffer_copied = 0; - LONG next_acp = 0; - EXPECT_EQ(error_code, - text_store_->GetText(acp_start, acp_end, buffer, 1024, - &text_buffer_copied, - &run_info, 1, &run_info_buffer_copied, - &next_acp)); - } - - void InsertTextAtSelectionTest(const wchar_t* buffer, ULONG buffer_size, - LONG expected_start, LONG expected_end, - LONG expected_change_start, - LONG expected_change_old_end, - LONG expected_change_new_end) { - LONG start = 0; - LONG end = 0; - TS_TEXTCHANGE change = {}; - EXPECT_EQ(S_OK, - text_store_->InsertTextAtSelection(0, buffer, buffer_size, - &start, &end, &change)); - EXPECT_EQ(expected_start, start); - EXPECT_EQ(expected_end, end); - EXPECT_EQ(expected_change_start, change.acpStart); - EXPECT_EQ(expected_change_old_end, change.acpOldEnd); - EXPECT_EQ(expected_change_new_end, change.acpNewEnd); - } - - void InsertTextAtSelectionQueryOnlyTest(const wchar_t* buffer, - ULONG buffer_size, - LONG expected_start, - LONG expected_end) { - LONG start = 0; - LONG end = 0; - EXPECT_EQ(S_OK, - text_store_->InsertTextAtSelection(TS_IAS_QUERYONLY, buffer, - buffer_size, &start, &end, - NULL)); - EXPECT_EQ(expected_start, start); - EXPECT_EQ(expected_end, end); - } - - void GetTextExtTest(TsViewCookie view_cookie, LONG acp_start, LONG acp_end, - LONG expected_left, LONG expected_top, - LONG expected_right, LONG expected_bottom) { - RECT rect = {}; - BOOL clipped = FALSE; - EXPECT_EQ(S_OK, text_store_->GetTextExt(view_cookie, acp_start, acp_end, - &rect, &clipped)); - EXPECT_EQ(expected_left, rect.left); - EXPECT_EQ(expected_top, rect.top); - EXPECT_EQ(expected_right, rect.right); - EXPECT_EQ(expected_bottom, rect.bottom); - EXPECT_EQ(FALSE, clipped); - } - - void GetTextExtNoLayoutTest(TsViewCookie view_cookie, LONG acp_start, - LONG acp_end) { - RECT rect = {}; - BOOL clipped = FALSE; - EXPECT_EQ(TS_E_NOLAYOUT, - text_store_->GetTextExt(view_cookie, acp_start, acp_end, - &rect, &clipped)); - } - - scoped_refptr<TSFTextStore> text_store_; - - private: - DISALLOW_COPY_AND_ASSIGN(TSFTextStoreTestCallback); -}; - -namespace { - -const HRESULT kInvalidResult = 0x12345678; - -TEST_F(TSFTextStoreTest, GetStatusTest) { - TS_STATUS status = {}; - EXPECT_EQ(S_OK, text_store_->GetStatus(&status)); - EXPECT_EQ(0, status.dwDynamicFlags); - EXPECT_EQ(TS_SS_TRANSITORY | TS_SS_NOHIDDENTEXT, status.dwStaticFlags); -} - -TEST_F(TSFTextStoreTest, QueryInsertTest) { - LONG result_start = 0; - LONG result_end = 0; - *string_buffer() = L""; - *committed_size() = 0; - EXPECT_EQ(E_INVALIDARG, - text_store_->QueryInsert(0, 0, 0, NULL, &result_end)); - EXPECT_EQ(E_INVALIDARG, - text_store_->QueryInsert(0, 0, 0, &result_start, NULL)); - EXPECT_EQ(S_OK, - text_store_->QueryInsert(0, 0, 0, &result_start, &result_end)); - EXPECT_EQ(0, result_start); - EXPECT_EQ(0, result_end); - *string_buffer() = L"1234"; - *committed_size() = 1; - EXPECT_EQ(S_OK, - text_store_->QueryInsert(0, 1, 0, &result_start, &result_end)); - EXPECT_EQ(1, result_start); - EXPECT_EQ(1, result_end); - EXPECT_EQ(E_INVALIDARG, - text_store_->QueryInsert(1, 0, 0, &result_start, &result_end)); - EXPECT_EQ(S_OK, - text_store_->QueryInsert(2, 2, 0, &result_start, &result_end)); - EXPECT_EQ(2, result_start); - EXPECT_EQ(2, result_end); - EXPECT_EQ(S_OK, - text_store_->QueryInsert(2, 3, 0, &result_start, &result_end)); - EXPECT_EQ(2, result_start); - EXPECT_EQ(3, result_end); - EXPECT_EQ(E_INVALIDARG, - text_store_->QueryInsert(3, 2, 0, &result_start, &result_end)); - EXPECT_EQ(S_OK, - text_store_->QueryInsert(3, 4, 0, &result_start, &result_end)); - EXPECT_EQ(3, result_start); - EXPECT_EQ(4, result_end); - EXPECT_EQ(S_OK, - text_store_->QueryInsert(3, 5, 0, &result_start, &result_end)); - EXPECT_EQ(3, result_start); - EXPECT_EQ(4, result_end); -} - -class SyncRequestLockTestCallback : public TSFTextStoreTestCallback { - public: - explicit SyncRequestLockTestCallback(TSFTextStore* text_store) - : TSFTextStoreTestCallback(text_store) {} - - HRESULT LockGranted1(DWORD flags) { - EXPECT_TRUE(HasReadLock()); - EXPECT_FALSE(HasReadWriteLock()); - return S_OK; - } - - HRESULT LockGranted2(DWORD flags) { - EXPECT_TRUE(HasReadLock()); - EXPECT_TRUE(HasReadWriteLock()); - return S_OK; - } - - HRESULT LockGranted3(DWORD flags) { - EXPECT_TRUE(HasReadLock()); - EXPECT_FALSE(HasReadWriteLock()); - HRESULT result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ | TS_LF_SYNC, &result)); - EXPECT_EQ(TS_E_SYNCHRONOUS, result); - return S_OK; - } - - HRESULT LockGranted4(DWORD flags) { - EXPECT_TRUE(HasReadLock()); - EXPECT_FALSE(HasReadWriteLock()); - HRESULT result = kInvalidResult; - EXPECT_EQ(S_OK, - text_store_->RequestLock(TS_LF_READWRITE | TS_LF_SYNC, &result)); - EXPECT_EQ(TS_E_SYNCHRONOUS, result); - return S_OK; - } - - HRESULT LockGranted5(DWORD flags) { - EXPECT_TRUE(HasReadLock()); - EXPECT_TRUE(HasReadWriteLock()); - HRESULT result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ | TS_LF_SYNC, &result)); - EXPECT_EQ(TS_E_SYNCHRONOUS, result); - return S_OK; - } - - HRESULT LockGranted6(DWORD flags) { - EXPECT_TRUE(HasReadLock()); - EXPECT_TRUE(HasReadWriteLock()); - HRESULT result = kInvalidResult; - EXPECT_EQ(S_OK, - text_store_->RequestLock(TS_LF_READWRITE | TS_LF_SYNC, &result)); - EXPECT_EQ(TS_E_SYNCHRONOUS, result); - return S_OK; - } - - private: - DISALLOW_COPY_AND_ASSIGN(SyncRequestLockTestCallback); -}; - -TEST_F(TSFTextStoreTest, SynchronousRequestLockTest) { - SyncRequestLockTestCallback callback(text_store_); - EXPECT_CALL(*sink_, OnLockGranted(_)) - .WillOnce(Invoke(&callback, &SyncRequestLockTestCallback::LockGranted1)) - .WillOnce(Invoke(&callback, &SyncRequestLockTestCallback::LockGranted2)) - .WillOnce(Invoke(&callback, &SyncRequestLockTestCallback::LockGranted3)) - .WillOnce(Invoke(&callback, &SyncRequestLockTestCallback::LockGranted4)) - .WillOnce(Invoke(&callback, &SyncRequestLockTestCallback::LockGranted5)) - .WillOnce(Invoke(&callback, &SyncRequestLockTestCallback::LockGranted6)); - - HRESULT result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ | TS_LF_SYNC, &result)); - EXPECT_EQ(S_OK, result); - result = kInvalidResult; - EXPECT_EQ(S_OK, - text_store_->RequestLock(TS_LF_READWRITE | TS_LF_SYNC, &result)); - EXPECT_EQ(S_OK, result); - - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ | TS_LF_SYNC, &result)); - EXPECT_EQ(S_OK, result); - result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ | TS_LF_SYNC, &result)); - EXPECT_EQ(S_OK, result); - - result = kInvalidResult; - EXPECT_EQ(S_OK, - text_store_->RequestLock(TS_LF_READWRITE | TS_LF_SYNC, &result)); - EXPECT_EQ(S_OK, result); - result = kInvalidResult; - EXPECT_EQ(S_OK, - text_store_->RequestLock(TS_LF_READWRITE | TS_LF_SYNC, &result)); - EXPECT_EQ(S_OK, result); -} - -class AsyncRequestLockTestCallback : public TSFTextStoreTestCallback { - public: - explicit AsyncRequestLockTestCallback(TSFTextStore* text_store) - : TSFTextStoreTestCallback(text_store), - state_(0) {} - - HRESULT LockGranted1(DWORD flags) { - EXPECT_EQ(0, state_); - state_ = 1; - EXPECT_TRUE(HasReadLock()); - EXPECT_FALSE(HasReadWriteLock()); - HRESULT result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ, &result)); - EXPECT_EQ(TS_S_ASYNC, result); - EXPECT_EQ(1, state_); - state_ = 2; - return S_OK; - } - - HRESULT LockGranted2(DWORD flags) { - EXPECT_EQ(2, state_); - EXPECT_TRUE(HasReadLock()); - EXPECT_FALSE(HasReadWriteLock()); - HRESULT result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READWRITE, &result)); - EXPECT_EQ(TS_S_ASYNC, result); - EXPECT_EQ(2, state_); - state_ = 3; - return S_OK; - } - - HRESULT LockGranted3(DWORD flags) { - EXPECT_EQ(3, state_); - EXPECT_TRUE(HasReadLock()); - EXPECT_TRUE(HasReadWriteLock()); - HRESULT result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READWRITE, &result)); - EXPECT_EQ(TS_S_ASYNC, result); - EXPECT_EQ(3, state_); - state_ = 4; - return S_OK; - } - - HRESULT LockGranted4(DWORD flags) { - EXPECT_EQ(4, state_); - EXPECT_TRUE(HasReadLock()); - EXPECT_TRUE(HasReadWriteLock()); - HRESULT result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ, &result)); - EXPECT_EQ(TS_S_ASYNC, result); - EXPECT_EQ(4, state_); - state_ = 5; - return S_OK; - } - - HRESULT LockGranted5(DWORD flags) { - EXPECT_EQ(5, state_); - EXPECT_TRUE(HasReadLock()); - EXPECT_FALSE(HasReadWriteLock()); - state_ = 6; - return S_OK; - } - - private: - int state_; - - DISALLOW_COPY_AND_ASSIGN(AsyncRequestLockTestCallback); -}; - -TEST_F(TSFTextStoreTest, AsynchronousRequestLockTest) { - AsyncRequestLockTestCallback callback(text_store_); - EXPECT_CALL(*sink_, OnLockGranted(_)) - .WillOnce(Invoke(&callback, &AsyncRequestLockTestCallback::LockGranted1)) - .WillOnce(Invoke(&callback, &AsyncRequestLockTestCallback::LockGranted2)) - .WillOnce(Invoke(&callback, &AsyncRequestLockTestCallback::LockGranted3)) - .WillOnce(Invoke(&callback, &AsyncRequestLockTestCallback::LockGranted4)) - .WillOnce(Invoke(&callback, &AsyncRequestLockTestCallback::LockGranted5)); - - HRESULT result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ, &result)); - EXPECT_EQ(S_OK, result); -} - -class RequestLockTextChangeTestCallback : public TSFTextStoreTestCallback { - public: - explicit RequestLockTextChangeTestCallback(TSFTextStore* text_store) - : TSFTextStoreTestCallback(text_store), - state_(0) {} - - HRESULT LockGranted1(DWORD flags) { - EXPECT_EQ(0, state_); - state_ = 1; - EXPECT_TRUE(HasReadLock()); - EXPECT_TRUE(HasReadWriteLock()); - - *edit_flag() = true; - SetInternalState(L"012345", 6, 6, 6); - composition_undelines()->clear(); - - state_ = 2; - return S_OK; - } - - void InsertText(const string16& text) { - EXPECT_EQ(2, state_); - EXPECT_EQ(L"012345", text); - state_ = 3; - } - - void SetCompositionText(const ui::CompositionText& composition) { - EXPECT_EQ(3, state_); - EXPECT_EQ(L"", composition.text); - EXPECT_EQ(0, composition.selection.start()); - EXPECT_EQ(0, composition.selection.end()); - EXPECT_EQ(0, composition.underlines.size()); - state_ = 4; - } - - HRESULT OnTextChange(DWORD flags, const TS_TEXTCHANGE* change) { - EXPECT_EQ(4, state_); - HRESULT result = kInvalidResult; - state_ = 5; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READWRITE, &result)); - EXPECT_EQ(S_OK, result); - EXPECT_EQ(6, state_); - state_ = 7; - return S_OK; - } - - HRESULT LockGranted2(DWORD flags) { - EXPECT_EQ(5, state_); - EXPECT_TRUE(HasReadLock()); - EXPECT_TRUE(HasReadWriteLock()); - state_ = 6; - return S_OK; - } - - private: - int state_; - - DISALLOW_COPY_AND_ASSIGN(RequestLockTextChangeTestCallback); -}; - -TEST_F(TSFTextStoreTest, RequestLockOnTextChangeTest) { - RequestLockTextChangeTestCallback callback(text_store_); - EXPECT_CALL(*sink_, OnLockGranted(_)) - .WillOnce(Invoke(&callback, - &RequestLockTextChangeTestCallback::LockGranted1)) - .WillOnce(Invoke(&callback, - &RequestLockTextChangeTestCallback::LockGranted2)); - - EXPECT_CALL(*sink_, OnSelectionChange()) - .WillOnce(Return(S_OK)); - EXPECT_CALL(*sink_, OnLayoutChange(_, _)) - .WillOnce(Return(S_OK)); - EXPECT_CALL(*sink_, OnTextChange(_, _)) - .WillOnce(Invoke(&callback, - &RequestLockTextChangeTestCallback::OnTextChange)); - EXPECT_CALL(text_input_client_, InsertText(_)) - .WillOnce(Invoke(&callback, - &RequestLockTextChangeTestCallback::InsertText)); - EXPECT_CALL(text_input_client_, SetCompositionText(_)) - .WillOnce(Invoke(&callback, - &RequestLockTextChangeTestCallback::SetCompositionText)); - - HRESULT result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READWRITE, &result)); - EXPECT_EQ(S_OK, result); -} - -class SelectionTestCallback : public TSFTextStoreTestCallback { - public: - explicit SelectionTestCallback(TSFTextStore* text_store) - : TSFTextStoreTestCallback(text_store) {} - - HRESULT ReadLockGranted(DWORD flags) { - SetInternalState(L"", 0, 0, 0); - - GetSelectionTest(0, 0); - SetSelectionTest(0, 0, TF_E_NOLOCK); - - SetInternalState(L"012345", 0, 0, 3); - - GetSelectionTest(0, 3); - SetSelectionTest(0, 0, TF_E_NOLOCK); - - return S_OK; - } - - HRESULT ReadWriteLockGranted(DWORD flags) { - SetInternalState(L"", 0, 0, 0); - - SetSelectionTest(0, 0, S_OK); - GetSelectionTest(0, 0); - SetSelectionTest(0, 1, TF_E_INVALIDPOS); - SetSelectionTest(1, 0, TF_E_INVALIDPOS); - SetSelectionTest(1, 1, TF_E_INVALIDPOS); - - SetInternalState(L"0123456", 3, 3, 3); - - SetSelectionTest(0, 0, TF_E_INVALIDPOS); - SetSelectionTest(0, 1, TF_E_INVALIDPOS); - SetSelectionTest(0, 3, TF_E_INVALIDPOS); - SetSelectionTest(0, 6, TF_E_INVALIDPOS); - SetSelectionTest(0, 7, TF_E_INVALIDPOS); - SetSelectionTest(0, 8, TF_E_INVALIDPOS); - - SetSelectionTest(1, 0, TF_E_INVALIDPOS); - SetSelectionTest(1, 1, TF_E_INVALIDPOS); - SetSelectionTest(1, 3, TF_E_INVALIDPOS); - SetSelectionTest(1, 6, TF_E_INVALIDPOS); - SetSelectionTest(1, 7, TF_E_INVALIDPOS); - SetSelectionTest(1, 8, TF_E_INVALIDPOS); - - SetSelectionTest(3, 0, TF_E_INVALIDPOS); - SetSelectionTest(3, 1, TF_E_INVALIDPOS); - SetSelectionTest(3, 3, S_OK); - SetSelectionTest(3, 6, S_OK); - SetSelectionTest(3, 7, S_OK); - SetSelectionTest(3, 8, TF_E_INVALIDPOS); - - SetSelectionTest(6, 0, TF_E_INVALIDPOS); - SetSelectionTest(6, 1, TF_E_INVALIDPOS); - SetSelectionTest(6, 3, TF_E_INVALIDPOS); - SetSelectionTest(6, 6, S_OK); - SetSelectionTest(6, 7, S_OK); - SetSelectionTest(6, 8, TF_E_INVALIDPOS); - - SetSelectionTest(7, 0, TF_E_INVALIDPOS); - SetSelectionTest(7, 1, TF_E_INVALIDPOS); - SetSelectionTest(7, 3, TF_E_INVALIDPOS); - SetSelectionTest(7, 6, TF_E_INVALIDPOS); - SetSelectionTest(7, 7, S_OK); - SetSelectionTest(7, 8, TF_E_INVALIDPOS); - - SetSelectionTest(8, 0, TF_E_INVALIDPOS); - SetSelectionTest(8, 1, TF_E_INVALIDPOS); - SetSelectionTest(8, 3, TF_E_INVALIDPOS); - SetSelectionTest(8, 6, TF_E_INVALIDPOS); - SetSelectionTest(8, 7, TF_E_INVALIDPOS); - SetSelectionTest(8, 8, TF_E_INVALIDPOS); - - return S_OK; - } -}; - -TEST_F(TSFTextStoreTest, SetGetSelectionTest) { - SelectionTestCallback callback(text_store_); - EXPECT_CALL(*sink_, OnLockGranted(_)) - .WillOnce(Invoke(&callback, &SelectionTestCallback::ReadLockGranted)) - .WillOnce(Invoke(&callback, - &SelectionTestCallback::ReadWriteLockGranted)); - - TS_SELECTION_ACP selection_buffer = {}; - ULONG fetched_count = 0; - EXPECT_EQ(TS_E_NOLOCK, - text_store_->GetSelection(0, 1, &selection_buffer, - &fetched_count)); - - HRESULT result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ, &result)); - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READWRITE, &result)); -} - -class SetGetTextTestCallback : public TSFTextStoreTestCallback { - public: - explicit SetGetTextTestCallback(TSFTextStore* text_store) - : TSFTextStoreTestCallback(text_store) {} - - HRESULT ReadLockGranted(DWORD flags) { - SetTextTest(0, 0, L"", TF_E_NOLOCK); - - GetTextTest(0, -1, L"", 0); - GetTextTest(0, 0, L"", 0); - GetTextErrorTest(0, 1, TF_E_INVALIDPOS); - - SetInternalState(L"0123456", 3, 3, 3); - - GetTextErrorTest(-1, -1, TF_E_INVALIDPOS); - GetTextErrorTest(-1, 0, TF_E_INVALIDPOS); - GetTextErrorTest(-1, 1, TF_E_INVALIDPOS); - GetTextErrorTest(-1, 3, TF_E_INVALIDPOS); - GetTextErrorTest(-1, 6, TF_E_INVALIDPOS); - GetTextErrorTest(-1, 7, TF_E_INVALIDPOS); - GetTextErrorTest(-1, 8, TF_E_INVALIDPOS); - - GetTextTest(0, -1, L"0123456", 7); - GetTextTest(0, 0, L"", 0); - GetTextTest(0, 1, L"0", 1); - GetTextTest(0, 3, L"012", 3); - GetTextTest(0, 6, L"012345", 6); - GetTextTest(0, 7, L"0123456", 7); - GetTextErrorTest(0, 8, TF_E_INVALIDPOS); - - GetTextTest(1, -1, L"123456", 7); - GetTextErrorTest(1, 0, TF_E_INVALIDPOS); - GetTextTest(1, 1, L"", 1); - GetTextTest(1, 3, L"12", 3); - GetTextTest(1, 6, L"12345", 6); - GetTextTest(1, 7, L"123456", 7); - GetTextErrorTest(1, 8, TF_E_INVALIDPOS); - - GetTextTest(3, -1, L"3456", 7); - GetTextErrorTest(3, 0, TF_E_INVALIDPOS); - GetTextErrorTest(3, 1, TF_E_INVALIDPOS); - GetTextTest(3, 3, L"", 3); - GetTextTest(3, 6, L"345", 6); - GetTextTest(3, 7, L"3456", 7); - GetTextErrorTest(3, 8, TF_E_INVALIDPOS); - - GetTextTest(6, -1, L"6", 7); - GetTextErrorTest(6, 0, TF_E_INVALIDPOS); - GetTextErrorTest(6, 1, TF_E_INVALIDPOS); - GetTextErrorTest(6, 3, TF_E_INVALIDPOS); - GetTextTest(6, 6, L"", 6); - GetTextTest(6, 7, L"6", 7); - GetTextErrorTest(6, 8, TF_E_INVALIDPOS); - - GetTextTest(7, -1, L"", 7); - GetTextErrorTest(7, 0, TF_E_INVALIDPOS); - GetTextErrorTest(7, 1, TF_E_INVALIDPOS); - GetTextErrorTest(7, 3, TF_E_INVALIDPOS); - GetTextErrorTest(7, 6, TF_E_INVALIDPOS); - GetTextTest(7, 7, L"", 7); - GetTextErrorTest(7, 8, TF_E_INVALIDPOS); - - GetTextErrorTest(8, -1, TF_E_INVALIDPOS); - GetTextErrorTest(8, 0, TF_E_INVALIDPOS); - GetTextErrorTest(8, 1, TF_E_INVALIDPOS); - GetTextErrorTest(8, 3, TF_E_INVALIDPOS); - GetTextErrorTest(8, 6, TF_E_INVALIDPOS); - GetTextErrorTest(8, 7, TF_E_INVALIDPOS); - GetTextErrorTest(8, 8, TF_E_INVALIDPOS); - - return S_OK; - } - - HRESULT ReadWriteLockGranted(DWORD flags) { - SetInternalState(L"", 0, 0, 0); - SetTextTest(0, 0, L"", S_OK); - - SetInternalState(L"", 0, 0, 0); - SetTextTest(0, 1, L"", TS_E_INVALIDPOS); - - SetInternalState(L"0123456", 3, 3, 3); - - SetTextTest(0, 0, L"", TS_E_INVALIDPOS); - SetTextTest(0, 1, L"", TS_E_INVALIDPOS); - SetTextTest(0, 3, L"", TS_E_INVALIDPOS); - SetTextTest(0, 6, L"", TS_E_INVALIDPOS); - SetTextTest(0, 7, L"", TS_E_INVALIDPOS); - SetTextTest(0, 8, L"", TS_E_INVALIDPOS); - - SetTextTest(1, 0, L"", TS_E_INVALIDPOS); - SetTextTest(1, 1, L"", TS_E_INVALIDPOS); - SetTextTest(1, 3, L"", TS_E_INVALIDPOS); - SetTextTest(1, 6, L"", TS_E_INVALIDPOS); - SetTextTest(1, 7, L"", TS_E_INVALIDPOS); - SetTextTest(1, 8, L"", TS_E_INVALIDPOS); - - SetTextTest(3, 0, L"", TS_E_INVALIDPOS); - SetTextTest(3, 1, L"", TS_E_INVALIDPOS); - - SetTextTest(3, 3, L"", S_OK); - GetTextTest(0, -1, L"0123456", 7); - GetSelectionTest(3, 3); - SetInternalState(L"0123456", 3, 3, 3); - - SetTextTest(3, 6, L"", S_OK); - GetTextTest(0, -1, L"0126", 4); - GetSelectionTest(3, 3); - SetInternalState(L"0123456", 3, 3, 3); - - SetTextTest(3, 7, L"", S_OK); - GetTextTest(0, -1, L"012", 3); - GetSelectionTest(3, 3); - SetInternalState(L"0123456", 3, 3, 3); - - SetTextTest(3, 8, L"", TS_E_INVALIDPOS); - - SetTextTest(6, 0, L"", TS_E_INVALIDPOS); - SetTextTest(6, 1, L"", TS_E_INVALIDPOS); - SetTextTest(6, 3, L"", TS_E_INVALIDPOS); - - SetTextTest(6, 6, L"", S_OK); - GetTextTest(0, -1, L"0123456", 7); - GetSelectionTest(6, 6); - SetInternalState(L"0123456", 3, 3, 3); - - SetTextTest(6, 7, L"", S_OK); - GetTextTest(0, -1, L"012345", 6); - GetSelectionTest(6, 6); - SetInternalState(L"0123456", 3, 3, 3); - - SetTextTest(6, 8, L"", TS_E_INVALIDPOS); - - SetTextTest(7, 0, L"", TS_E_INVALIDPOS); - SetTextTest(7, 1, L"", TS_E_INVALIDPOS); - SetTextTest(7, 3, L"", TS_E_INVALIDPOS); - SetTextTest(7, 6, L"", TS_E_INVALIDPOS); - - SetTextTest(7, 7, L"", S_OK); - GetTextTest(0, -1, L"0123456", 7); - GetSelectionTest(7, 7); - SetInternalState(L"0123456", 3, 3, 3); - - SetTextTest(7, 8, L"", TS_E_INVALIDPOS); - - SetInternalState(L"0123456", 3, 3, 3); - SetTextTest(3, 3, L"abc", S_OK); - GetTextTest(0, -1, L"012abc3456", 10); - GetSelectionTest(3, 6); - - SetInternalState(L"0123456", 3, 3, 3); - SetTextTest(3, 6, L"abc", S_OK); - GetTextTest(0, -1, L"012abc6", 7); - GetSelectionTest(3, 6); - - SetInternalState(L"0123456", 3, 3, 3); - SetTextTest(3, 7, L"abc", S_OK); - GetTextTest(0, -1, L"012abc", 6); - GetSelectionTest(3, 6); - - SetInternalState(L"0123456", 3, 3, 3); - SetTextTest(6, 6, L"abc", S_OK); - GetTextTest(0, -1, L"012345abc6", 10); - GetSelectionTest(6, 9); - - SetInternalState(L"0123456", 3, 3, 3); - SetTextTest(6, 7, L"abc", S_OK); - GetTextTest(0, -1, L"012345abc", 9); - GetSelectionTest(6, 9); - - SetInternalState(L"0123456", 3, 3, 3); - SetTextTest(7, 7, L"abc", S_OK); - GetTextTest(0, -1, L"0123456abc", 10); - GetSelectionTest(7, 10); - - return S_OK; - } - - private: - DISALLOW_COPY_AND_ASSIGN(SetGetTextTestCallback); -}; - -TEST_F(TSFTextStoreTest, SetGetTextTest) { - SetGetTextTestCallback callback(text_store_); - EXPECT_CALL(*sink_, OnLockGranted(_)) - .WillOnce(Invoke(&callback, &SetGetTextTestCallback::ReadLockGranted)) - .WillOnce(Invoke(&callback, - &SetGetTextTestCallback::ReadWriteLockGranted)); - - wchar_t buffer[1024] = {}; - ULONG text_buffer_copied = 0; - TS_RUNINFO run_info = {}; - ULONG run_info_buffer_copied = 0; - LONG next_acp = 0; - EXPECT_EQ(TF_E_NOLOCK, - text_store_->GetText(0, -1, buffer, 1024, &text_buffer_copied, - &run_info, 1, &run_info_buffer_copied, - &next_acp)); - TS_TEXTCHANGE change = {}; - EXPECT_EQ(TF_E_NOLOCK, text_store_->SetText(0, 0, 0, L"abc", 3, &change)); - - HRESULT result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ, &result)); - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READWRITE, &result)); -} - -class InsertTextAtSelectionTestCallback : public TSFTextStoreTestCallback { - public: - explicit InsertTextAtSelectionTestCallback(TSFTextStore* text_store) - : TSFTextStoreTestCallback(text_store) {} - - HRESULT ReadLockGranted(DWORD flags) { - const wchar_t kBuffer[] = L"0123456789"; - - SetInternalState(L"abcedfg", 0, 0, 0); - InsertTextAtSelectionQueryOnlyTest(kBuffer, 10, 0, 0); - GetSelectionTest(0, 0); - InsertTextAtSelectionQueryOnlyTest(kBuffer, 0, 0, 0); - - SetInternalState(L"abcedfg", 0, 2, 5); - InsertTextAtSelectionQueryOnlyTest(kBuffer, 10, 2, 5); - GetSelectionTest(2, 5); - InsertTextAtSelectionQueryOnlyTest(kBuffer, 0, 2, 5); - - LONG start = 0; - LONG end = 0; - TS_TEXTCHANGE change = {}; - EXPECT_EQ(TS_E_NOLOCK, - text_store_->InsertTextAtSelection(0, kBuffer, 10, - &start, &end, &change)); - return S_OK; - } - - HRESULT ReadWriteLockGranted(DWORD flags) { - SetInternalState(L"abcedfg", 0, 0, 0); - - const wchar_t kBuffer[] = L"0123456789"; - InsertTextAtSelectionQueryOnlyTest(kBuffer, 10, 0, 0); - GetSelectionTest(0, 0); - InsertTextAtSelectionQueryOnlyTest(kBuffer, 0, 0, 0); - - SetInternalState(L"", 0, 0, 0); - InsertTextAtSelectionTest(kBuffer, 10, 0, 10, 0, 0, 10); - GetSelectionTest(0, 10); - GetTextTest(0, -1, L"0123456789", 10); - - SetInternalState(L"abcedfg", 0, 0, 0); - InsertTextAtSelectionTest(kBuffer, 10, 0, 10, 0, 0, 10); - GetSelectionTest(0, 10); - GetTextTest(0, -1, L"0123456789abcedfg", 17); - - SetInternalState(L"abcedfg", 0, 0, 3); - InsertTextAtSelectionTest(kBuffer, 0, 0, 0, 0, 3, 0); - GetSelectionTest(0, 0); - GetTextTest(0, -1, L"edfg", 4); - - SetInternalState(L"abcedfg", 0, 3, 7); - InsertTextAtSelectionTest(kBuffer, 10, 3, 13, 3, 7, 13); - GetSelectionTest(3, 13); - GetTextTest(0, -1, L"abc0123456789", 13); - - SetInternalState(L"abcedfg", 0, 7, 7); - InsertTextAtSelectionTest(kBuffer, 10, 7, 17, 7, 7, 17); - GetSelectionTest(7, 17); - GetTextTest(0, -1, L"abcedfg0123456789", 17); - - return S_OK; - } - - private: - DISALLOW_COPY_AND_ASSIGN(InsertTextAtSelectionTestCallback); -}; - -TEST_F(TSFTextStoreTest, InsertTextAtSelectionTest) { - InsertTextAtSelectionTestCallback callback(text_store_); - EXPECT_CALL(*sink_, OnLockGranted(_)) - .WillOnce(Invoke(&callback, - &InsertTextAtSelectionTestCallback::ReadLockGranted)) - .WillOnce( - Invoke(&callback, - &InsertTextAtSelectionTestCallback::ReadWriteLockGranted)); - - HRESULT result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ, &result)); - EXPECT_EQ(S_OK, result); - result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READWRITE, &result)); - EXPECT_EQ(S_OK, result); -} - -class ScenarioTestCallback : public TSFTextStoreTestCallback { - public: - explicit ScenarioTestCallback(TSFTextStore* text_store) - : TSFTextStoreTestCallback(text_store) {} - - HRESULT LockGranted1(DWORD flags) { - SetSelectionTest(0, 0, S_OK); - - SetTextTest(0, 0, L"abc", S_OK); - SetTextTest(1, 2, L"xyz", S_OK); - - GetTextTest(0, -1, L"axyzc", 5); - - composition_undelines()->clear(); - CompositionUnderline underline; - underline.start_offset = 0; - underline.end_offset = 5; - underline.color = SK_ColorBLACK; - underline.thick = false; - composition_undelines()->push_back(underline); - *edit_flag() = true; - *committed_size() = 0; - return S_OK; - } - - void SetCompositionText1(const ui::CompositionText& composition) { - EXPECT_EQ(L"axyzc", composition.text); - EXPECT_EQ(1, composition.selection.start()); - EXPECT_EQ(4, composition.selection.end()); - ASSERT_EQ(1, composition.underlines.size()); - EXPECT_EQ(SK_ColorBLACK, composition.underlines[0].color); - EXPECT_EQ(0, composition.underlines[0].start_offset); - EXPECT_EQ(5, composition.underlines[0].end_offset); - EXPECT_FALSE(composition.underlines[0].thick); - } - - HRESULT LockGranted2(DWORD flags) { - SetTextTest(3, 4, L"ZCP", S_OK); - GetTextTest(0, -1, L"axyZCPc", 7); - - composition_undelines()->clear(); - CompositionUnderline underline; - underline.start_offset = 3; - underline.end_offset = 5; - underline.color = SK_ColorBLACK; - underline.thick = true; - composition_undelines()->push_back(underline); - underline.start_offset = 5; - underline.end_offset = 7; - underline.color = SK_ColorBLACK; - underline.thick = false; - composition_undelines()->push_back(underline); - - *edit_flag() = true; - *committed_size() = 3; - - return S_OK; - } - - void InsertText2(const string16& text) { - EXPECT_EQ(L"axy", text); - } - - void SetCompositionText2(const ui::CompositionText& composition) { - EXPECT_EQ(L"ZCPc", composition.text); - EXPECT_EQ(0, composition.selection.start()); - EXPECT_EQ(3, composition.selection.end()); - ASSERT_EQ(2, composition.underlines.size()); - EXPECT_EQ(SK_ColorBLACK, composition.underlines[0].color); - EXPECT_EQ(0, composition.underlines[0].start_offset); - EXPECT_EQ(2, composition.underlines[0].end_offset); - EXPECT_TRUE(composition.underlines[0].thick); - EXPECT_EQ(SK_ColorBLACK, composition.underlines[1].color); - EXPECT_EQ(2, composition.underlines[1].start_offset); - EXPECT_EQ(4, composition.underlines[1].end_offset); - EXPECT_FALSE(composition.underlines[1].thick); - } - - HRESULT LockGranted3(DWORD flags) { - GetTextTest(0, -1, L"axyZCPc", 7); - - composition_undelines()->clear(); - *edit_flag() = true; - *committed_size() = 7; - - return S_OK; - } - - void InsertText3(const string16& text) { - EXPECT_EQ(L"ZCPc", text); - } - - void SetCompositionText3(const ui::CompositionText& composition) { - EXPECT_EQ(L"", composition.text); - EXPECT_EQ(0, composition.selection.start()); - EXPECT_EQ(0, composition.selection.end()); - EXPECT_EQ(0, composition.underlines.size()); - } - - private: - DISALLOW_COPY_AND_ASSIGN(ScenarioTestCallback); -}; - -TEST_F(TSFTextStoreTest, ScenarioTest) { - ScenarioTestCallback callback(text_store_); - EXPECT_CALL(text_input_client_, SetCompositionText(_)) - .WillOnce(Invoke(&callback, &ScenarioTestCallback::SetCompositionText1)) - .WillOnce(Invoke(&callback, &ScenarioTestCallback::SetCompositionText2)) - .WillOnce(Invoke(&callback, &ScenarioTestCallback::SetCompositionText3)); - - EXPECT_CALL(text_input_client_, InsertText(_)) - .WillOnce(Invoke(&callback, &ScenarioTestCallback::InsertText2)) - .WillOnce(Invoke(&callback, &ScenarioTestCallback::InsertText3)); - - EXPECT_CALL(*sink_, OnLockGranted(_)) - .WillOnce(Invoke(&callback, &ScenarioTestCallback::LockGranted1)) - .WillOnce(Invoke(&callback, &ScenarioTestCallback::LockGranted2)) - .WillOnce(Invoke(&callback, &ScenarioTestCallback::LockGranted3)); - - // OnSelectionChange will be called once after LockGranted3(). - EXPECT_CALL(*sink_, OnSelectionChange()) - .WillOnce(Return(S_OK)); - - // OnLayoutChange will be called once after LockGranted3(). - EXPECT_CALL(*sink_, OnLayoutChange(_, _)) - .WillOnce(Return(S_OK)); - - // OnTextChange will be called once after LockGranted3(). - EXPECT_CALL(*sink_, OnTextChange(_, _)) - .WillOnce(Return(S_OK)); - - HRESULT result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READWRITE, &result)); - EXPECT_EQ(S_OK, result); - result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READWRITE, &result)); - EXPECT_EQ(S_OK, result); - result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READWRITE, &result)); - EXPECT_EQ(S_OK, result); -} - -class GetTextExtTestCallback : public TSFTextStoreTestCallback { - public: - explicit GetTextExtTestCallback(TSFTextStore* text_store) - : TSFTextStoreTestCallback(text_store), - layout_prepared_character_num_(0) {} - - HRESULT LockGranted(DWORD flags) { - SetInternalState(L"0123456789012", 0, 0, 0); - layout_prepared_character_num_ = 13; - - TsViewCookie view_cookie = 0; - EXPECT_EQ(S_OK, text_store_->GetActiveView(&view_cookie)); - GetTextExtTest(view_cookie, 0, 0, 11, 12, 11, 20); - GetTextExtTest(view_cookie, 0, 1, 11, 12, 20, 20); - GetTextExtTest(view_cookie, 0, 2, 11, 12, 30, 20); - GetTextExtTest(view_cookie, 9, 9, 100, 12, 100, 20); - GetTextExtTest(view_cookie, 9, 10, 101, 12, 110, 20); - GetTextExtTest(view_cookie, 10, 10, 110, 12, 110, 20); - GetTextExtTest(view_cookie, 11, 11, 20, 112, 20, 120); - GetTextExtTest(view_cookie, 11, 12, 21, 112, 30, 120); - GetTextExtTest(view_cookie, 9, 12, 101, 12, 30, 120); - GetTextExtTest(view_cookie, 9, 13, 101, 12, 40, 120); - GetTextExtTest(view_cookie, 0, 13, 11, 12, 40, 120); - GetTextExtTest(view_cookie, 13, 13, 40, 112, 40, 120); - - layout_prepared_character_num_ = 12; - GetTextExtNoLayoutTest(view_cookie, 13, 13); - - layout_prepared_character_num_ = 0; - GetTextExtNoLayoutTest(view_cookie, 0, 0); - - SetInternalState(L"", 0, 0, 0); - GetTextExtTest(view_cookie, 0, 0, 1, 2, 4, 6); - - // Last character is not availabe due to timing issue of async API. - // In this case, we will get first character bounds instead of whole text - // bounds. - SetInternalState(L"abc", 0, 0, 3); - layout_prepared_character_num_ = 2; - GetTextExtTest(view_cookie, 0, 0, 11, 12, 11, 20); - - // TODO(nona, kinaba): Remove following test case after PPAPI supporting - // GetCompositionCharacterBounds. - SetInternalState(L"a", 0, 0, 1); - layout_prepared_character_num_ = 0; - GetTextExtTest(view_cookie, 0, 1, 1, 2, 4, 6); - return S_OK; - } - - bool GetCompositionCharacterBounds(uint32 index, gfx::Rect* rect) { - if (index >= layout_prepared_character_num_) - return false; - rect->set_x((index % 10) * 10 + 11); - rect->set_y((index / 10) * 100 + 12); - rect->set_width(9); - rect->set_height(8); - return true; - } - - gfx::Rect GetCaretBounds() { - return gfx::Rect(1, 2, 3, 4); - } - - private: - uint32 layout_prepared_character_num_; - - DISALLOW_COPY_AND_ASSIGN(GetTextExtTestCallback); -}; - -TEST_F(TSFTextStoreTest, GetTextExtTest) { - GetTextExtTestCallback callback(text_store_); - EXPECT_CALL(text_input_client_, GetCaretBounds()) - .WillRepeatedly(Invoke(&callback, - &GetTextExtTestCallback::GetCaretBounds)); - - EXPECT_CALL(text_input_client_, GetCompositionCharacterBounds(_, _)) - .WillRepeatedly( - Invoke(&callback, - &GetTextExtTestCallback::GetCompositionCharacterBounds)); - - EXPECT_CALL(*sink_, OnLockGranted(_)) - .WillOnce(Invoke(&callback, &GetTextExtTestCallback::LockGranted)); - - HRESULT result = kInvalidResult; - EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ, &result)); - EXPECT_EQ(S_OK, result); -} - -TEST_F(TSFTextStoreTest, RequestSupportedAttrs) { - EXPECT_CALL(text_input_client_, GetTextInputType()) - .WillRepeatedly(Return(TEXT_INPUT_TYPE_TEXT)); - EXPECT_CALL(text_input_client_, GetTextInputMode()) - .WillRepeatedly(Return(TEXT_INPUT_MODE_DEFAULT)); - - EXPECT_HRESULT_FAILED(text_store_->RequestSupportedAttrs(0, 1, NULL)); - - const TS_ATTRID kUnknownAttributes[] = {GUID_NULL}; - EXPECT_HRESULT_FAILED(text_store_->RequestSupportedAttrs( - 0, arraysize(kUnknownAttributes), kUnknownAttributes)) - << "Must fail for unknown attributes"; - - const TS_ATTRID kAttributes[] = {GUID_NULL, GUID_PROP_INPUTSCOPE, GUID_NULL}; - EXPECT_EQ(S_OK, text_store_->RequestSupportedAttrs( - 0, arraysize(kAttributes), kAttributes)) - << "InputScope must be supported"; - - { - SCOPED_TRACE("Check if RequestSupportedAttrs fails while focus is lost"); - // Emulate focus lost - text_store_->SetFocusedTextInputClient(NULL, NULL); - EXPECT_HRESULT_FAILED(text_store_->RequestSupportedAttrs(0, 0, NULL)); - EXPECT_HRESULT_FAILED(text_store_->RequestSupportedAttrs( - 0, arraysize(kAttributes), kAttributes)); - } -} - -TEST_F(TSFTextStoreTest, RetrieveRequestedAttrs) { - EXPECT_CALL(text_input_client_, GetTextInputType()) - .WillRepeatedly(Return(TEXT_INPUT_TYPE_TEXT)); - EXPECT_CALL(text_input_client_, GetTextInputMode()) - .WillRepeatedly(Return(TEXT_INPUT_MODE_DEFAULT)); - - ULONG num_copied = 0xfffffff; - EXPECT_HRESULT_FAILED(text_store_->RetrieveRequestedAttrs( - 1, NULL, &num_copied)); - - { - SCOPED_TRACE("Make sure if InputScope is supported"); - TS_ATTRVAL buffer[2] = {}; - num_copied = 0xfffffff; - ASSERT_EQ(S_OK, text_store_->RetrieveRequestedAttrs( - arraysize(buffer), buffer, &num_copied)); - bool input_scope_found = false; - for (size_t i = 0; i < num_copied; ++i) { - base::win::ScopedVariant variant; - // Move ownership from |buffer[i].varValue| to |variant|. - std::swap(*variant.Receive(), buffer[i].varValue); - if (IsEqualGUID(buffer[i].idAttr, GUID_PROP_INPUTSCOPE)) { - EXPECT_EQ(VT_UNKNOWN, variant.type()); - base::win::ScopedComPtr<ITfInputScope> input_scope; - EXPECT_HRESULT_SUCCEEDED(input_scope.QueryFrom((&variant)->punkVal)); - input_scope_found = true; - // we do not break here to clean up all the retrieved VARIANTs. - } - } - EXPECT_TRUE(input_scope_found); - } - { - SCOPED_TRACE("Check if RetrieveRequestedAttrs fails while focus is lost"); - // Emulate focus lost - text_store_->SetFocusedTextInputClient(NULL, NULL); - num_copied = 0xfffffff; - TS_ATTRVAL buffer[2] = {}; - EXPECT_HRESULT_FAILED(text_store_->RetrieveRequestedAttrs( - arraysize(buffer), buffer, &num_copied)); - } -} - -} // namespace -} // namespace ui diff --git a/chromium/ui/base/l10n/formatter.cc b/chromium/ui/base/l10n/formatter.cc new file mode 100644 index 00000000000..14f49ae3c93 --- /dev/null +++ b/chromium/ui/base/l10n/formatter.cc @@ -0,0 +1,327 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/l10n/formatter.h" + +#include <vector> + +#include "base/logging.h" +#include "grit/ui_strings.h" +#include "third_party/icu/source/common/unicode/unistr.h" +#include "ui/base/l10n/l10n_util_plurals.h" + +namespace ui { + +UI_BASE_EXPORT bool formatter_force_fallback = false; + +static const size_t kNumberPluralities = 6; +struct Pluralities { + int ids[kNumberPluralities]; + const char* fallback_one; + const char* fallback_other; +}; + +static const Pluralities IDS_ELAPSED_SHORT_SEC = { + { IDS_TIME_ELAPSED_SECS_DEFAULT, IDS_TIME_ELAPSED_SECS_SINGULAR, + IDS_TIME_ELAPSED_SECS_ZERO, IDS_TIME_ELAPSED_SECS_TWO, + IDS_TIME_ELAPSED_SECS_FEW, IDS_TIME_ELAPSED_SECS_MANY }, + "one{# sec ago}", + " other{# secs ago}" +}; +static const Pluralities IDS_ELAPSED_SHORT_MIN = { + { IDS_TIME_ELAPSED_MINS_DEFAULT, IDS_TIME_ELAPSED_MINS_SINGULAR, + IDS_TIME_ELAPSED_MINS_ZERO, IDS_TIME_ELAPSED_MINS_TWO, + IDS_TIME_ELAPSED_MINS_FEW, IDS_TIME_ELAPSED_MINS_MANY }, + "one{# min ago}", + " other{# mins ago}" +}; +static const Pluralities IDS_ELAPSED_HOUR = { + { IDS_TIME_ELAPSED_HOURS_DEFAULT, IDS_TIME_ELAPSED_HOURS_SINGULAR, + IDS_TIME_ELAPSED_HOURS_ZERO, IDS_TIME_ELAPSED_HOURS_TWO, + IDS_TIME_ELAPSED_HOURS_FEW, IDS_TIME_ELAPSED_HOURS_MANY }, + "one{# hour ago}", + " other{# hours ago}" +}; +static const Pluralities IDS_ELAPSED_DAY = { + { IDS_TIME_ELAPSED_DAYS_DEFAULT, IDS_TIME_ELAPSED_DAYS_SINGULAR, + IDS_TIME_ELAPSED_DAYS_ZERO, IDS_TIME_ELAPSED_DAYS_TWO, + IDS_TIME_ELAPSED_DAYS_FEW, IDS_TIME_ELAPSED_DAYS_MANY }, + "one{# day ago}", + " other{# days ago}" +}; + +static const Pluralities IDS_REMAINING_SHORT_SEC = { + { IDS_TIME_REMAINING_SECS_DEFAULT, IDS_TIME_REMAINING_SECS_SINGULAR, + IDS_TIME_REMAINING_SECS_ZERO, IDS_TIME_REMAINING_SECS_TWO, + IDS_TIME_REMAINING_SECS_FEW, IDS_TIME_REMAINING_SECS_MANY }, + "one{# sec left}", + " other{# secs left}" +}; +static const Pluralities IDS_REMAINING_SHORT_MIN = { + { IDS_TIME_REMAINING_MINS_DEFAULT, IDS_TIME_REMAINING_MINS_SINGULAR, + IDS_TIME_REMAINING_MINS_ZERO, IDS_TIME_REMAINING_MINS_TWO, + IDS_TIME_REMAINING_MINS_FEW, IDS_TIME_REMAINING_MINS_MANY }, + "one{# min left}", + " other{# mins left}" +}; + +static const Pluralities IDS_REMAINING_LONG_SEC = { + { IDS_TIME_REMAINING_LONG_SECS_DEFAULT, IDS_TIME_REMAINING_LONG_SECS_SINGULAR, + IDS_TIME_REMAINING_LONG_SECS_ZERO, IDS_TIME_REMAINING_LONG_SECS_TWO, + IDS_TIME_REMAINING_LONG_SECS_FEW, IDS_TIME_REMAINING_LONG_SECS_MANY }, + "one{# second left}", + " other{# seconds left}" +}; +static const Pluralities IDS_REMAINING_LONG_MIN = { + { IDS_TIME_REMAINING_LONG_MINS_DEFAULT, IDS_TIME_REMAINING_LONG_MINS_SINGULAR, + IDS_TIME_REMAINING_LONG_MINS_ZERO, IDS_TIME_REMAINING_LONG_MINS_TWO, + IDS_TIME_REMAINING_LONG_MINS_FEW, IDS_TIME_REMAINING_LONG_MINS_MANY }, + "one{# minute left}", + " other{# minutes left}" +}; +static const Pluralities IDS_REMAINING_HOUR = { + { IDS_TIME_REMAINING_HOURS_DEFAULT, IDS_TIME_REMAINING_HOURS_SINGULAR, + IDS_TIME_REMAINING_HOURS_ZERO, IDS_TIME_REMAINING_HOURS_TWO, + IDS_TIME_REMAINING_HOURS_FEW, IDS_TIME_REMAINING_HOURS_MANY }, + "one{# hour left}", + " other{# hours left}" +}; +static const Pluralities IDS_REMAINING_DAY = { + { IDS_TIME_REMAINING_DAYS_DEFAULT, IDS_TIME_REMAINING_DAYS_SINGULAR, + IDS_TIME_REMAINING_DAYS_ZERO, IDS_TIME_REMAINING_DAYS_TWO, + IDS_TIME_REMAINING_DAYS_FEW, IDS_TIME_REMAINING_DAYS_MANY }, + "one{# day left}", + " other{# days left}" +}; + +static const Pluralities IDS_DURATION_SHORT_SEC = { + { IDS_TIME_SECS_DEFAULT, IDS_TIME_SECS_SINGULAR, IDS_TIME_SECS_ZERO, + IDS_TIME_SECS_TWO, IDS_TIME_SECS_FEW, IDS_TIME_SECS_MANY }, + "one{# sec}", + " other{# secs}" +}; +static const Pluralities IDS_DURATION_SHORT_MIN = { + { IDS_TIME_MINS_DEFAULT, IDS_TIME_MINS_SINGULAR, IDS_TIME_MINS_ZERO, + IDS_TIME_MINS_TWO, IDS_TIME_MINS_FEW, IDS_TIME_MINS_MANY }, + "one{# min}", + " other{# mins}" +}; + +static const Pluralities IDS_LONG_SEC = { + { IDS_TIME_LONG_SECS_DEFAULT, IDS_TIME_LONG_SECS_SINGULAR, + IDS_TIME_LONG_SECS_ZERO, IDS_TIME_LONG_SECS_TWO, + IDS_TIME_LONG_SECS_FEW, IDS_TIME_LONG_SECS_MANY }, + "one{# second}", + " other{# seconds}" +}; +static const Pluralities IDS_LONG_MIN = { + { IDS_TIME_LONG_MINS_DEFAULT, IDS_TIME_LONG_MINS_SINGULAR, + IDS_TIME_LONG_MINS_ZERO, IDS_TIME_LONG_MINS_TWO, + IDS_TIME_LONG_MINS_FEW, IDS_TIME_LONG_MINS_MANY }, + "one{# minute}", + " other{# minutes}" +}; +static const Pluralities IDS_DURATION_HOUR = { + { IDS_TIME_HOURS_DEFAULT, IDS_TIME_HOURS_SINGULAR, IDS_TIME_HOURS_ZERO, + IDS_TIME_HOURS_TWO, IDS_TIME_HOURS_FEW, IDS_TIME_HOURS_MANY }, + "one{# hour}", + " other{# hours}" +}; +static const Pluralities IDS_DURATION_DAY = { + { IDS_TIME_DAYS_DEFAULT, IDS_TIME_DAYS_SINGULAR, IDS_TIME_DAYS_ZERO, + IDS_TIME_DAYS_TWO, IDS_TIME_DAYS_FEW, IDS_TIME_DAYS_MANY }, + "one{# day}", + " other{# days}" +}; + +static const Pluralities IDS_LONG_MIN_1ST = { + { IDS_TIME_LONG_MINS_1ST_DEFAULT, IDS_TIME_LONG_MINS_1ST_SINGULAR, + IDS_TIME_LONG_MINS_1ST_ZERO, IDS_TIME_LONG_MINS_1ST_TWO, + IDS_TIME_LONG_MINS_1ST_FEW, IDS_TIME_LONG_MINS_1ST_MANY }, + "one{# minute }", + " other{# minutes }" +}; +static const Pluralities IDS_LONG_SEC_2ND = { + { IDS_TIME_LONG_SECS_2ND_DEFAULT, IDS_TIME_LONG_SECS_2ND_SINGULAR, + IDS_TIME_LONG_SECS_2ND_ZERO, IDS_TIME_LONG_SECS_2ND_TWO, + IDS_TIME_LONG_SECS_2ND_FEW, IDS_TIME_LONG_SECS_2ND_MANY }, + "one{# second}", + " other{# seconds}" +}; +static const Pluralities IDS_DURATION_HOUR_1ST = { + { IDS_TIME_HOURS_1ST_DEFAULT, IDS_TIME_HOURS_1ST_SINGULAR, + IDS_TIME_HOURS_1ST_ZERO, IDS_TIME_HOURS_1ST_TWO, + IDS_TIME_HOURS_1ST_FEW, IDS_TIME_HOURS_1ST_MANY }, + "one{# hour }", + " other{# hours }" +}; +static const Pluralities IDS_LONG_MIN_2ND = { + { IDS_TIME_LONG_MINS_2ND_DEFAULT, IDS_TIME_LONG_MINS_2ND_SINGULAR, + IDS_TIME_LONG_MINS_2ND_ZERO, IDS_TIME_LONG_MINS_2ND_TWO, + IDS_TIME_LONG_MINS_2ND_FEW, IDS_TIME_LONG_MINS_2ND_MANY }, + "one{# minute}", + " other{# minutes}" +}; +static const Pluralities IDS_DURATION_DAY_1ST = { + { IDS_TIME_DAYS_1ST_DEFAULT, IDS_TIME_DAYS_1ST_SINGULAR, + IDS_TIME_DAYS_1ST_ZERO, IDS_TIME_DAYS_1ST_TWO, + IDS_TIME_DAYS_1ST_FEW, IDS_TIME_DAYS_1ST_MANY }, + "one{# day }", + " other{# days }" +}; +static const Pluralities IDS_DURATION_HOUR_2ND = { + { IDS_TIME_HOURS_2ND_DEFAULT, IDS_TIME_HOURS_2ND_SINGULAR, + IDS_TIME_HOURS_2ND_ZERO, IDS_TIME_HOURS_2ND_TWO, + IDS_TIME_HOURS_2ND_FEW, IDS_TIME_HOURS_2ND_MANY }, + "one{# hour}", + " other{# hours}" +}; + +Formatter::Formatter(const Pluralities& sec_pluralities, + const Pluralities& min_pluralities, + const Pluralities& hour_pluralities, + const Pluralities& day_pluralities) { + simple_format_[UNIT_SEC] = InitFormat(sec_pluralities); + simple_format_[UNIT_MIN] = InitFormat(min_pluralities); + simple_format_[UNIT_HOUR] = InitFormat(hour_pluralities); + simple_format_[UNIT_DAY] = InitFormat(day_pluralities); +} + +Formatter::Formatter(const Pluralities& sec_pluralities, + const Pluralities& min_pluralities, + const Pluralities& hour_pluralities, + const Pluralities& day_pluralities, + const Pluralities& min_sec_pluralities1, + const Pluralities& min_sec_pluralities2, + const Pluralities& hour_min_pluralities1, + const Pluralities& hour_min_pluralities2, + const Pluralities& day_hour_pluralities1, + const Pluralities& day_hour_pluralities2) { + simple_format_[UNIT_SEC] = InitFormat(sec_pluralities); + simple_format_[UNIT_MIN] = InitFormat(min_pluralities); + simple_format_[UNIT_HOUR] = InitFormat(hour_pluralities); + simple_format_[UNIT_DAY] = InitFormat(day_pluralities); + detailed_format_[TWO_UNITS_MIN_SEC][0] = InitFormat(min_sec_pluralities1); + detailed_format_[TWO_UNITS_MIN_SEC][1] = InitFormat(min_sec_pluralities2); + detailed_format_[TWO_UNITS_HOUR_MIN][0] = InitFormat(hour_min_pluralities1); + detailed_format_[TWO_UNITS_HOUR_MIN][1] = InitFormat(hour_min_pluralities2); + detailed_format_[TWO_UNITS_DAY_HOUR][0] = InitFormat(day_hour_pluralities1); + detailed_format_[TWO_UNITS_DAY_HOUR][1] = InitFormat(day_hour_pluralities2); +} + +void Formatter::Format(Unit unit, + int value, + icu::UnicodeString& formatted_string) const { + DCHECK(simple_format_[unit]); + UErrorCode error = U_ZERO_ERROR; + formatted_string = simple_format_[unit]->format(value, error); + DCHECK(U_SUCCESS(error)) << "Error in icu::PluralFormat::format()."; + return; +} + +void Formatter::Format(TwoUnits units, + int value_1, + int value_2, + icu::UnicodeString& formatted_string) const { + DCHECK(detailed_format_[units][0]) + << "Detailed() not implemented for your (format, length) combination!"; + DCHECK(detailed_format_[units][1]) + << "Detailed() not implemented for your (format, length) combination!"; + UErrorCode error = U_ZERO_ERROR; + formatted_string = detailed_format_[units][0]->format(value_1, error); + DCHECK(U_SUCCESS(error)); + formatted_string += detailed_format_[units][1]->format(value_2, error); + DCHECK(U_SUCCESS(error)); + return; +} + +scoped_ptr<icu::PluralFormat> Formatter::CreateFallbackFormat( + const icu::PluralRules& rules, + const Pluralities& pluralities) const { + icu::UnicodeString pattern; + if (rules.isKeyword(UNICODE_STRING_SIMPLE("one"))) + pattern += icu::UnicodeString(pluralities.fallback_one); + pattern += icu::UnicodeString(pluralities.fallback_other); + + UErrorCode error = U_ZERO_ERROR; + scoped_ptr<icu::PluralFormat> format( + new icu::PluralFormat(rules, pattern, error)); + DCHECK(U_SUCCESS(error)); + return format.Pass(); +} + +scoped_ptr<icu::PluralFormat> Formatter::InitFormat( + const Pluralities& pluralities) { + if (!formatter_force_fallback) { + icu::UnicodeString pattern; + std::vector<int> ids; + for (size_t j = 0; j < kNumberPluralities; ++j) + ids.push_back(pluralities.ids[j]); + scoped_ptr<icu::PluralFormat> format = l10n_util::BuildPluralFormat(ids); + if (format.get()) + return format.Pass(); + } + + scoped_ptr<icu::PluralRules> rules(l10n_util::BuildPluralRules()); + return CreateFallbackFormat(*rules, pluralities); +} + +const Formatter* FormatterContainer::Get(TimeFormat::Format format, + TimeFormat::Length length) const { + DCHECK(formatter_[format][length]) + << "Combination of FORMAT_ELAPSED and LENGTH_LONG is not implemented!"; + return formatter_[format][length].get(); +} + +FormatterContainer::FormatterContainer() { + Initialize(); +} + +FormatterContainer::~FormatterContainer() { +} + +void FormatterContainer::Initialize() { + formatter_[TimeFormat::FORMAT_ELAPSED][TimeFormat::LENGTH_SHORT].reset( + new Formatter(IDS_ELAPSED_SHORT_SEC, + IDS_ELAPSED_SHORT_MIN, + IDS_ELAPSED_HOUR, + IDS_ELAPSED_DAY)); + formatter_[TimeFormat::FORMAT_ELAPSED][TimeFormat::LENGTH_LONG].reset(); + formatter_[TimeFormat::FORMAT_REMAINING][TimeFormat::LENGTH_SHORT].reset( + new Formatter(IDS_REMAINING_SHORT_SEC, + IDS_REMAINING_SHORT_MIN, + IDS_REMAINING_HOUR, + IDS_REMAINING_DAY)); + formatter_[TimeFormat::FORMAT_REMAINING][TimeFormat::LENGTH_LONG].reset( + new Formatter(IDS_REMAINING_LONG_SEC, + IDS_REMAINING_LONG_MIN, + IDS_REMAINING_HOUR, + IDS_REMAINING_DAY)); + formatter_[TimeFormat::FORMAT_DURATION][TimeFormat::LENGTH_SHORT].reset( + new Formatter(IDS_DURATION_SHORT_SEC, + IDS_DURATION_SHORT_MIN, + IDS_DURATION_HOUR, + IDS_DURATION_DAY)); + formatter_[TimeFormat::FORMAT_DURATION][TimeFormat::LENGTH_LONG].reset( + new Formatter(IDS_LONG_SEC, + IDS_LONG_MIN, + IDS_DURATION_HOUR, + IDS_DURATION_DAY, + IDS_LONG_MIN_1ST, + IDS_LONG_SEC_2ND, + IDS_DURATION_HOUR_1ST, + IDS_LONG_MIN_2ND, + IDS_DURATION_DAY_1ST, + IDS_DURATION_HOUR_2ND)); +} + +void FormatterContainer::Shutdown() { + for (int format = 0; format < TimeFormat::FORMAT_COUNT; ++format) { + for (int length = 0; length < TimeFormat::LENGTH_COUNT; ++length) { + formatter_[format][length].reset(); + } + } +} + +} // namespace ui diff --git a/chromium/ui/base/l10n/formatter.h b/chromium/ui/base/l10n/formatter.h new file mode 100644 index 00000000000..de1aa4a79fe --- /dev/null +++ b/chromium/ui/base/l10n/formatter.h @@ -0,0 +1,114 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// This file contains implementation details, the public interface is declared +// in time_format.h. + +#ifndef UI_BASE_L10N_FORMATTER_H_ +#define UI_BASE_L10N_FORMATTER_H_ + +#include "base/basictypes.h" +#include "base/lazy_instance.h" +#include "base/memory/scoped_ptr.h" +#include "third_party/icu/source/common/unicode/unistr.h" +#include "third_party/icu/source/i18n/unicode/plurfmt.h" +#include "third_party/icu/source/i18n/unicode/plurrule.h" +#include "ui/base/l10n/time_format.h" +#include "ui/base/ui_base_export.h" + +namespace ui { + +struct Pluralities; + +// Formatter for a (format, length) combination. May either be instantiated +// with four parameters for use in TimeFormat::Simple() or with ten parameters +// for use in TimeFormat::Detailed(). +class Formatter { + public: + enum Unit { + UNIT_SEC, + UNIT_MIN, + UNIT_HOUR, + UNIT_DAY, + UNIT_COUNT // Enum size counter, not a unit. Must be last. + }; + enum TwoUnits { + TWO_UNITS_MIN_SEC, + TWO_UNITS_HOUR_MIN, + TWO_UNITS_DAY_HOUR, + TWO_UNITS_COUNT // Enum size counter, not a unit pair. Must be last. + }; + + Formatter(const Pluralities& sec_pluralities, + const Pluralities& min_pluralities, + const Pluralities& hour_pluralities, + const Pluralities& day_pluralities); + + Formatter(const Pluralities& sec_pluralities, + const Pluralities& min_pluralities, + const Pluralities& hour_pluralities, + const Pluralities& day_pluralities, + const Pluralities& min_sec_pluralities1, + const Pluralities& min_sec_pluralities2, + const Pluralities& hour_min_pluralities1, + const Pluralities& hour_min_pluralities2, + const Pluralities& day_hour_pluralities1, + const Pluralities& day_hour_pluralities2); + + void Format(Unit unit, int value, icu::UnicodeString& formatted_string) const; + + void Format(TwoUnits units, + int value_1, + int value_2, + icu::UnicodeString& formatted_string) const; + + private: + // Create a hard-coded fallback plural format. This will never be called + // unless translators make a mistake. + scoped_ptr<icu::PluralFormat> CreateFallbackFormat( + const icu::PluralRules& rules, + const Pluralities& pluralities) const; + + scoped_ptr<icu::PluralFormat> InitFormat(const Pluralities& pluralities); + + scoped_ptr<icu::PluralFormat> simple_format_[UNIT_COUNT]; + scoped_ptr<icu::PluralFormat> detailed_format_[TWO_UNITS_COUNT][2]; + + DISALLOW_IMPLICIT_CONSTRUCTORS(Formatter); +}; + +// Class to hold all Formatters, intended to be used in a global LazyInstance. +class UI_BASE_EXPORT FormatterContainer { + public: + FormatterContainer(); + ~FormatterContainer(); + + const Formatter* Get(TimeFormat::Format format, + TimeFormat::Length length) const; + + void ResetForTesting() { + Shutdown(); + Initialize(); + } + + private: + void Initialize(); + void Shutdown(); + + scoped_ptr<Formatter> + formatter_[TimeFormat::FORMAT_COUNT][TimeFormat::LENGTH_COUNT]; + + DISALLOW_COPY_AND_ASSIGN(FormatterContainer); +}; + +// Windows compilation requires full definition of FormatterContainer before +// LazyInstance<FormatterContainter> may be declared. +extern UI_BASE_EXPORT base::LazyInstance<FormatterContainer> g_container; + +// For use in unit tests only. +extern UI_BASE_EXPORT bool formatter_force_fallback; + +} // namespace ui + +#endif diff --git a/chromium/ui/base/l10n/l10n_font_util.h b/chromium/ui/base/l10n/l10n_font_util.h index cfd0d81b263..b27b3f69dbd 100644 --- a/chromium/ui/base/l10n/l10n_font_util.h +++ b/chromium/ui/base/l10n/l10n_font_util.h @@ -5,7 +5,7 @@ #ifndef UI_BASE_L10N_FONT_UTIL_H_ #define UI_BASE_L10N_FONT_UTIL_H_ -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/size.h" namespace gfx { @@ -18,13 +18,13 @@ namespace ui { // its localized size data and the given font. The width in cols is held in a // localized string resource identified by |col_resource_id|, the height in the // same fashion. -UI_EXPORT int GetLocalizedContentsWidthForFont(int col_resource_id, - const gfx::Font& font); -UI_EXPORT int GetLocalizedContentsHeightForFont(int row_resource_id, - const gfx::Font& font); -UI_EXPORT gfx::Size GetLocalizedContentsSizeForFont(int col_resource_id, - int row_resource_id, +UI_BASE_EXPORT int GetLocalizedContentsWidthForFont(int col_resource_id, const gfx::Font& font); +UI_BASE_EXPORT int GetLocalizedContentsHeightForFont(int row_resource_id, + const gfx::Font& font); +UI_BASE_EXPORT gfx::Size GetLocalizedContentsSizeForFont(int col_resource_id, + int row_resource_id, + const gfx::Font& font); } // namespace ui diff --git a/chromium/ui/base/l10n/l10n_util.cc b/chromium/ui/base/l10n/l10n_util.cc index b610e9662d5..44d8df50547 100644 --- a/chromium/ui/base/l10n/l10n_util.cc +++ b/chromium/ui/base/l10n/l10n_util.cc @@ -225,7 +225,7 @@ bool IsLocalePartiallyPopulated(const std::string& locale_name) { bool IsLocaleAvailable(const std::string& locale) { // If locale has any illegal characters in it, we don't want to try to // load it because it may be pointing outside the locale data file directory. - if (!file_util::IsFilenameLegal(ASCIIToUTF16(locale))) + if (!file_util::IsFilenameLegal(base::ASCIIToUTF16(locale))) return false; // IsLocalePartiallyPopulated() can be called here for an early return w/o @@ -263,12 +263,6 @@ void AdjustParagraphDirectionality(base::string16* paragraph) { #endif } -#if defined(OS_WIN) -std::string GetCanonicalLocale(const std::string& locale) { - return base::i18n::GetCanonicalLocale(locale.c_str()); -} -#endif - struct AvailableLocalesTraits : base::DefaultLazyInstanceTraits<std::vector<std::string> > { static std::vector<std::string>* New(void* instance) { @@ -313,6 +307,10 @@ base::LazyInstance<std::vector<std::string>, AvailableLocalesTraits> namespace l10n_util { +std::string GetCanonicalLocale(const std::string& locale) { + return base::i18n::GetCanonicalLocale(locale.c_str()); +} + bool CheckAndResolveLocale(const std::string& locale, std::string* resolved_locale) { #if defined(OS_MACOSX) @@ -507,7 +505,8 @@ bool IsLocaleNameTranslated(const char* locale, // the translation is available or not. If ICU doesn't have a translated // name for this locale, GetDisplayNameForLocale will just return the // locale code. - return !IsStringASCII(display_name) || UTF16ToASCII(display_name) != locale; + return !base::IsStringASCII(display_name) || + base::UTF16ToASCII(display_name) != locale; } base::string16 GetDisplayNameForLocale(const std::string& locale, @@ -661,7 +660,7 @@ bool IsValidLocaleSyntax(const std::string& locale) { } std::string GetStringUTF8(int message_id) { - return UTF16ToUTF8(GetStringUTF16(message_id)); + return base::UTF16ToUTF8(GetStringUTF16(message_id)); } base::string16 GetStringUTF16(int message_id) { @@ -688,7 +687,7 @@ base::string16 GetStringFUTF16(int message_id, // check as the code may simply want to find the placeholders rather than // actually replacing them. if (!offsets) { - std::string utf8_string = UTF16ToUTF8(format_string); + std::string utf8_string = base::UTF16ToUTF8(format_string); // $9 is the highest allowed placeholder. for (size_t i = 0; i < 9; ++i) { @@ -719,20 +718,20 @@ base::string16 GetStringFUTF16(int message_id, std::string GetStringFUTF8(int message_id, const base::string16& a) { - return UTF16ToUTF8(GetStringFUTF16(message_id, a)); + return base::UTF16ToUTF8(GetStringFUTF16(message_id, a)); } std::string GetStringFUTF8(int message_id, const base::string16& a, const base::string16& b) { - return UTF16ToUTF8(GetStringFUTF16(message_id, a, b)); + return base::UTF16ToUTF8(GetStringFUTF16(message_id, a, b)); } std::string GetStringFUTF8(int message_id, const base::string16& a, const base::string16& b, const base::string16& c) { - return UTF16ToUTF8(GetStringFUTF16(message_id, a, b, c)); + return base::UTF16ToUTF8(GetStringFUTF16(message_id, a, b, c)); } std::string GetStringFUTF8(int message_id, @@ -740,7 +739,7 @@ std::string GetStringFUTF8(int message_id, const base::string16& b, const base::string16& c, const base::string16& d) { - return UTF16ToUTF8(GetStringFUTF16(message_id, a, b, c, d)); + return base::UTF16ToUTF8(GetStringFUTF16(message_id, a, b, c, d)); } base::string16 GetStringFUTF16(int message_id, @@ -819,11 +818,11 @@ base::string16 GetStringFUTF16(int message_id, } base::string16 GetStringFUTF16Int(int message_id, int a) { - return GetStringFUTF16(message_id, UTF8ToUTF16(base::IntToString(a))); + return GetStringFUTF16(message_id, base::UTF8ToUTF16(base::IntToString(a))); } base::string16 GetStringFUTF16Int(int message_id, int64 a) { - return GetStringFUTF16(message_id, UTF8ToUTF16(base::Int64ToString(a))); + return GetStringFUTF16(message_id, base::UTF8ToUTF16(base::Int64ToString(a))); } // Specialization of operator() method for base::string16 version. diff --git a/chromium/ui/base/l10n/l10n_util.h b/chromium/ui/base/l10n/l10n_util.h index 2d254fa7414..5440b0d18a4 100644 --- a/chromium/ui/base/l10n/l10n_util.h +++ b/chromium/ui/base/l10n/l10n_util.h @@ -13,17 +13,22 @@ #include "base/strings/string16.h" #include "base/strings/string_util.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #if defined(OS_MACOSX) #include "ui/base/l10n/l10n_util_mac.h" #endif // OS_MACOSX namespace l10n_util { + +// The same as base::i18n::GetCanonicalLocale(const char*), but takes +// std::string as an argument. +UI_BASE_EXPORT std::string GetCanonicalLocale(const std::string& locale); + // This method translates a generic locale name to one of the locally defined // ones. This method returns true if it succeeds. -UI_EXPORT bool CheckAndResolveLocale(const std::string& locale, - std::string* resolved_locale); +UI_BASE_EXPORT bool CheckAndResolveLocale(const std::string& locale, + std::string* resolved_locale); // This method is responsible for determining the locale as defined below. In // nearly all cases you shouldn't call this, rather use GetApplicationLocale @@ -34,12 +39,12 @@ UI_EXPORT bool CheckAndResolveLocale(const std::string& locale, // as |pref_locale|), finally, we fall back on the system locale. We only return // a value if there's a corresponding resource DLL for the locale. Otherwise, // we fall back to en-us. -UI_EXPORT std::string GetApplicationLocale(const std::string& pref_locale); +UI_BASE_EXPORT std::string GetApplicationLocale(const std::string& pref_locale); // Returns true if a display name for |locale| is available in the locale // |display_locale|. -UI_EXPORT bool IsLocaleNameTranslated(const char* locale, - const std::string& display_locale); +UI_BASE_EXPORT bool IsLocaleNameTranslated(const char* locale, + const std::string& display_locale); // Given a locale code, return true if the OS is capable of supporting it. // For instance, Oriya is not well supported on Windows XP and we return @@ -55,24 +60,24 @@ bool IsLocaleSupportedByOS(const std::string& locale); // in the UI thread. // If |is_for_ui| is true, U+200F is appended so that it can be // rendered properly in a RTL Chrome. -UI_EXPORT base::string16 GetDisplayNameForLocale( +UI_BASE_EXPORT base::string16 GetDisplayNameForLocale( const std::string& locale, const std::string& display_locale, bool is_for_ui); // Returns the display name of the |country_code| in |display_locale|. -UI_EXPORT base::string16 GetDisplayNameForCountry( +UI_BASE_EXPORT base::string16 GetDisplayNameForCountry( const std::string& country_code, const std::string& display_locale); // Converts all - into _, to be consistent with ICU and file system names. -UI_EXPORT std::string NormalizeLocale(const std::string& locale); +UI_BASE_EXPORT std::string NormalizeLocale(const std::string& locale); // Produce a vector of parent locales for given locale. // It includes the current locale in the result. // sr_Cyrl_RS generates sr_Cyrl_RS, sr_Cyrl and sr. -UI_EXPORT void GetParentLocales(const std::string& current_locale, - std::vector<std::string>* parent_locales); +UI_BASE_EXPORT void GetParentLocales(const std::string& current_locale, + std::vector<std::string>* parent_locales); // Checks if a string is plausibly a syntactically-valid locale string, // for cases where we want the valid input to be a locale string such as @@ -82,102 +87,104 @@ UI_EXPORT void GetParentLocales(const std::string& current_locale, // accepted, but 'z', 'German', 'en-$1', or 'abcd-1234' should not. // Case-insensitive. Based on BCP 47, see: // http://unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers -UI_EXPORT bool IsValidLocaleSyntax(const std::string& locale); +UI_BASE_EXPORT bool IsValidLocaleSyntax(const std::string& locale); // // Mac Note: See l10n_util_mac.h for some NSString versions and other support. // // Pulls resource string from the string bundle and returns it. -UI_EXPORT std::string GetStringUTF8(int message_id); -UI_EXPORT base::string16 GetStringUTF16(int message_id); +UI_BASE_EXPORT std::string GetStringUTF8(int message_id); +UI_BASE_EXPORT base::string16 GetStringUTF16(int message_id); // Get a resource string and replace $i with replacements[i] for all // i < replacements.size(). Additionally, $$ is replaced by $. // If non-NULL |offsets| will be replaced with the start points of the replaced // strings. -UI_EXPORT base::string16 GetStringFUTF16( +UI_BASE_EXPORT base::string16 GetStringFUTF16( int message_id, const std::vector<base::string16>& replacements, std::vector<size_t>* offsets); // Convenience wrappers for the above. -UI_EXPORT base::string16 GetStringFUTF16(int message_id, - const base::string16& a); -UI_EXPORT base::string16 GetStringFUTF16(int message_id, - const base::string16& a, - const base::string16& b); -UI_EXPORT base::string16 GetStringFUTF16(int message_id, - const base::string16& a, - const base::string16& b, - const base::string16& c); -UI_EXPORT base::string16 GetStringFUTF16(int message_id, - const base::string16& a, - const base::string16& b, - const base::string16& c, - const base::string16& d); -UI_EXPORT base::string16 GetStringFUTF16(int message_id, - const base::string16& a, - const base::string16& b, - const base::string16& c, - const base::string16& d, - const base::string16& e); -UI_EXPORT std::string GetStringFUTF8(int message_id, - const base::string16& a); -UI_EXPORT std::string GetStringFUTF8(int message_id, - const base::string16& a, - const base::string16& b); -UI_EXPORT std::string GetStringFUTF8(int message_id, - const base::string16& a, - const base::string16& b, - const base::string16& c); -UI_EXPORT std::string GetStringFUTF8(int message_id, - const base::string16& a, - const base::string16& b, - const base::string16& c, - const base::string16& d); +UI_BASE_EXPORT base::string16 GetStringFUTF16(int message_id, + const base::string16& a); +UI_BASE_EXPORT base::string16 GetStringFUTF16(int message_id, + const base::string16& a, + const base::string16& b); +UI_BASE_EXPORT base::string16 GetStringFUTF16(int message_id, + const base::string16& a, + const base::string16& b, + const base::string16& c); +UI_BASE_EXPORT base::string16 GetStringFUTF16(int message_id, + const base::string16& a, + const base::string16& b, + const base::string16& c, + const base::string16& d); +UI_BASE_EXPORT base::string16 GetStringFUTF16(int message_id, + const base::string16& a, + const base::string16& b, + const base::string16& c, + const base::string16& d, + const base::string16& e); +UI_BASE_EXPORT std::string GetStringFUTF8(int message_id, + const base::string16& a); +UI_BASE_EXPORT std::string GetStringFUTF8(int message_id, + const base::string16& a, + const base::string16& b); +UI_BASE_EXPORT std::string GetStringFUTF8(int message_id, + const base::string16& a, + const base::string16& b, + const base::string16& c); +UI_BASE_EXPORT std::string GetStringFUTF8(int message_id, + const base::string16& a, + const base::string16& b, + const base::string16& c, + const base::string16& d); // Variants that return the offset(s) of the replaced parameters. The // vector based version returns offsets ordered by parameter. For example if // invoked with a and b offsets[0] gives the offset for a and offsets[1] the // offset of b regardless of where the parameters end up in the string. -UI_EXPORT base::string16 GetStringFUTF16(int message_id, - const base::string16& a, - size_t* offset); -UI_EXPORT base::string16 GetStringFUTF16(int message_id, - const base::string16& a, - const base::string16& b, - std::vector<size_t>* offsets); +UI_BASE_EXPORT base::string16 GetStringFUTF16(int message_id, + const base::string16& a, + size_t* offset); +UI_BASE_EXPORT base::string16 GetStringFUTF16(int message_id, + const base::string16& a, + const base::string16& b, + std::vector<size_t>* offsets); // Convenience functions to get a string with a single number as a parameter. -UI_EXPORT base::string16 GetStringFUTF16Int(int message_id, int a); +UI_BASE_EXPORT base::string16 GetStringFUTF16Int(int message_id, int a); base::string16 GetStringFUTF16Int(int message_id, int64 a); // Get a resource string using |number| to decide which of |message_ids| should // be used. |message_ids| must be size 6 and in order: default, singular, zero, // two, few, many. -UI_EXPORT base::string16 GetPluralStringFUTF16( +UI_BASE_EXPORT base::string16 GetPluralStringFUTF16( + const std::vector<int>& message_ids, + int number); +UI_BASE_EXPORT std::string GetPluralStringFUTF8( const std::vector<int>& message_ids, int number); -UI_EXPORT std::string GetPluralStringFUTF8(const std::vector<int>& message_ids, - int number); -// In place sorting of base::string16 strings using collation rules for |locale|. -UI_EXPORT void SortStrings16(const std::string& locale, - std::vector<base::string16>* strings); +// In place sorting of base::string16 strings using collation rules for +// |locale|. +UI_BASE_EXPORT void SortStrings16(const std::string& locale, + std::vector<base::string16>* strings); // Returns a vector of available locale codes. E.g., a vector containing // en-US, es, fr, fi, pt-PT, pt-BR, etc. -UI_EXPORT const std::vector<std::string>& GetAvailableLocales(); +UI_BASE_EXPORT const std::vector<std::string>& GetAvailableLocales(); // Returns a vector of locale codes usable for accept-languages. -UI_EXPORT void GetAcceptLanguagesForLocale( +UI_BASE_EXPORT void GetAcceptLanguagesForLocale( const std::string& display_locale, std::vector<std::string>* locale_codes); // Returns the preferred size of the contents view of a window based on // designer given constraints which might dependent on the language used. -UI_EXPORT int GetLocalizedContentsWidthInPixels(int pixel_resource_id); +UI_BASE_EXPORT int GetLocalizedContentsWidthInPixels(int pixel_resource_id); } // namespace l10n_util diff --git a/chromium/ui/base/l10n/l10n_util_android.cc b/chromium/ui/base/l10n/l10n_util_android.cc index 62d919bdc80..154b6759711 100644 --- a/chromium/ui/base/l10n/l10n_util_android.cc +++ b/chromium/ui/base/l10n/l10n_util_android.cc @@ -17,10 +17,6 @@ namespace l10n_util { -jboolean IsRTL(JNIEnv* env, jclass clazz) { - return base::i18n::IsRTL(); -} - jint GetFirstStrongCharacterDirection(JNIEnv* env, jclass clazz, jstring string) { return base::i18n::GetFirstStrongCharacterDirection( @@ -34,6 +30,20 @@ std::string GetDefaultLocale() { return ConvertJavaStringToUTF8(locale); } +bool IsLayoutRtl() { + static bool is_layout_rtl_cached = false; + static bool layout_rtl_cache; + + if (!is_layout_rtl_cached) { + is_layout_rtl_cached = true; + JNIEnv* env = base::android::AttachCurrentThread(); + layout_rtl_cache = + static_cast<bool>(Java_LocalizationUtils_isLayoutRtl(env)); + } + + return layout_rtl_cache; +} + namespace { // Common prototype of ICU uloc_getXXX() functions. @@ -73,8 +83,8 @@ ScopedJavaLocalRef<jobject> NewJavaLocale( } // namespace -string16 GetDisplayNameForLocale(const std::string& locale, - const std::string& display_locale) { +base::string16 GetDisplayNameForLocale(const std::string& locale, + const std::string& display_locale) { JNIEnv* env = base::android::AttachCurrentThread(); ScopedJavaLocalRef<jobject> java_locale = NewJavaLocale(env, locale); @@ -93,7 +103,8 @@ jstring GetDurationString(JNIEnv* env, jclass clazz, jlong timeInMillis) { ScopedJavaLocalRef<jstring> jtime_remaining = base::android::ConvertUTF16ToJavaString( env, - ui::TimeFormat::TimeRemaining( + ui::TimeFormat::Simple( + ui::TimeFormat::FORMAT_REMAINING, ui::TimeFormat::LENGTH_SHORT, base::TimeDelta::FromMilliseconds(timeInMillis))); return jtime_remaining.Release(); } diff --git a/chromium/ui/base/l10n/l10n_util_android.h b/chromium/ui/base/l10n/l10n_util_android.h index 467bf178b91..c8cf4bb2733 100644 --- a/chromium/ui/base/l10n/l10n_util_android.h +++ b/chromium/ui/base/l10n/l10n_util_android.h @@ -10,17 +10,20 @@ #include <string> #include "base/strings/string16.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace l10n_util { // Return the current default locale of the device. -UI_EXPORT std::string GetDefaultLocale(); +UI_BASE_EXPORT std::string GetDefaultLocale(); -UI_EXPORT string16 GetDisplayNameForLocale(const std::string& locale, - const std::string& display_locale); +UI_BASE_EXPORT base::string16 GetDisplayNameForLocale( + const std::string& locale, + const std::string& display_locale); -UI_EXPORT bool RegisterLocalizationUtil(JNIEnv* env); +UI_BASE_EXPORT bool IsLayoutRtl(); + +UI_BASE_EXPORT bool RegisterLocalizationUtil(JNIEnv* env); } // namespace l10n_util diff --git a/chromium/ui/base/l10n/l10n_util_collator.h b/chromium/ui/base/l10n/l10n_util_collator.h index a0bfb92ebbc..e1b91abd14a 100644 --- a/chromium/ui/base/l10n/l10n_util_collator.h +++ b/chromium/ui/base/l10n/l10n_util_collator.h @@ -13,7 +13,7 @@ #include "base/i18n/string_compare.h" #include "base/memory/scoped_ptr.h" #include "third_party/icu/source/i18n/unicode/coll.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace l10n_util { @@ -82,7 +82,7 @@ void SortStringsUsingMethod(const std::string& locale, // Compares two elements' string keys and returns true if the first element's // string key is less than the second element's string key. The Element must // have a method like the follow format to return the string key. -// const string16& GetStringKey() const; +// const base::string16& GetStringKey() const; // This uses the locale specified in the constructor. template <class Element> class StringComparator : public std::binary_function<const Element&, @@ -105,8 +105,8 @@ class StringComparator : public std::binary_function<const Element&, icu::Collator* collator_; }; -// Specialization of operator() method for string16 version. -template <> UI_EXPORT +// Specialization of operator() method for base::string16 version. +template <> UI_BASE_EXPORT bool StringComparator<base::string16>::operator()(const base::string16& lhs, const base::string16& rhs); diff --git a/chromium/ui/base/l10n/l10n_util_mac.h b/chromium/ui/base/l10n/l10n_util_mac.h index f617d8995df..74bc58b4935 100644 --- a/chromium/ui/base/l10n/l10n_util_mac.h +++ b/chromium/ui/base/l10n/l10n_util_mac.h @@ -10,7 +10,7 @@ #include "base/basictypes.h" #include "base/strings/string16.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #ifdef __OBJC__ @class NSString; @@ -23,59 +23,58 @@ namespace l10n_util { // Remove the Windows-style accelerator marker (for labels, menuitems, etc.) // and change "..." into an ellipsis. // Returns the result in an autoreleased NSString. -UI_EXPORT NSString* FixUpWindowsStyleLabel(const string16& label); +UI_BASE_EXPORT NSString* FixUpWindowsStyleLabel(const base::string16& label); // Pulls resource string from the string bundle and returns it. -UI_EXPORT NSString* GetNSString(int message_id); +UI_BASE_EXPORT NSString* GetNSString(int message_id); // Get a resource string and replace $1-$2-$3 with |a| and |b| // respectively. Additionally, $$ is replaced by $. -UI_EXPORT NSString* GetNSStringF(int message_id, - const string16& a); -UI_EXPORT NSString* GetNSStringF(int message_id, - const string16& a, - const string16& b); -UI_EXPORT NSString* GetNSStringF(int message_id, - const string16& a, - const string16& b, - const string16& c); -UI_EXPORT NSString* GetNSStringF(int message_id, - const string16& a, - const string16& b, - const string16& c, - const string16& d); +UI_BASE_EXPORT NSString* GetNSStringF(int message_id, const base::string16& a); +UI_BASE_EXPORT NSString* GetNSStringF(int message_id, + const base::string16& a, + const base::string16& b); +UI_BASE_EXPORT NSString* GetNSStringF(int message_id, + const base::string16& a, + const base::string16& b, + const base::string16& c); +UI_BASE_EXPORT NSString* GetNSStringF(int message_id, + const base::string16& a, + const base::string16& b, + const base::string16& c, + const base::string16& d); // Variants that return the offset(s) of the replaced parameters. (See // app/l10n_util.h for more details.) -UI_EXPORT NSString* GetNSStringF(int message_id, - const string16& a, - const string16& b, - std::vector<size_t>* offsets); +UI_BASE_EXPORT NSString* GetNSStringF(int message_id, + const base::string16& a, + const base::string16& b, + std::vector<size_t>* offsets); // Same as GetNSString, but runs the result through FixUpWindowsStyleLabel // before returning it. -UI_EXPORT NSString* GetNSStringWithFixup(int message_id); +UI_BASE_EXPORT NSString* GetNSStringWithFixup(int message_id); // Same as GetNSStringF, but runs the result through FixUpWindowsStyleLabel // before returning it. -UI_EXPORT NSString* GetNSStringFWithFixup(int message_id, - const string16& a); -UI_EXPORT NSString* GetNSStringFWithFixup(int message_id, - const string16& a, - const string16& b); -UI_EXPORT NSString* GetNSStringFWithFixup(int message_id, - const string16& a, - const string16& b, - const string16& c); -UI_EXPORT NSString* GetNSStringFWithFixup(int message_id, - const string16& a, - const string16& b, - const string16& c, - const string16& d); +UI_BASE_EXPORT NSString* GetNSStringFWithFixup(int message_id, + const base::string16& a); +UI_BASE_EXPORT NSString* GetNSStringFWithFixup(int message_id, + const base::string16& a, + const base::string16& b); +UI_BASE_EXPORT NSString* GetNSStringFWithFixup(int message_id, + const base::string16& a, + const base::string16& b, + const base::string16& c); +UI_BASE_EXPORT NSString* GetNSStringFWithFixup(int message_id, + const base::string16& a, + const base::string16& b, + const base::string16& c, + const base::string16& d); // Support the override of the locale with the value from Cocoa. -UI_EXPORT void OverrideLocaleWithCocoaLocale(); -UI_EXPORT const std::string& GetLocaleOverride(); +UI_BASE_EXPORT void OverrideLocaleWithCocoaLocale(); +UI_BASE_EXPORT const std::string& GetLocaleOverride(); } // namespace l10n_util diff --git a/chromium/ui/base/l10n/l10n_util_mac.mm b/chromium/ui/base/l10n/l10n_util_mac.mm index e9d47c2dc1e..8d6ca703073 100644 --- a/chromium/ui/base/l10n/l10n_util_mac.mm +++ b/chromium/ui/base/l10n/l10n_util_mac.mm @@ -53,13 +53,13 @@ void OverrideLocaleWithCocoaLocale() { // Remove the Windows-style accelerator marker and change "..." into an // ellipsis. Returns the result in an autoreleased NSString. -NSString* FixUpWindowsStyleLabel(const string16& label) { - const char16 kEllipsisUTF16 = 0x2026; - string16 ret; +NSString* FixUpWindowsStyleLabel(const base::string16& label) { + const base::char16 kEllipsisUTF16 = 0x2026; + base::string16 ret; size_t label_len = label.length(); ret.reserve(label_len); for (size_t i = 0; i < label_len; ++i) { - char16 c = label[i]; + base::char16 c = label[i]; if (c == '(' && i + 3 < label_len && label[i + 1] == '&' && label[i + 3] == ')') { // Strip '(&?)' patterns which means Windows-style accelerator in some @@ -87,38 +87,38 @@ NSString* GetNSString(int message_id) { } NSString* GetNSStringF(int message_id, - const string16& a) { + const base::string16& a) { return base::SysUTF16ToNSString(l10n_util::GetStringFUTF16(message_id, a)); } NSString* GetNSStringF(int message_id, - const string16& a, - const string16& b) { + const base::string16& a, + const base::string16& b) { return base::SysUTF16ToNSString(l10n_util::GetStringFUTF16(message_id, a, b)); } NSString* GetNSStringF(int message_id, - const string16& a, - const string16& b, - const string16& c) { + const base::string16& a, + const base::string16& b, + const base::string16& c) { return base::SysUTF16ToNSString(l10n_util::GetStringFUTF16(message_id, a, b, c)); } NSString* GetNSStringF(int message_id, - const string16& a, - const string16& b, - const string16& c, - const string16& d) { + const base::string16& a, + const base::string16& b, + const base::string16& c, + const base::string16& d) { return base::SysUTF16ToNSString(l10n_util::GetStringFUTF16(message_id, a, b, c, d)); } NSString* GetNSStringF(int message_id, - const string16& a, - const string16& b, + const base::string16& a, + const base::string16& b, std::vector<size_t>* offsets) { return base::SysUTF16ToNSString(l10n_util::GetStringFUTF16(message_id, a, b, offsets)); @@ -129,31 +129,31 @@ NSString* GetNSStringWithFixup(int message_id) { } NSString* GetNSStringFWithFixup(int message_id, - const string16& a) { + const base::string16& a) { return FixUpWindowsStyleLabel(l10n_util::GetStringFUTF16(message_id, a)); } NSString* GetNSStringFWithFixup(int message_id, - const string16& a, - const string16& b) { + const base::string16& a, + const base::string16& b) { return FixUpWindowsStyleLabel(l10n_util::GetStringFUTF16(message_id, a, b)); } NSString* GetNSStringFWithFixup(int message_id, - const string16& a, - const string16& b, - const string16& c) { + const base::string16& a, + const base::string16& b, + const base::string16& c) { return FixUpWindowsStyleLabel(l10n_util::GetStringFUTF16(message_id, a, b, c)); } NSString* GetNSStringFWithFixup(int message_id, - const string16& a, - const string16& b, - const string16& c, - const string16& d) { + const base::string16& a, + const base::string16& b, + const base::string16& c, + const base::string16& d) { return FixUpWindowsStyleLabel(l10n_util::GetStringFUTF16(message_id, a, b, c, d)); } diff --git a/chromium/ui/base/l10n/l10n_util_mac_unittest.mm b/chromium/ui/base/l10n/l10n_util_mac_unittest.mm index ec316728710..cd3e2034729 100644 --- a/chromium/ui/base/l10n/l10n_util_mac_unittest.mm +++ b/chromium/ui/base/l10n/l10n_util_mac_unittest.mm @@ -37,7 +37,7 @@ TEST_F(L10nUtilMacTest, FixUpWindowsStyleLabel) { { @"(&b)foo", @"foo" }, }; for (size_t idx = 0; idx < ARRAYSIZE_UNSAFE(data); ++idx) { - string16 input16(base::SysNSStringToUTF16(data[idx].input)); + base::string16 input16(base::SysNSStringToUTF16(data[idx].input)); NSString* result = l10n_util::FixUpWindowsStyleLabel(input16); EXPECT_TRUE(result != nil) << "Fixup Failed, idx = " << idx; diff --git a/chromium/ui/base/l10n/l10n_util_unittest.cc b/chromium/ui/base/l10n/l10n_util_unittest.cc index 6207ffa64e8..dbf38958d38 100644 --- a/chromium/ui/base/l10n/l10n_util_unittest.cc +++ b/chromium/ui/base/l10n/l10n_util_unittest.cc @@ -33,15 +33,18 @@ #include "ui/base/test/data/resource.h" #endif +using base::ASCIIToUTF16; +using base::UTF8ToUTF16; + namespace { class StringWrapper { public: - explicit StringWrapper(const string16& string) : string_(string) {} - const string16& string() const { return string_; } + explicit StringWrapper(const base::string16& string) : string_(string) {} + const base::string16& string() const { return string_; } private: - string16 string_; + base::string16 string_; DISALLOW_COPY_AND_ASSIGN(StringWrapper); }; @@ -62,7 +65,7 @@ TEST_F(L10nUtilTest, DISABLED_GetString) { UTF8ToUTF16("10")); EXPECT_EQ(std::string("Hello, chrome. Your number is 10."), s); - string16 s16 = l10n_util::GetStringFUTF16Int(IDS_PLACEHOLDERS_2, 20); + base::string16 s16 = l10n_util::GetStringFUTF16Int(IDS_PLACEHOLDERS_2, 20); EXPECT_EQ(UTF8ToUTF16("You owe me $20."), s16); } #endif // defined(OS_WIN) @@ -125,7 +128,7 @@ TEST_F(L10nUtilTest, GetAppLocale) { for (size_t i = 0; i < arraysize(filenames); ++i) { base::FilePath filename = new_locale_dir.AppendASCII( filenames[i] + ".pak"); - file_util::WriteFile(filename, "", 0); + base::WriteFile(filename, "", 0); } // Keep a copy of ICU's default locale before we overwrite it. @@ -326,13 +329,13 @@ void CheckUiDisplayNameForLocale(const std::string& locale, const std::string& display_locale, bool is_rtl) { EXPECT_EQ(true, base::i18n::IsRTL()); - string16 result = l10n_util::GetDisplayNameForLocale(locale, + base::string16 result = l10n_util::GetDisplayNameForLocale(locale, display_locale, /* is_for_ui */ true); bool rtl_direction = true; for (size_t i = 0; i < result.length() - 1; i++) { - char16 ch = result.at(i); + base::char16 ch = result.at(i); switch (ch) { case base::i18n::kLeftToRightMark: case base::i18n::kLeftToRightEmbeddingMark: @@ -352,7 +355,8 @@ void CheckUiDisplayNameForLocale(const std::string& locale, TEST_F(L10nUtilTest, GetDisplayNameForLocale) { // TODO(jungshik): Make this test more extensive. // Test zh-CN and zh-TW are treated as zh-Hans and zh-Hant. - string16 result = l10n_util::GetDisplayNameForLocale("zh-CN", "en", false); + base::string16 result = + l10n_util::GetDisplayNameForLocale("zh-CN", "en", false); EXPECT_EQ(ASCIIToUTF16("Chinese (Simplified Han)"), result); result = l10n_util::GetDisplayNameForLocale("zh-TW", "en", false); @@ -370,7 +374,6 @@ TEST_F(L10nUtilTest, GetDisplayNameForLocale) { result = l10n_util::GetDisplayNameForLocale("xyz-xyz", "en", false); EXPECT_EQ(ASCIIToUTF16("xyz (XYZ)"), result); -#if !defined(TOOLKIT_GTK) // Check for directional markers when using RTL languages to ensure that // direction neutral characters such as parentheses are properly formatted. @@ -383,26 +386,25 @@ TEST_F(L10nUtilTest, GetDisplayNameForLocale) { // Clean up. base::i18n::SetICUDefaultLocale(original_locale); -#endif // ToUpper and ToLower should work with embedded NULLs. const size_t length_with_null = 4; - char16 buf_with_null[length_with_null] = { 0, 'a', 0, 'b' }; - string16 string16_with_null(buf_with_null, length_with_null); + base::char16 buf_with_null[length_with_null] = { 0, 'a', 0, 'b' }; + base::string16 string16_with_null(buf_with_null, length_with_null); - string16 upper_with_null = base::i18n::ToUpper(string16_with_null); + base::string16 upper_with_null = base::i18n::ToUpper(string16_with_null); ASSERT_EQ(length_with_null, upper_with_null.size()); EXPECT_TRUE(upper_with_null[0] == 0 && upper_with_null[1] == 'A' && upper_with_null[2] == 0 && upper_with_null[3] == 'B'); - string16 lower_with_null = base::i18n::ToLower(upper_with_null); + base::string16 lower_with_null = base::i18n::ToLower(upper_with_null); ASSERT_EQ(length_with_null, upper_with_null.size()); EXPECT_TRUE(lower_with_null[0] == 0 && lower_with_null[1] == 'a' && lower_with_null[2] == 0 && lower_with_null[3] == 'b'); } TEST_F(L10nUtilTest, GetDisplayNameForCountry) { - string16 result = l10n_util::GetDisplayNameForCountry("BR", "en"); + base::string16 result = l10n_util::GetDisplayNameForCountry("BR", "en"); EXPECT_EQ(ASCIIToUTF16("Brazil"), result); result = l10n_util::GetDisplayNameForCountry("419", "en"); diff --git a/chromium/ui/base/l10n/l10n_util_win.cc b/chromium/ui/base/l10n/l10n_util_win.cc index bc6a7e9792e..cd0a084a474 100644 --- a/chromium/ui/base/l10n/l10n_util_win.cc +++ b/chromium/ui/base/l10n/l10n_util_win.cc @@ -11,6 +11,7 @@ #include "base/i18n/rtl.h" #include "base/lazy_instance.h" #include "base/strings/string_number_conversions.h" +#include "base/strings/utf_string_conversions.h" #include "base/win/i18n.h" #include "base/win/windows_version.h" #include "grit/app_locale_settings.h" @@ -20,7 +21,7 @@ namespace { -void AdjustLogFont(const string16& font_family, +void AdjustLogFont(const base::string16& font_family, double font_size_scaler, double dpi_scale, LOGFONT* logfont) { @@ -113,7 +114,7 @@ bool IsLocaleSupportedByOS(const std::string& locale) { !LowerCaseEqualsASCII(locale, "am") || IsFontPresent(L"Abyssinica SIL")); } -bool NeedOverrideDefaultUIFont(string16* override_font_family, +bool NeedOverrideDefaultUIFont(base::string16* override_font_family, double* font_size_scaler) { // This is rather simple-minded to deal with the UI font size // issue for some Indian locales (ml, bn, hi) for which @@ -130,7 +131,7 @@ bool NeedOverrideDefaultUIFont(string16* override_font_family, ui_font_size_scaler_id = IDS_UI_FONT_SIZE_SCALER_XP; } - string16 ui_font_family = GetStringUTF16(ui_font_family_id); + base::string16 ui_font_family = GetStringUTF16(ui_font_family_id); int scaler100; if (!base::StringToInt(l10n_util::GetStringUTF16(ui_font_size_scaler_id), &scaler100)) @@ -161,7 +162,7 @@ void AdjustUIFont(LOGFONT* logfont) { } void AdjustUIFontForDIP(float dpi_scale, LOGFONT* logfont) { - string16 ui_font_family = L"default"; + base::string16 ui_font_family = L"default"; double ui_font_size_scaler = 1; if (NeedOverrideDefaultUIFont(&ui_font_family, &ui_font_size_scaler) || dpi_scale != 1) { @@ -170,7 +171,7 @@ void AdjustUIFontForDIP(float dpi_scale, LOGFONT* logfont) { } void AdjustUIFontForWindow(HWND hwnd) { - string16 ui_font_family; + base::string16 ui_font_family; double ui_font_size_scaler; if (NeedOverrideDefaultUIFont(&ui_font_family, &ui_font_size_scaler)) { LOGFONT logfont; @@ -185,12 +186,12 @@ void AdjustUIFontForWindow(HWND hwnd) { } void OverrideLocaleWithUILanguageList() { - std::vector<std::wstring> ui_languages; + std::vector<base::string16> ui_languages; if (base::win::i18n::GetThreadPreferredUILanguageList(&ui_languages)) { std::vector<std::string> ascii_languages; ascii_languages.reserve(ui_languages.size()); std::transform(ui_languages.begin(), ui_languages.end(), - std::back_inserter(ascii_languages), &WideToASCII); + std::back_inserter(ascii_languages), &base::UTF16ToASCII); override_locale_holder.Get().swap_value(&ascii_languages); } else { NOTREACHED() << "Failed to determine the UI language for locale override."; diff --git a/chromium/ui/base/l10n/l10n_util_win.h b/chromium/ui/base/l10n/l10n_util_win.h index 75588163341..75bfe5db03a 100644 --- a/chromium/ui/base/l10n/l10n_util_win.h +++ b/chromium/ui/base/l10n/l10n_util_win.h @@ -10,7 +10,7 @@ #include <vector> #include "base/strings/string16.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace l10n_util { @@ -19,17 +19,17 @@ namespace l10n_util { // (e.g. WS_EX_LAYOUTRTL, WS_EX_RTLREADING, etc.) when creating a window. // Callers should OR this value into their extended style value when creating // a window. -UI_EXPORT int GetExtendedStyles(); +UI_BASE_EXPORT int GetExtendedStyles(); // TODO(xji): // This is a temporary name, it will eventually replace GetExtendedStyles -UI_EXPORT int GetExtendedTooltipStyles(); +UI_BASE_EXPORT int GetExtendedTooltipStyles(); // Give an HWND, this function sets the WS_EX_LAYOUTRTL extended style for the // underlying window. When this style is set, the UI for the window is going to // be mirrored. This is generally done for the UI of right-to-left languages // such as Hebrew. -UI_EXPORT void HWNDSetRTLLayout(HWND hwnd); +UI_BASE_EXPORT void HWNDSetRTLLayout(HWND hwnd); // See http://blogs.msdn.com/oldnewthing/archive/2005/09/15/467598.aspx // and http://blogs.msdn.com/oldnewthing/archive/2006/06/26/647365.aspx @@ -40,14 +40,15 @@ UI_EXPORT void HWNDSetRTLLayout(HWND hwnd); // override_font_family and font_size_scaler are not null, they'll be // filled with the font family name and the size scaler. The output // parameters are not modified if the return value is false. -UI_EXPORT bool NeedOverrideDefaultUIFont(string16* override_font_family, - double* font_size_scaler); +UI_BASE_EXPORT bool NeedOverrideDefaultUIFont( + base::string16* override_font_family, + double* font_size_scaler); // If the default UI font stored in |logfont| is not suitable, its family // and size are replaced with those stored in the per-locale resource. The // font size is adjusted based on the font scale setting in the OS preferences. // Windows 8 supports scale factors of 1, 1.4 and 1.8. -UI_EXPORT void AdjustUIFont(LOGFONT* logfont); +UI_BASE_EXPORT void AdjustUIFont(LOGFONT* logfont); // If the default UI font stored in |logfont| is not suitable, its family // and size are replaced with those stored in the per-locale resource. The @@ -55,17 +56,17 @@ UI_EXPORT void AdjustUIFont(LOGFONT* logfont); // baseline of 96 DPI. This ratio is also used for converting sizes from // device independent pixels (DIP) to physical pixels. The font size is scaled // for use with Views and Aura which work in DIP. -UI_EXPORT void AdjustUIFontForDIP(float dpi_scale, LOGFONT* logfont); +UI_BASE_EXPORT void AdjustUIFontForDIP(float dpi_scale, LOGFONT* logfont); // If the font for a given window (pointed to by HWND) is not suitable for the // UI in the current UI langauge, its family and size are replaced with those // stored in the per-locale resource. -UI_EXPORT void AdjustUIFontForWindow(HWND hwnd); +UI_BASE_EXPORT void AdjustUIFontForWindow(HWND hwnd); // Allow processes to override the configured locale with the user's Windows UI // languages. This function should generally be called once early in // Application startup. -UI_EXPORT void OverrideLocaleWithUILanguageList(); +UI_BASE_EXPORT void OverrideLocaleWithUILanguageList(); // Retrieve the locale override, or an empty vector if the locale has not been // or failed to be overridden. diff --git a/chromium/ui/base/l10n/time_format.cc b/chromium/ui/base/l10n/time_format.cc index f3b16a3f969..f7fa096485c 100644 --- a/chromium/ui/base/l10n/time_format.cc +++ b/chromium/ui/base/l10n/time_format.cc @@ -4,361 +4,117 @@ #include "ui/base/l10n/time_format.h" -#include <vector> +#include <limits> #include "base/lazy_instance.h" #include "base/logging.h" -#include "base/memory/scoped_ptr.h" -#include "base/memory/scoped_vector.h" -#include "base/stl_util.h" -#include "base/strings/string16.h" -#include "base/strings/utf_string_conversions.h" +#include "base/strings/string_util.h" #include "base/time/time.h" #include "grit/ui_strings.h" -#include "third_party/icu/source/common/unicode/locid.h" -#include "third_party/icu/source/i18n/unicode/datefmt.h" -#include "third_party/icu/source/i18n/unicode/plurfmt.h" -#include "third_party/icu/source/i18n/unicode/plurrule.h" -#include "third_party/icu/source/i18n/unicode/smpdtfmt.h" +#include "third_party/icu/source/common/unicode/unistr.h" +#include "ui/base/l10n/formatter.h" #include "ui/base/l10n/l10n_util.h" -#include "ui/base/l10n/l10n_util_plurals.h" +#include "ui/base/ui_base_export.h" using base::Time; using base::TimeDelta; +using ui::TimeFormat; -namespace { - -static const char kFallbackFormatSuffixShort[] = "}"; -static const char kFallbackFormatSuffixLeft[] = " left}"; -static const char kFallbackFormatSuffixAgo[] = " ago}"; - -// Contains message IDs for various time units and pluralities. -struct MessageIDs { - // There are 4 different time units and 6 different pluralities. - int ids[4][6]; -}; - -// Message IDs for different time formats. -static const MessageIDs kTimeShortMessageIDs = { { - { - IDS_TIME_SECS_DEFAULT, IDS_TIME_SEC_SINGULAR, IDS_TIME_SECS_ZERO, - IDS_TIME_SECS_TWO, IDS_TIME_SECS_FEW, IDS_TIME_SECS_MANY - }, - { - IDS_TIME_MINS_DEFAULT, IDS_TIME_MIN_SINGULAR, IDS_TIME_MINS_ZERO, - IDS_TIME_MINS_TWO, IDS_TIME_MINS_FEW, IDS_TIME_MINS_MANY - }, - { - IDS_TIME_HOURS_DEFAULT, IDS_TIME_HOUR_SINGULAR, IDS_TIME_HOURS_ZERO, - IDS_TIME_HOURS_TWO, IDS_TIME_HOURS_FEW, IDS_TIME_HOURS_MANY - }, - { - IDS_TIME_DAYS_DEFAULT, IDS_TIME_DAY_SINGULAR, IDS_TIME_DAYS_ZERO, - IDS_TIME_DAYS_TWO, IDS_TIME_DAYS_FEW, IDS_TIME_DAYS_MANY - } -} }; - -static const MessageIDs kTimeRemainingMessageIDs = { { - { - IDS_TIME_REMAINING_SECS_DEFAULT, IDS_TIME_REMAINING_SEC_SINGULAR, - IDS_TIME_REMAINING_SECS_ZERO, IDS_TIME_REMAINING_SECS_TWO, - IDS_TIME_REMAINING_SECS_FEW, IDS_TIME_REMAINING_SECS_MANY - }, - { - IDS_TIME_REMAINING_MINS_DEFAULT, IDS_TIME_REMAINING_MIN_SINGULAR, - IDS_TIME_REMAINING_MINS_ZERO, IDS_TIME_REMAINING_MINS_TWO, - IDS_TIME_REMAINING_MINS_FEW, IDS_TIME_REMAINING_MINS_MANY - }, - { - IDS_TIME_REMAINING_HOURS_DEFAULT, IDS_TIME_REMAINING_HOUR_SINGULAR, - IDS_TIME_REMAINING_HOURS_ZERO, IDS_TIME_REMAINING_HOURS_TWO, - IDS_TIME_REMAINING_HOURS_FEW, IDS_TIME_REMAINING_HOURS_MANY - }, - { - IDS_TIME_REMAINING_DAYS_DEFAULT, IDS_TIME_REMAINING_DAY_SINGULAR, - IDS_TIME_REMAINING_DAYS_ZERO, IDS_TIME_REMAINING_DAYS_TWO, - IDS_TIME_REMAINING_DAYS_FEW, IDS_TIME_REMAINING_DAYS_MANY - } -} }; - -static const MessageIDs kTimeRemainingLongMessageIDs = { { - { - IDS_TIME_REMAINING_SECS_DEFAULT, IDS_TIME_REMAINING_SEC_SINGULAR, - IDS_TIME_REMAINING_SECS_ZERO, IDS_TIME_REMAINING_SECS_TWO, - IDS_TIME_REMAINING_SECS_FEW, IDS_TIME_REMAINING_SECS_MANY - }, - { - IDS_TIME_REMAINING_LONG_MINS_DEFAULT, IDS_TIME_REMAINING_LONG_MIN_SINGULAR, - IDS_TIME_REMAINING_LONG_MINS_ZERO, IDS_TIME_REMAINING_LONG_MINS_TWO, - IDS_TIME_REMAINING_LONG_MINS_FEW, IDS_TIME_REMAINING_LONG_MINS_MANY - }, - { - IDS_TIME_REMAINING_HOURS_DEFAULT, IDS_TIME_REMAINING_HOUR_SINGULAR, - IDS_TIME_REMAINING_HOURS_ZERO, IDS_TIME_REMAINING_HOURS_TWO, - IDS_TIME_REMAINING_HOURS_FEW, IDS_TIME_REMAINING_HOURS_MANY - }, - { - IDS_TIME_REMAINING_DAYS_DEFAULT, IDS_TIME_REMAINING_DAY_SINGULAR, - IDS_TIME_REMAINING_DAYS_ZERO, IDS_TIME_REMAINING_DAYS_TWO, - IDS_TIME_REMAINING_DAYS_FEW, IDS_TIME_REMAINING_DAYS_MANY - } -} }; - -static const MessageIDs kTimeDurationLongMessageIDs = { { - { - IDS_TIME_DURATION_LONG_SECS_DEFAULT, IDS_TIME_DURATION_LONG_SEC_SINGULAR, - IDS_TIME_DURATION_LONG_SECS_ZERO, IDS_TIME_DURATION_LONG_SECS_TWO, - IDS_TIME_DURATION_LONG_SECS_FEW, IDS_TIME_DURATION_LONG_SECS_MANY - }, - { - IDS_TIME_DURATION_LONG_MINS_DEFAULT, IDS_TIME_DURATION_LONG_MIN_SINGULAR, - IDS_TIME_DURATION_LONG_MINS_ZERO, IDS_TIME_DURATION_LONG_MINS_TWO, - IDS_TIME_DURATION_LONG_MINS_FEW, IDS_TIME_DURATION_LONG_MINS_MANY - }, - { - IDS_TIME_HOURS_DEFAULT, IDS_TIME_HOUR_SINGULAR, - IDS_TIME_HOURS_ZERO, IDS_TIME_HOURS_TWO, - IDS_TIME_HOURS_FEW, IDS_TIME_HOURS_MANY - }, - { - IDS_TIME_DAYS_DEFAULT, IDS_TIME_DAY_SINGULAR, - IDS_TIME_DAYS_ZERO, IDS_TIME_DAYS_TWO, - IDS_TIME_DAYS_FEW, IDS_TIME_DAYS_MANY - } -} }; - -static const MessageIDs kTimeElapsedMessageIDs = { { - { - IDS_TIME_ELAPSED_SECS_DEFAULT, IDS_TIME_ELAPSED_SEC_SINGULAR, - IDS_TIME_ELAPSED_SECS_ZERO, IDS_TIME_ELAPSED_SECS_TWO, - IDS_TIME_ELAPSED_SECS_FEW, IDS_TIME_ELAPSED_SECS_MANY - }, - { - IDS_TIME_ELAPSED_MINS_DEFAULT, IDS_TIME_ELAPSED_MIN_SINGULAR, - IDS_TIME_ELAPSED_MINS_ZERO, IDS_TIME_ELAPSED_MINS_TWO, - IDS_TIME_ELAPSED_MINS_FEW, IDS_TIME_ELAPSED_MINS_MANY - }, - { - IDS_TIME_ELAPSED_HOURS_DEFAULT, IDS_TIME_ELAPSED_HOUR_SINGULAR, - IDS_TIME_ELAPSED_HOURS_ZERO, IDS_TIME_ELAPSED_HOURS_TWO, - IDS_TIME_ELAPSED_HOURS_FEW, IDS_TIME_ELAPSED_HOURS_MANY - }, - { - IDS_TIME_ELAPSED_DAYS_DEFAULT, IDS_TIME_ELAPSED_DAY_SINGULAR, - IDS_TIME_ELAPSED_DAYS_ZERO, IDS_TIME_ELAPSED_DAYS_TWO, - IDS_TIME_ELAPSED_DAYS_FEW, IDS_TIME_ELAPSED_DAYS_MANY - } -} }; - -// Different format types. -enum FormatType { - FORMAT_SHORT, - FORMAT_REMAINING, - FORMAT_REMAINING_LONG, - FORMAT_DURATION_LONG, - FORMAT_ELAPSED, -}; - -class TimeFormatter { - public: - const std::vector<icu::PluralFormat*>& formatter(FormatType format_type) { - switch (format_type) { - case FORMAT_SHORT: - return short_formatter_.get(); - case FORMAT_REMAINING: - return time_left_formatter_.get(); - case FORMAT_REMAINING_LONG: - return time_left_long_formatter_.get(); - case FORMAT_DURATION_LONG: - return time_duration_long_formatter_.get(); - case FORMAT_ELAPSED: - return time_elapsed_formatter_.get(); - default: - NOTREACHED(); - return short_formatter_.get(); - } - } - private: - static const MessageIDs& GetMessageIDs(FormatType format_type) { - switch (format_type) { - case FORMAT_SHORT: - return kTimeShortMessageIDs; - case FORMAT_REMAINING: - return kTimeRemainingMessageIDs; - case FORMAT_REMAINING_LONG: - return kTimeRemainingLongMessageIDs; - case FORMAT_DURATION_LONG: - return kTimeDurationLongMessageIDs; - case FORMAT_ELAPSED: - return kTimeElapsedMessageIDs; - default: - NOTREACHED(); - return kTimeShortMessageIDs; - } - } - - static const char* GetFallbackFormatSuffix(FormatType format_type) { - switch (format_type) { - case FORMAT_SHORT: - return kFallbackFormatSuffixShort; - case FORMAT_REMAINING: - case FORMAT_REMAINING_LONG: - return kFallbackFormatSuffixLeft; - case FORMAT_ELAPSED: - return kFallbackFormatSuffixAgo; - default: - NOTREACHED(); - return kFallbackFormatSuffixShort; - } - } - - TimeFormatter() { - BuildFormats(FORMAT_SHORT, &short_formatter_); - BuildFormats(FORMAT_REMAINING, &time_left_formatter_); - BuildFormats(FORMAT_REMAINING_LONG, &time_left_long_formatter_); - BuildFormats(FORMAT_DURATION_LONG, &time_duration_long_formatter_); - BuildFormats(FORMAT_ELAPSED, &time_elapsed_formatter_); - } - ~TimeFormatter() { - } - friend struct base::DefaultLazyInstanceTraits<TimeFormatter>; - - ScopedVector<icu::PluralFormat> short_formatter_; - ScopedVector<icu::PluralFormat> time_left_formatter_; - ScopedVector<icu::PluralFormat> time_left_long_formatter_; - ScopedVector<icu::PluralFormat> time_duration_long_formatter_; - ScopedVector<icu::PluralFormat> time_elapsed_formatter_; - static void BuildFormats(FormatType format_type, - ScopedVector<icu::PluralFormat>* time_formats); - static icu::PluralFormat* createFallbackFormat( - const icu::PluralRules& rules, int index, FormatType format_type); - - DISALLOW_COPY_AND_ASSIGN(TimeFormatter); -}; +namespace ui { -static base::LazyInstance<TimeFormatter> g_time_formatter = +UI_BASE_EXPORT base::LazyInstance<FormatterContainer> g_container = LAZY_INSTANCE_INITIALIZER; -void TimeFormatter::BuildFormats( - FormatType format_type, ScopedVector<icu::PluralFormat>* time_formats) { - const MessageIDs& message_ids = GetMessageIDs(format_type); - - for (int i = 0; i < 4; ++i) { - icu::UnicodeString pattern; - std::vector<int> ids; - for (size_t j = 0; j < arraysize(message_ids.ids[i]); ++j) { - ids.push_back(message_ids.ids[i][j]); - } - scoped_ptr<icu::PluralFormat> format = l10n_util::BuildPluralFormat(ids); - if (format) { - time_formats->push_back(format.release()); - } else { - scoped_ptr<icu::PluralRules> rules(l10n_util::BuildPluralRules()); - time_formats->push_back(createFallbackFormat(*rules, i, format_type)); - } - } -} - -// Create a hard-coded fallback plural format. This will never be called -// unless translators make a mistake. -icu::PluralFormat* TimeFormatter::createFallbackFormat( - const icu::PluralRules& rules, int index, FormatType format_type) { - const icu::UnicodeString kUnits[4][2] = { - { UNICODE_STRING_SIMPLE("sec"), UNICODE_STRING_SIMPLE("secs") }, - { UNICODE_STRING_SIMPLE("min"), UNICODE_STRING_SIMPLE("mins") }, - { UNICODE_STRING_SIMPLE("hour"), UNICODE_STRING_SIMPLE("hours") }, - { UNICODE_STRING_SIMPLE("day"), UNICODE_STRING_SIMPLE("days") } - }; - icu::UnicodeString suffix(GetFallbackFormatSuffix(format_type), -1, US_INV); - icu::UnicodeString pattern; - if (rules.isKeyword(UNICODE_STRING_SIMPLE("one"))) { - pattern += UNICODE_STRING_SIMPLE("one{# ") + kUnits[index][0] + suffix; - } - pattern += UNICODE_STRING_SIMPLE(" other{# ") + kUnits[index][1] + suffix; - UErrorCode err = U_ZERO_ERROR; - icu::PluralFormat* format = new icu::PluralFormat(rules, pattern, err); - DCHECK(U_SUCCESS(err)); - return format; +// static +base::string16 TimeFormat::Simple(TimeFormat::Format format, + TimeFormat::Length length, + const base::TimeDelta& delta) { + return Detailed(format, length, 0, delta); } -base::string16 FormatTimeImpl(const TimeDelta& delta, FormatType format_type) { - if (delta.ToInternalValue() < 0) { +// static +base::string16 TimeFormat::Detailed(TimeFormat::Format format, + TimeFormat::Length length, + int cutoff, + const base::TimeDelta& delta) { + if (delta < TimeDelta::FromSeconds(0)) { NOTREACHED() << "Negative duration"; return base::string16(); } - int number; + // Negative cutoff: always use two-value format. + if (cutoff < 0) + cutoff = std::numeric_limits<int>::max(); - const std::vector<icu::PluralFormat*>& formatters = - g_time_formatter.Get().formatter(format_type); + const TimeDelta one_minute(TimeDelta::FromMinutes(1)); + const TimeDelta one_hour(TimeDelta::FromHours(1)); + const TimeDelta one_day(TimeDelta::FromDays(1)); + const TimeDelta half_second(TimeDelta::FromMilliseconds(500)); + const TimeDelta half_minute(TimeDelta::FromSeconds(30)); + const TimeDelta half_hour(TimeDelta::FromMinutes(30)); + const TimeDelta half_day(TimeDelta::FromHours(12)); - UErrorCode error = U_ZERO_ERROR; + // Rationale: Start by determining major (first) unit, then add minor (second) + // unit if mandated by |cutoff|. icu::UnicodeString time_string; - // Less than a minute gets "X seconds left" - if (delta.ToInternalValue() < Time::kMicrosecondsPerMinute) { - number = static_cast<int>(delta.ToInternalValue() / - Time::kMicrosecondsPerSecond); - time_string = formatters[0]->format(number, error); - - // Less than 1 hour gets "X minutes left". - } else if (delta.ToInternalValue() < Time::kMicrosecondsPerHour) { - number = static_cast<int>(delta.ToInternalValue() / - Time::kMicrosecondsPerMinute); - time_string = formatters[1]->format(number, error); + const Formatter* formatter = g_container.Get().Get(format, length); + if (delta < one_minute - half_second) { + // Anything up to 59.500 seconds is formatted as seconds. + const int seconds = static_cast<int>((delta + half_second).InSeconds()); + formatter->Format(Formatter::UNIT_SEC, seconds, time_string); + + } else if (delta < one_hour - (cutoff < 60 ? half_minute : half_second)) { + // Anything up to 59.5 minutes (respectively 59:59.500 when |cutoff| permits + // two-value output) is formatted as minutes (respectively minutes and + // seconds). + if (delta >= cutoff * one_minute - half_second) { + const int minutes = (delta + half_minute).InMinutes(); + formatter->Format(Formatter::UNIT_MIN, minutes, time_string); + } else { + const int minutes = (delta + half_second).InMinutes(); + const int seconds = static_cast<int>( + (delta + half_second).InSeconds() % 60); + formatter->Format(Formatter::TWO_UNITS_MIN_SEC, + minutes, seconds, time_string); + } - // Less than 1 day remaining gets "X hours left" - } else if (delta.ToInternalValue() < Time::kMicrosecondsPerDay) { - number = static_cast<int>(delta.ToInternalValue() / - Time::kMicrosecondsPerHour); - time_string = formatters[2]->format(number, error); + } else if (delta < one_day - (cutoff < 24 ? half_hour : half_minute)) { + // Anything up to 23.5 hours (respectively 23:59:30.000 when |cutoff| + // permits two-value output) is formatted as hours (respectively hours and + // minutes). + if (delta >= cutoff * one_hour - half_minute) { + const int hours = (delta + half_hour).InHours(); + formatter->Format(Formatter::UNIT_HOUR, hours, time_string); + } else { + const int hours = (delta + half_minute).InHours(); + const int minutes = (delta + half_minute).InMinutes() % 60; + formatter->Format(Formatter::TWO_UNITS_HOUR_MIN, + hours, minutes, time_string); + } - // Anything bigger gets "X days left" } else { - number = static_cast<int>(delta.ToInternalValue() / - Time::kMicrosecondsPerDay); - time_string = formatters[3]->format(number, error); + // Anything bigger is formatted as days (respectively days and hours). + if (delta >= cutoff * one_day - half_hour) { + const int days = (delta + half_day).InDays(); + formatter->Format(Formatter::UNIT_DAY, days, time_string); + } else { + const int days = (delta + half_hour).InDays(); + const int hours = (delta + half_hour).InHours() % 24; + formatter->Format(Formatter::TWO_UNITS_DAY_HOUR, + days, hours, time_string); + } } - // With the fallback added, this should never fail. - DCHECK(U_SUCCESS(error)); - int capacity = time_string.length() + 1; + const int capacity = time_string.length() + 1; DCHECK_GT(capacity, 1); base::string16 result; + UErrorCode error = U_ZERO_ERROR; time_string.extract(static_cast<UChar*>(WriteInto(&result, capacity)), capacity, error); DCHECK(U_SUCCESS(error)); return result; } -} // namespace - -namespace ui { - -// static -base::string16 TimeFormat::TimeElapsed(const TimeDelta& delta) { - return FormatTimeImpl(delta, FORMAT_ELAPSED); -} - -// static -base::string16 TimeFormat::TimeRemaining(const TimeDelta& delta) { - return FormatTimeImpl(delta, FORMAT_REMAINING); -} - -// static -base::string16 TimeFormat::TimeRemainingLong(const TimeDelta& delta) { - return FormatTimeImpl(delta, FORMAT_REMAINING_LONG); -} - -// static -base::string16 TimeFormat::TimeRemainingShort(const TimeDelta& delta) { - return FormatTimeImpl(delta, FORMAT_SHORT); -} - -// static -base::string16 TimeFormat::TimeDurationLong(const TimeDelta& delta) { - return FormatTimeImpl(delta, FORMAT_DURATION_LONG); -} - // static base::string16 TimeFormat::RelativeDate( const Time& time, diff --git a/chromium/ui/base/l10n/time_format.h b/chromium/ui/base/l10n/time_format.h index 0b3a1be3531..38da936d617 100644 --- a/chromium/ui/base/l10n/time_format.h +++ b/chromium/ui/base/l10n/time_format.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" #include "base/strings/string16.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace base { class Time; @@ -17,29 +17,61 @@ class TimeDelta; namespace ui { // Methods to format time values as strings. -class UI_EXPORT TimeFormat { +class UI_BASE_EXPORT TimeFormat { public: - // TimeElapsed, TimeRemaining and TimeRemainingShort functions: - // These functions return a localized string of approximate time duration. The - // conditions are simpler than PastTime since these functions are used for - // in-progress operations and users have different expectations of units. + enum Format { + FORMAT_DURATION, // Plain duration, e.g. in English: "2 minutes". + FORMAT_REMAINING, // Remaining time, e.g. in English: "2 minutes left". + FORMAT_ELAPSED, // Elapsed time, e.g. in English: "2 minutes ago". + FORMAT_COUNT // Enum size counter, not a format. Must be last. + }; - // Returns times in elapsed-format: "3 mins ago", "2 days ago". - static base::string16 TimeElapsed(const base::TimeDelta& delta); + enum Length { + LENGTH_SHORT, // Short format, e.g. in English: sec/min/hour/day. + LENGTH_LONG, // Long format, e.g. in English: second/minute/hour/day. + LENGTH_COUNT // Enum size counter, not a length. Must be last. + }; - // Returns times in remaining-format: "3 mins left", "2 days left". - static base::string16 TimeRemaining(const base::TimeDelta& delta); + // Return a localized string of approximate time duration, formatted as a + // single number, e.g. in English "2 hours ago". Currently, all combinations + // of format and length except (FORMAT_ELAPSED, LENGTH_LONG) are implemented + // but it's easy to add this, if required. + static base::string16 Simple(Format format, + Length length, + const base::TimeDelta& delta); - // Returns times in remaining-long-format: "3 minutes left", "2 days left". - // Currently, this only affects the minutes in long format, the rest - // of the time units are formatted the same as TimeRemaining does. - static base::string16 TimeRemainingLong(const base::TimeDelta& delta); - - // Returns times in short-format: "3 mins", "2 days". - static base::string16 TimeRemainingShort(const base::TimeDelta& delta); - - // Return times in long-format: "2 hours", "25 minutes". - static base::string16 TimeDurationLong(const base::TimeDelta& delta); + // Return a localized string of more precise time duration, either formatted + // as a single value or as two values: for a time delta of e.g. 2h19m either + // "2 hours" or "2 hours and 19 minutes" could be returned in English. + // Two-value output can be forced by setting |cutoff| to -1. Single-value + // output can be forced by using Simple() or setting |cutoff| to 0. + // Otherwise, choice of format happens automatically and the value of |cutoff| + // determines the largest numeric value that may appear in a single-value + // format -- for lower numeric values, a second unit is added to increase + // precision. (Applied to the examples above, a |cutoff| of 2 or smaller + // would yield the first string and a |cutoff| of 3 or larger would return the + // second string.) + // + // The aim of this logic is to reduce rounding errors (that in single-value + // representation can amount up to 33% of the true time duration) while at the + // same time avoiding over-precise time outputs such as e.g. "56 minutes 29 + // seconds". The relative rounding error is guaranteed to be less than 0.5 / + // |cutoff| (e.g. 5% for a |cutoff| of 10) and a second unit is only used when + // necessary to achieve the precision guarantee. + // + // Currently, the only combination of format and length that is implemented is + // (FORMAT_DURATION, LENGTH_LONG), but it's easy to add others if required. + // + // Note: To allow pre-, post- and infixes which can be inflected depending on + // either the first or the second value, two separate translation strings + // (IDS_TIME_*_1ST and IDS_TIME_*_2ND) are used per [plurality] times [pair of + // units] and are concatenated after having been formatted individually. The + // separator between first unit and second unit (a blank in English) is + // included in IDS_TIME_*_1ST. + static base::string16 Detailed(Format format, + Length length, + int cutoff, + const base::TimeDelta& delta); // For displaying a relative time in the past. This method returns either // "Today", "Yesterday", or an empty string if it's older than that. Returns diff --git a/chromium/ui/base/l10n/time_format_unittest.cc b/chromium/ui/base/l10n/time_format_unittest.cc index eaee957136f..9a237b19e1f 100644 --- a/chromium/ui/base/l10n/time_format_unittest.cc +++ b/chromium/ui/base/l10n/time_format_unittest.cc @@ -4,68 +4,348 @@ #include "ui/base/l10n/time_format.h" +#include "base/files/file_path.h" #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/l10n/formatter.h" #include "ui/base/resource/resource_bundle.h" +using base::ASCIIToUTF16; + namespace ui { namespace { using base::TimeDelta; -void TestTimeFormats(const TimeDelta& delta, const char* expected_ascii) { - string16 expected = ASCIIToUTF16(expected_ascii); - string16 expected_left = expected + ASCIIToUTF16(" left"); - string16 expected_ago = expected + ASCIIToUTF16(" ago"); - EXPECT_EQ(expected, TimeFormat::TimeRemainingShort(delta)); - EXPECT_EQ(expected_left, TimeFormat::TimeRemaining(delta)); - EXPECT_EQ(expected_ago, TimeFormat::TimeElapsed(delta)); +class TimeFormatTest : public ::testing::Test { + public: + TimeFormatTest() : + delta_0s_(TimeDelta::FromSeconds(0)), + delta_1ms_(TimeDelta::FromMilliseconds(1)), + delta_499ms_(TimeDelta::FromMilliseconds(499)), + delta_500ms_(TimeDelta::FromMilliseconds(500)), + delta_999ms_(TimeDelta::FromMilliseconds(999)), + delta_1s_(TimeDelta::FromSeconds(1)), + delta_1s499ms_(delta_1s_ + delta_499ms_), + delta_1s500ms_(delta_1s_ + delta_500ms_), + delta_2s_(TimeDelta::FromSeconds(2)), + delta_29s_(TimeDelta::FromSeconds(29)), + delta_30s_(TimeDelta::FromSeconds(30)), + delta_59s_(TimeDelta::FromSeconds(59)), + delta_59s499ms_(delta_59s_ + delta_499ms_), + delta_59s500ms_(delta_59s_ + delta_500ms_), + delta_1m_(TimeDelta::FromMinutes(1)), + delta_1m2s_(delta_1m_ + delta_2s_), + delta_1m29s999ms_(delta_1m_ + delta_29s_ + delta_999ms_), + delta_1m30s_(delta_1m_ + delta_30s_), + delta_2m_(TimeDelta::FromMinutes(2)), + delta_2m1s_(delta_2m_ + delta_1s_), + delta_29m_(TimeDelta::FromMinutes(29)), + delta_30m_(TimeDelta::FromMinutes(30)), + delta_59m_(TimeDelta::FromMinutes(59)), + delta_59m29s999ms_(delta_59m_ + delta_29s_ + delta_999ms_), + delta_59m30s_(delta_59m_ + delta_30s_), + delta_59m59s499ms_(delta_59m_ + delta_59s_ + delta_499ms_), + delta_59m59s500ms_(delta_59m_ + delta_59s_ + delta_500ms_), + delta_1h_(TimeDelta::FromHours(1)), + delta_1h2m_(delta_1h_ + delta_2m_), + delta_1h29m59s999ms_(delta_1h_ + delta_29m_ + delta_59s_ + delta_999ms_), + delta_1h30m_(delta_1h_ + delta_30m_), + delta_2h_(TimeDelta::FromHours(2)), + delta_2h1m_(delta_2h_ + delta_1m_), + delta_11h_(TimeDelta::FromHours(11)), + delta_12h_(TimeDelta::FromHours(12)), + delta_23h_(TimeDelta::FromHours(23)), + delta_23h29m59s999ms_(delta_23h_ + delta_29m_ + delta_59s_ + + delta_999ms_), + delta_23h30m_(delta_23h_ + delta_30m_), + delta_23h59m29s999ms_(delta_23h_ + delta_59m_ + delta_29s_ + + delta_999ms_), + delta_23h59m30s_(delta_23h_ + delta_59m_ + delta_30s_), + delta_1d_(TimeDelta::FromDays(1)), + delta_1d2h_(delta_1d_ + delta_2h_), + delta_1d11h59m59s999ms_(delta_1d_ + delta_11h_ + delta_59m_ + delta_29s_ + + delta_999ms_), + delta_1d12h_(delta_1d_ + delta_12h_), + delta_2d_(TimeDelta::FromDays(2)), + delta_2d1h_(delta_2d_ + delta_1h_) + {} + + protected: + void TestStrings() { + // Test English strings (simple, singular). + EXPECT_EQ(ASCIIToUTF16("1 sec"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_1s_)); + EXPECT_EQ(ASCIIToUTF16("1 min"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_1m_)); + EXPECT_EQ(ASCIIToUTF16("1 hour"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_1h_)); + EXPECT_EQ(ASCIIToUTF16("1 day"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_1d_)); + EXPECT_EQ(ASCIIToUTF16("1 second"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, delta_1s_)); + EXPECT_EQ(ASCIIToUTF16("1 minute"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, delta_1m_)); + EXPECT_EQ(ASCIIToUTF16("1 hour"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, delta_1h_)); + EXPECT_EQ(ASCIIToUTF16("1 day"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, delta_1d_)); + EXPECT_EQ(ASCIIToUTF16("1 sec left"), TimeFormat::Simple( + TimeFormat::FORMAT_REMAINING, TimeFormat::LENGTH_SHORT, delta_1s_)); + EXPECT_EQ(ASCIIToUTF16("1 min left"), TimeFormat::Simple( + TimeFormat::FORMAT_REMAINING, TimeFormat::LENGTH_SHORT, delta_1m_)); + EXPECT_EQ(ASCIIToUTF16("1 hour left"), TimeFormat::Simple( + TimeFormat::FORMAT_REMAINING, TimeFormat::LENGTH_SHORT, delta_1h_)); + EXPECT_EQ(ASCIIToUTF16("1 day left"), TimeFormat::Simple( + TimeFormat::FORMAT_REMAINING, TimeFormat::LENGTH_SHORT, delta_1d_)); + EXPECT_EQ(ASCIIToUTF16("1 second left"), TimeFormat::Simple( + TimeFormat::FORMAT_REMAINING, TimeFormat::LENGTH_LONG, delta_1s_)); + EXPECT_EQ(ASCIIToUTF16("1 minute left"), TimeFormat::Simple( + TimeFormat::FORMAT_REMAINING, TimeFormat::LENGTH_LONG, delta_1m_)); + EXPECT_EQ(ASCIIToUTF16("1 hour left"), TimeFormat::Simple( + TimeFormat::FORMAT_REMAINING, TimeFormat::LENGTH_LONG, delta_1h_)); + EXPECT_EQ(ASCIIToUTF16("1 day left"), TimeFormat::Simple( + TimeFormat::FORMAT_REMAINING, TimeFormat::LENGTH_LONG, delta_1d_)); + EXPECT_EQ(ASCIIToUTF16("1 sec ago"), TimeFormat::Simple( + TimeFormat::FORMAT_ELAPSED, TimeFormat::LENGTH_SHORT, delta_1s_)); + EXPECT_EQ(ASCIIToUTF16("1 min ago"), TimeFormat::Simple( + TimeFormat::FORMAT_ELAPSED, TimeFormat::LENGTH_SHORT, delta_1m_)); + EXPECT_EQ(ASCIIToUTF16("1 hour ago"), TimeFormat::Simple( + TimeFormat::FORMAT_ELAPSED, TimeFormat::LENGTH_SHORT, delta_1h_)); + EXPECT_EQ(ASCIIToUTF16("1 day ago"), TimeFormat::Simple( + TimeFormat::FORMAT_ELAPSED, TimeFormat::LENGTH_SHORT, delta_1d_)); + + // Test English strings (simple, plural). + EXPECT_EQ(ASCIIToUTF16("2 secs"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_2s_)); + EXPECT_EQ(ASCIIToUTF16("2 mins"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_2m_)); + EXPECT_EQ(ASCIIToUTF16("2 hours"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_2h_)); + EXPECT_EQ(ASCIIToUTF16("2 days"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_2d_)); + EXPECT_EQ(ASCIIToUTF16("2 seconds"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, delta_2s_)); + EXPECT_EQ(ASCIIToUTF16("2 minutes"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, delta_2m_)); + EXPECT_EQ(ASCIIToUTF16("2 hours"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, delta_2h_)); + EXPECT_EQ(ASCIIToUTF16("2 days"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, delta_2d_)); + EXPECT_EQ(ASCIIToUTF16("2 secs left"), TimeFormat::Simple( + TimeFormat::FORMAT_REMAINING, TimeFormat::LENGTH_SHORT, delta_2s_)); + EXPECT_EQ(ASCIIToUTF16("2 mins left"), TimeFormat::Simple( + TimeFormat::FORMAT_REMAINING, TimeFormat::LENGTH_SHORT, delta_2m_)); + EXPECT_EQ(ASCIIToUTF16("2 hours left"), TimeFormat::Simple( + TimeFormat::FORMAT_REMAINING, TimeFormat::LENGTH_SHORT, delta_2h_)); + EXPECT_EQ(ASCIIToUTF16("2 days left"), TimeFormat::Simple( + TimeFormat::FORMAT_REMAINING, TimeFormat::LENGTH_SHORT, delta_2d_)); + EXPECT_EQ(ASCIIToUTF16("2 seconds left"), TimeFormat::Simple( + TimeFormat::FORMAT_REMAINING, TimeFormat::LENGTH_LONG, delta_2s_)); + EXPECT_EQ(ASCIIToUTF16("2 minutes left"), TimeFormat::Simple( + TimeFormat::FORMAT_REMAINING, TimeFormat::LENGTH_LONG, delta_2m_)); + EXPECT_EQ(ASCIIToUTF16("2 hours left"), TimeFormat::Simple( + TimeFormat::FORMAT_REMAINING, TimeFormat::LENGTH_LONG, delta_2h_)); + EXPECT_EQ(ASCIIToUTF16("2 days left"), TimeFormat::Simple( + TimeFormat::FORMAT_REMAINING, TimeFormat::LENGTH_LONG, delta_2d_)); + EXPECT_EQ(ASCIIToUTF16("2 secs ago"), TimeFormat::Simple( + TimeFormat::FORMAT_ELAPSED, TimeFormat::LENGTH_SHORT, delta_2s_)); + EXPECT_EQ(ASCIIToUTF16("2 mins ago"), TimeFormat::Simple( + TimeFormat::FORMAT_ELAPSED, TimeFormat::LENGTH_SHORT, delta_2m_)); + EXPECT_EQ(ASCIIToUTF16("2 hours ago"), TimeFormat::Simple( + TimeFormat::FORMAT_ELAPSED, TimeFormat::LENGTH_SHORT, delta_2h_)); + EXPECT_EQ(ASCIIToUTF16("2 days ago"), TimeFormat::Simple( + TimeFormat::FORMAT_ELAPSED, TimeFormat::LENGTH_SHORT, delta_2d_)); + + // Test English strings (detailed, singular and plural). + EXPECT_EQ(ASCIIToUTF16("1 minute 2 seconds"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 3, delta_1m2s_)); + EXPECT_EQ(ASCIIToUTF16("2 minutes 1 second"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 3, delta_2m1s_)); + EXPECT_EQ(ASCIIToUTF16("1 hour 2 minutes"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 3, delta_1h2m_)); + EXPECT_EQ(ASCIIToUTF16("2 hours 1 minute"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 3, delta_2h1m_)); + EXPECT_EQ(ASCIIToUTF16("1 day 2 hours"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 3, delta_1d2h_)); + EXPECT_EQ(ASCIIToUTF16("2 days 1 hour"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 3, delta_2d1h_)); + } + + TimeDelta delta_0s_; + TimeDelta delta_1ms_; + TimeDelta delta_499ms_; + TimeDelta delta_500ms_; + TimeDelta delta_999ms_; + TimeDelta delta_1s_; + TimeDelta delta_1s499ms_; + TimeDelta delta_1s500ms_; + TimeDelta delta_2s_; + TimeDelta delta_29s_; + TimeDelta delta_30s_; + TimeDelta delta_59s_; + TimeDelta delta_59s499ms_; + TimeDelta delta_59s500ms_; + TimeDelta delta_1m_; + TimeDelta delta_1m2s_; + TimeDelta delta_1m29s999ms_; + TimeDelta delta_1m30s_; + TimeDelta delta_2m_; + TimeDelta delta_2m1s_; + TimeDelta delta_29m_; + TimeDelta delta_30m_; + TimeDelta delta_59m_; + TimeDelta delta_59m29s999ms_; + TimeDelta delta_59m30s_; + TimeDelta delta_59m59s499ms_; + TimeDelta delta_59m59s500ms_; + TimeDelta delta_1h_; + TimeDelta delta_1h2m_; + TimeDelta delta_1h29m59s999ms_; + TimeDelta delta_1h30m_; + TimeDelta delta_2h_; + TimeDelta delta_2h1m_; + TimeDelta delta_11h_; + TimeDelta delta_12h_; + TimeDelta delta_23h_; + TimeDelta delta_23h29m59s999ms_; + TimeDelta delta_23h30m_; + TimeDelta delta_23h59m29s999ms_; + TimeDelta delta_23h59m30s_; + TimeDelta delta_1d_; + TimeDelta delta_1d2h_; + TimeDelta delta_1d11h59m59s999ms_; + TimeDelta delta_1d12h_; + TimeDelta delta_2d_; + TimeDelta delta_2d1h_; +}; + +TEST_F(TimeFormatTest, SimpleAndDetailedRounding) { + // Test rounding behavior (simple). + EXPECT_EQ(ASCIIToUTF16("0 secs"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_0s_)); + EXPECT_EQ(ASCIIToUTF16("0 secs"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_499ms_)); + EXPECT_EQ(ASCIIToUTF16("1 sec"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_500ms_)); + EXPECT_EQ(ASCIIToUTF16("1 sec"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_1s499ms_)); + EXPECT_EQ(ASCIIToUTF16("2 secs"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_1s500ms_)); + EXPECT_EQ(ASCIIToUTF16("59 secs"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_59s499ms_)); + EXPECT_EQ(ASCIIToUTF16("1 min"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_59s500ms_)); + EXPECT_EQ(ASCIIToUTF16("1 min"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, + delta_1m29s999ms_)); + EXPECT_EQ(ASCIIToUTF16("2 mins"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_1m30s_)); + EXPECT_EQ(ASCIIToUTF16("59 mins"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, + delta_59m29s999ms_)); + EXPECT_EQ(ASCIIToUTF16("1 hour"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_59m30s_)); + EXPECT_EQ(ASCIIToUTF16("1 hour"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, + delta_1h29m59s999ms_)); + EXPECT_EQ(ASCIIToUTF16("2 hours"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_1h30m_)); + EXPECT_EQ(ASCIIToUTF16("23 hours"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, + delta_23h29m59s999ms_)); + EXPECT_EQ(ASCIIToUTF16("1 day"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_23h30m_)); + EXPECT_EQ(ASCIIToUTF16("1 day"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, + delta_1d11h59m59s999ms_)); + EXPECT_EQ(ASCIIToUTF16("2 days"), TimeFormat::Simple( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_SHORT, delta_1d12h_)); + + // Test rounding behavior (detailed). + EXPECT_EQ(ASCIIToUTF16("59 seconds"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 100, + delta_59s499ms_)); + EXPECT_EQ(ASCIIToUTF16("1 minute 0 seconds"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 2, + delta_59s500ms_)); + EXPECT_EQ(ASCIIToUTF16("1 minute"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 1, + delta_59s500ms_)); + EXPECT_EQ(ASCIIToUTF16("59 minutes 59 seconds"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 60, + delta_59m59s499ms_)); + EXPECT_EQ(ASCIIToUTF16("1 hour 0 minutes"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 59, + delta_59m59s499ms_)); + EXPECT_EQ(ASCIIToUTF16("1 hour 0 minutes"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 2, + delta_59m59s499ms_)); + EXPECT_EQ(ASCIIToUTF16("1 hour"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 1, + delta_59m59s499ms_)); + EXPECT_EQ(ASCIIToUTF16("1 hour"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 1, + delta_59m59s500ms_)); + EXPECT_EQ(ASCIIToUTF16("1 hour 0 minutes"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 2, + delta_59m59s500ms_)); + EXPECT_EQ(ASCIIToUTF16("23 hours 59 minutes"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 24, + delta_23h59m29s999ms_)); + EXPECT_EQ(ASCIIToUTF16("1 day 0 hours"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 23, + delta_23h59m29s999ms_)); + EXPECT_EQ(ASCIIToUTF16("1 day 0 hours"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 2, + delta_23h59m29s999ms_)); + EXPECT_EQ(ASCIIToUTF16("1 day"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 1, + delta_23h59m29s999ms_)); + EXPECT_EQ(ASCIIToUTF16("1 day"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 1, + delta_23h59m30s_)); + EXPECT_EQ(ASCIIToUTF16("1 day 0 hours"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, 2, + delta_23h59m30s_)); + EXPECT_EQ(ASCIIToUTF16("1 day 0 hours"), TimeFormat::Detailed( + TimeFormat::FORMAT_DURATION, TimeFormat::LENGTH_LONG, -1, + delta_23h59m30s_)); +} + +// Test strings in default code path. +TEST_F(TimeFormatTest, SimpleAndDetailedStrings) { + TestStrings(); } -TEST(TimeFormat, FormatTime) { - const TimeDelta one_day = TimeDelta::FromDays(1); - const TimeDelta three_days = TimeDelta::FromDays(3); - const TimeDelta one_hour = TimeDelta::FromHours(1); - const TimeDelta four_hours = TimeDelta::FromHours(4); - const TimeDelta one_min = TimeDelta::FromMinutes(1); - const TimeDelta three_mins = TimeDelta::FromMinutes(3); - const TimeDelta one_sec = TimeDelta::FromSeconds(1); - const TimeDelta five_secs = TimeDelta::FromSeconds(5); - const TimeDelta twohundred_millisecs = TimeDelta::FromMilliseconds(200); - - // TODO(jungshik) : These test only pass when the OS locale is 'en'. - // We need to add SetUp() and TearDown() to set the locale to 'en'. - TestTimeFormats(twohundred_millisecs, "0 secs"); - TestTimeFormats(one_sec - twohundred_millisecs, "0 secs"); - TestTimeFormats(one_sec + twohundred_millisecs, "1 sec"); - TestTimeFormats(five_secs + twohundred_millisecs, "5 secs"); - TestTimeFormats(one_min + five_secs, "1 min"); - TestTimeFormats(three_mins + twohundred_millisecs, "3 mins"); - TestTimeFormats(one_hour + five_secs, "1 hour"); - TestTimeFormats(four_hours + five_secs, "4 hours"); - TestTimeFormats(one_day + five_secs, "1 day"); - TestTimeFormats(three_days, "3 days"); - TestTimeFormats(three_days + four_hours, "3 days"); +// Test strings in fallback path in case of translator error. +TEST_F(TimeFormatTest, SimpleAndDetailedStringFallback) { + formatter_force_fallback = true; + g_container.Get().ResetForTesting(); + TestStrings(); + formatter_force_fallback = false; + g_container.Get().ResetForTesting(); } // crbug.com/159388: This test fails when daylight savings time ends. -TEST(TimeFormat, RelativeDate) { +TEST_F(TimeFormatTest, RelativeDate) { base::Time now = base::Time::Now(); - string16 today_str = TimeFormat::RelativeDate(now, NULL); + base::string16 today_str = TimeFormat::RelativeDate(now, NULL); EXPECT_EQ(ASCIIToUTF16("Today"), today_str); base::Time yesterday = now - TimeDelta::FromDays(1); - string16 yesterday_str = TimeFormat::RelativeDate(yesterday, NULL); + base::string16 yesterday_str = TimeFormat::RelativeDate(yesterday, NULL); EXPECT_EQ(ASCIIToUTF16("Yesterday"), yesterday_str); base::Time two_days_ago = now - TimeDelta::FromDays(2); - string16 two_days_ago_str = TimeFormat::RelativeDate(two_days_ago, NULL); + base::string16 two_days_ago_str = + TimeFormat::RelativeDate(two_days_ago, NULL); EXPECT_TRUE(two_days_ago_str.empty()); base::Time a_week_ago = now - TimeDelta::FromDays(7); - string16 a_week_ago_str = TimeFormat::RelativeDate(a_week_ago, NULL); + base::string16 a_week_ago_str = TimeFormat::RelativeDate(a_week_ago, NULL); EXPECT_TRUE(a_week_ago_str.empty()); } diff --git a/chromium/ui/base/layout.cc b/chromium/ui/base/layout.cc index 2c1fb51a395..aa3aecf55bd 100644 --- a/chromium/ui/base/layout.cc +++ b/chromium/ui/base/layout.cc @@ -20,6 +20,7 @@ #if defined(OS_WIN) #include "base/win/metro.h" +#include "ui/gfx/win/dpi.h" #include <Windows.h> #endif // defined(OS_WIN) @@ -28,53 +29,18 @@ namespace ui { namespace { bool ScaleFactorComparator(const ScaleFactor& lhs, const ScaleFactor& rhs){ - return GetImageScale(lhs) < GetImageScale(rhs); + return GetScaleForScaleFactor(lhs) < GetScaleForScaleFactor(rhs); } std::vector<ScaleFactor>* g_supported_scale_factors = NULL; -#if defined(OS_WIN) -// Helper function that determines whether we want to optimize the UI for touch. -bool UseTouchOptimizedUI() { - // If --touch-optimized-ui is specified and not set to "auto", then override - // the hardware-determined setting (eg. for testing purposes). - static bool has_touch_optimized_ui = CommandLine::ForCurrentProcess()-> - HasSwitch(switches::kTouchOptimizedUI); - if (has_touch_optimized_ui) { - const std::string switch_value = CommandLine::ForCurrentProcess()-> - GetSwitchValueASCII(switches::kTouchOptimizedUI); - - // Note that simply specifying the switch is the same as enabled. - if (switch_value.empty() || - switch_value == switches::kTouchOptimizedUIEnabled) { - return true; - } else if (switch_value == switches::kTouchOptimizedUIDisabled) { - return false; - } else if (switch_value != switches::kTouchOptimizedUIAuto) { - LOG(ERROR) << "Invalid --touch-optimized-ui option: " << switch_value; - } - } - - // We use the touch layout only when we are running in Metro mode. - return base::win::IsMetroProcess() && ui::IsTouchDevicePresent(); -} -#endif // defined(OS_WIN) - const float kScaleFactorScales[] = {1.0f, 1.0f, 1.25f, 1.33f, 1.4f, 1.5f, 1.8f, - 2.0f, 3.0f}; + 2.0f, 2.5f, 3.0f}; COMPILE_ASSERT(NUM_SCALE_FACTORS == arraysize(kScaleFactorScales), kScaleFactorScales_incorrect_size); } // namespace -DisplayLayout GetDisplayLayout() { -#if defined(OS_WIN) - if (UseTouchOptimizedUI()) - return LAYOUT_TOUCH; -#endif - return LAYOUT_DESKTOP; -} - void SetSupportedScaleFactors( const std::vector<ui::ScaleFactor>& scale_factors) { if (g_supported_scale_factors != NULL) @@ -90,7 +56,7 @@ void SetSupportedScaleFactors( for (std::vector<ScaleFactor>::const_iterator it = g_supported_scale_factors->begin(); it != g_supported_scale_factors->end(); ++it) { - scales.push_back(GetImageScale(*it)); + scales.push_back(kScaleFactorScales[*it]); } gfx::ImageSkia::SetSupportedScales(scales); } @@ -117,31 +83,15 @@ ScaleFactor GetSupportedScaleFactor(float scale) { } float GetImageScale(ScaleFactor scale_factor) { - return kScaleFactorScales[scale_factor]; -} - -bool IsScaleFactorSupported(ScaleFactor scale_factor) { - DCHECK(g_supported_scale_factors != NULL); - return std::find(g_supported_scale_factors->begin(), - g_supported_scale_factors->end(), - scale_factor) != g_supported_scale_factors->end(); +#if defined(OS_WIN) + if (gfx::IsHighDPIEnabled()) + return gfx::win::GetDeviceScaleFactor(); +#endif + return GetScaleForScaleFactor(scale_factor); } -// Returns the scale factor closest to |scale| from the full list of factors. -// Note that it does NOT rely on the list of supported scale factors. -// Finding the closest match is inefficient and shouldn't be done frequently. -ScaleFactor FindClosestScaleFactorUnsafe(float scale) { - float smallest_diff = std::numeric_limits<float>::max(); - ScaleFactor closest_match = SCALE_FACTOR_100P; - for (int i = SCALE_FACTOR_100P; i < NUM_SCALE_FACTORS; ++i) { - const ScaleFactor scale_factor = static_cast<ScaleFactor>(i); - float diff = std::abs(kScaleFactorScales[scale_factor] - scale); - if (diff < smallest_diff) { - closest_match = scale_factor; - smallest_diff = diff; - } - } - return closest_match; +float GetScaleForScaleFactor(ScaleFactor scale_factor) { + return kScaleFactorScales[scale_factor]; } namespace test { @@ -170,13 +120,13 @@ ScopedSetSupportedScaleFactors::~ScopedSetSupportedScaleFactors() { } // namespace test #if !defined(OS_MACOSX) -ScaleFactor GetScaleFactorForNativeView(gfx::NativeView view) { +float GetScaleFactorForNativeView(gfx::NativeView view) { gfx::Screen* screen = gfx::Screen::GetScreenFor(view); if (screen->IsDIPEnabled()) { gfx::Display display = screen->GetDisplayNearestWindow(view); - return GetSupportedScaleFactor(display.device_scale_factor()); + return display.device_scale_factor(); } - return ui::SCALE_FACTOR_100P; + return 1.0f; } #endif // !defined(OS_MACOSX) diff --git a/chromium/ui/base/layout.h b/chromium/ui/base/layout.h index 6179a84f721..eaaa926a41e 100644 --- a/chromium/ui/base/layout.h +++ b/chromium/ui/base/layout.h @@ -8,26 +8,11 @@ #include <vector> #include "build/build_config.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/native_widget_types.h" namespace ui { -enum DisplayLayout { - // The typical layout for e.g. Windows, Mac and Linux. - LAYOUT_DESKTOP, - - // Layout optimized for touch. Used e.g. for Windows 8 Metro mode. - LAYOUT_TOUCH, -}; - -// Returns the display layout that should be used. This could be used -// e.g. to tweak hard-coded padding that's layout specific, or choose -// the .pak file of theme resources to load. -// WARNING: this is deprecated and will be nuked as soon as aura is the default -// on windows. -UI_EXPORT DisplayLayout GetDisplayLayout(); - // Supported UI scale factors for the platform. This is used as an index // into the array |kScaleFactorScales| which maps the enum value to a float. // SCALE_FACTOR_NONE is used for density independent resources such as @@ -42,6 +27,7 @@ enum ScaleFactor { SCALE_FACTOR_150P, SCALE_FACTOR_180P, SCALE_FACTOR_200P, + SCALE_FACTOR_250P, SCALE_FACTOR_300P, NUM_SCALE_FACTORS // This always appears last. @@ -50,37 +36,28 @@ enum ScaleFactor { // Changes the value of GetSupportedScaleFactors() to |scale_factors|. // Use ScopedSetSupportedScaleFactors for unit tests as not to affect the // state of other tests. -UI_EXPORT void SetSupportedScaleFactors( +UI_BASE_EXPORT void SetSupportedScaleFactors( const std::vector<ScaleFactor>& scale_factors); // Returns a vector with the scale factors which are supported by this // platform, in ascending order. -UI_EXPORT const std::vector<ScaleFactor>& GetSupportedScaleFactors(); - -// Returns the float scale value for |scale_factor|. -UI_EXPORT float GetImageScale(ScaleFactor scale_factor); +UI_BASE_EXPORT const std::vector<ScaleFactor>& GetSupportedScaleFactors(); // Returns the supported ScaleFactor which most closely matches |scale|. // Converting from float to ScaleFactor is inefficient and should be done as // little as possible. -// TODO(oshima): Make ScaleFactor a class and remove this. -UI_EXPORT ScaleFactor GetSupportedScaleFactor(float image_scale); +UI_BASE_EXPORT ScaleFactor GetSupportedScaleFactor(float image_scale); // Returns the ScaleFactor used by |view|. -UI_EXPORT ScaleFactor GetScaleFactorForNativeView(gfx::NativeView view); - -// Returns true if |scale_factor| is supported by this platform. -UI_EXPORT bool IsScaleFactorSupported(ScaleFactor scale_factor); +UI_BASE_EXPORT float GetScaleFactorForNativeView(gfx::NativeView view); -// Returns the scale factor closest to |scale| from the full list of factors. -// Note that it does NOT rely on the list of supported scale factors. -// Finding the closest match is inefficient and shouldn't be done frequently. -UI_EXPORT ScaleFactor FindClosestScaleFactorUnsafe(float scale); +// Returns the image scale for the scale factor passed in. +UI_BASE_EXPORT float GetScaleForScaleFactor(ScaleFactor scale_factor); namespace test { // Class which changes the value of GetSupportedScaleFactors() to // |new_scale_factors| for the duration of its lifetime. -class UI_EXPORT ScopedSetSupportedScaleFactors { +class UI_BASE_EXPORT ScopedSetSupportedScaleFactors { public: explicit ScopedSetSupportedScaleFactors( const std::vector<ui::ScaleFactor>& new_scale_factors); diff --git a/chromium/ui/base/layout_mac.mm b/chromium/ui/base/layout_mac.mm index 6e50de14f8d..62331e99f0d 100644 --- a/chromium/ui/base/layout_mac.mm +++ b/chromium/ui/base/layout_mac.mm @@ -31,8 +31,8 @@ float GetScaleFactorScaleForNativeView(gfx::NativeView view) { namespace ui { -ScaleFactor GetScaleFactorForNativeView(gfx::NativeView view) { - return GetSupportedScaleFactor(GetScaleFactorScaleForNativeView(view)); +float GetScaleFactorForNativeView(gfx::NativeView view) { + return GetScaleFactorScaleForNativeView(view); } } // namespace ui diff --git a/chromium/ui/base/layout_unittest.cc b/chromium/ui/base/layout_unittest.cc index b082beab72a..070247079ef 100644 --- a/chromium/ui/base/layout_unittest.cc +++ b/chromium/ui/base/layout_unittest.cc @@ -14,14 +14,15 @@ namespace ui { TEST(LayoutTest, GetScaleFactorScale) { - EXPECT_FLOAT_EQ(1.0f, GetImageScale(SCALE_FACTOR_100P)); - EXPECT_FLOAT_EQ(1.25f, GetImageScale(SCALE_FACTOR_125P)); - EXPECT_FLOAT_EQ(1.33f, GetImageScale(SCALE_FACTOR_133P)); - EXPECT_FLOAT_EQ(1.4f, GetImageScale(SCALE_FACTOR_140P)); - EXPECT_FLOAT_EQ(1.5f, GetImageScale(SCALE_FACTOR_150P)); - EXPECT_FLOAT_EQ(1.8f, GetImageScale(SCALE_FACTOR_180P)); - EXPECT_FLOAT_EQ(2.0f, GetImageScale(SCALE_FACTOR_200P)); - EXPECT_FLOAT_EQ(3.0f, GetImageScale(SCALE_FACTOR_300P)); + EXPECT_FLOAT_EQ(1.0f, GetScaleForScaleFactor(SCALE_FACTOR_100P)); + EXPECT_FLOAT_EQ(1.25f, GetScaleForScaleFactor(SCALE_FACTOR_125P)); + EXPECT_FLOAT_EQ(1.33f, GetScaleForScaleFactor(SCALE_FACTOR_133P)); + EXPECT_FLOAT_EQ(1.4f, GetScaleForScaleFactor(SCALE_FACTOR_140P)); + EXPECT_FLOAT_EQ(1.5f, GetScaleForScaleFactor(SCALE_FACTOR_150P)); + EXPECT_FLOAT_EQ(1.8f, GetScaleForScaleFactor(SCALE_FACTOR_180P)); + EXPECT_FLOAT_EQ(2.0f, GetScaleForScaleFactor(SCALE_FACTOR_200P)); + EXPECT_FLOAT_EQ(2.5f, GetScaleForScaleFactor(SCALE_FACTOR_250P)); + EXPECT_FLOAT_EQ(3.0f, GetScaleForScaleFactor(SCALE_FACTOR_300P)); } TEST(LayoutTest, GetScaleFactorFromScalePartlySupported) { @@ -61,6 +62,10 @@ TEST(LayoutTest, GetScaleFactorFromScaleAllSupported) { EXPECT_EQ(SCALE_FACTOR_200P, GetSupportedScaleFactor(1.91f)); EXPECT_EQ(SCALE_FACTOR_200P, GetSupportedScaleFactor(2.0f)); EXPECT_EQ(SCALE_FACTOR_200P, GetSupportedScaleFactor(2.1f)); + EXPECT_EQ(SCALE_FACTOR_250P, GetSupportedScaleFactor(2.3f)); + EXPECT_EQ(SCALE_FACTOR_250P, GetSupportedScaleFactor(2.5f)); + EXPECT_EQ(SCALE_FACTOR_250P, GetSupportedScaleFactor(2.6f)); + EXPECT_EQ(SCALE_FACTOR_300P, GetSupportedScaleFactor(2.9f)); EXPECT_EQ(SCALE_FACTOR_300P, GetSupportedScaleFactor(3.0f)); EXPECT_EQ(SCALE_FACTOR_300P, GetSupportedScaleFactor(3.1f)); EXPECT_EQ(SCALE_FACTOR_300P, GetSupportedScaleFactor(999.0f)); diff --git a/chromium/ui/base/models/button_menu_item_model.h b/chromium/ui/base/models/button_menu_item_model.h index b9875b2f3e2..b0bc95bd03a 100644 --- a/chromium/ui/base/models/button_menu_item_model.h +++ b/chromium/ui/base/models/button_menu_item_model.h @@ -8,13 +8,13 @@ #include <vector> #include "base/strings/string16.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { // A model representing the rows of buttons that should be inserted in a button // containing menu item. -class UI_EXPORT ButtonMenuItemModel { +class UI_BASE_EXPORT ButtonMenuItemModel { public: // Types of buttons. enum ButtonType { @@ -23,7 +23,7 @@ class UI_EXPORT ButtonMenuItemModel { TYPE_BUTTON_LABEL }; - class UI_EXPORT Delegate { + class UI_BASE_EXPORT Delegate { public: // Some command ids have labels that change over time. virtual bool IsItemForCommandIdDynamic(int command_id) const; diff --git a/chromium/ui/base/models/combobox_model.h b/chromium/ui/base/models/combobox_model.h index 1022685c8bc..361810989f8 100644 --- a/chromium/ui/base/models/combobox_model.h +++ b/chromium/ui/base/models/combobox_model.h @@ -6,14 +6,14 @@ #define UI_BASE_MODELS_COMBOBOX_MODEL_H_ #include "base/strings/string16.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { class ComboboxModelObserver; // A data model for a combo box. -class UI_EXPORT ComboboxModel { +class UI_BASE_EXPORT ComboboxModel { public: // Returns the number of items in the combo box. virtual int GetItemCount() const = 0; diff --git a/chromium/ui/base/models/combobox_model_observer.h b/chromium/ui/base/models/combobox_model_observer.h index e79f7375134..f8e281e1842 100644 --- a/chromium/ui/base/models/combobox_model_observer.h +++ b/chromium/ui/base/models/combobox_model_observer.h @@ -5,16 +5,18 @@ #ifndef UI_BASE_MODELS_COMBOBOX_MODEL_OBSERVER_H_ #define UI_BASE_MODELS_COMBOBOX_MODEL_OBSERVER_H_ -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { +class ComboboxModel; + // Observer for the ComboboxModel. -class UI_EXPORT ComboboxModelObserver { +class UI_BASE_EXPORT ComboboxModelObserver { public: - // Invoked when the model has changed in some way. The observer should assume + // Invoked when |model| has changed in some way. The observer should assume // everything changed. - virtual void OnModelChanged() = 0; + virtual void OnComboboxModelChanged(ComboboxModel* model) = 0; protected: virtual ~ComboboxModelObserver() {} diff --git a/chromium/ui/base/models/dialog_model.h b/chromium/ui/base/models/dialog_model.h index f7254c55c69..853eb283441 100644 --- a/chromium/ui/base/models/dialog_model.h +++ b/chromium/ui/base/models/dialog_model.h @@ -6,15 +6,15 @@ #define UI_BASE_MODELS_DIALOG_MODEL_H_ #include "base/strings/string16.h" +#include "ui/base/ui_base_export.h" #include "ui/base/ui_base_types.h" -#include "ui/base/ui_export.h" namespace ui { // A model representing a dialog window. The model provides the content to show // to the user (i.e. label, title), and the ways the user can interact with it // (i.e. the buttons). -class UI_EXPORT DialogModel { +class UI_BASE_EXPORT DialogModel { public: virtual ~DialogModel(); diff --git a/chromium/ui/base/models/list_model_observer.h b/chromium/ui/base/models/list_model_observer.h index 3f59da97982..cc8be0f6e0a 100644 --- a/chromium/ui/base/models/list_model_observer.h +++ b/chromium/ui/base/models/list_model_observer.h @@ -7,11 +7,11 @@ #include <stddef.h> -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { -class UI_EXPORT ListModelObserver { +class UI_BASE_EXPORT ListModelObserver { public: // Invoked after items has been added to the model. virtual void ListItemsAdded(size_t start, size_t count) = 0; diff --git a/chromium/ui/base/models/list_selection_model.h b/chromium/ui/base/models/list_selection_model.h index 8a175092ebb..234714dd2fa 100644 --- a/chromium/ui/base/models/list_selection_model.h +++ b/chromium/ui/base/models/list_selection_model.h @@ -8,7 +8,7 @@ #include <vector> #include "base/basictypes.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { @@ -21,7 +21,7 @@ namespace ui { // // Typically there is only one selected item, in which case the anchor and // active index correspond to the same thing. -class UI_EXPORT ListSelectionModel { +class UI_BASE_EXPORT ListSelectionModel { public: typedef std::vector<int> SelectedIndices; diff --git a/chromium/ui/base/models/menu_model.cc b/chromium/ui/base/models/menu_model.cc index e88742ebe12..1b5f6ab0bca 100644 --- a/chromium/ui/base/models/menu_model.cc +++ b/chromium/ui/base/models/menu_model.cc @@ -40,7 +40,7 @@ base::string16 MenuModel::GetMinorTextAt(int index) const { return base::string16(); } -const gfx::Font* MenuModel::GetLabelFontAt(int index) const { +const gfx::FontList* MenuModel::GetLabelFontListAt(int index) const { return NULL; } diff --git a/chromium/ui/base/models/menu_model.h b/chromium/ui/base/models/menu_model.h index bd3730c07b7..d0d31005dcd 100644 --- a/chromium/ui/base/models/menu_model.h +++ b/chromium/ui/base/models/menu_model.h @@ -8,12 +8,12 @@ #include "base/strings/string16.h" #include "ui/base/models/menu_model_delegate.h" #include "ui/base/models/menu_separator_types.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/image/image_skia.h" #include "ui/gfx/native_widget_types.h" namespace gfx { -class Font; +class FontList; class Image; } @@ -23,7 +23,7 @@ class Accelerator; class ButtonMenuItemModel; // An interface implemented by an object that provides the content of a menu. -class UI_EXPORT MenuModel { +class UI_BASE_EXPORT MenuModel { public: // The type of item. enum ItemType { @@ -71,9 +71,9 @@ class UI_EXPORT MenuModel { // updated each time the menu is shown. virtual bool IsItemDynamicAt(int index) const = 0; - // Returns the font used for the label at the specified index. - // If NULL, then the default font should be used. - virtual const gfx::Font* GetLabelFontAt(int index) const; + // Returns the font list used for the label at the specified index. + // If NULL, then the default font list should be used. + virtual const gfx::FontList* GetLabelFontListAt(int index) const; // Gets the acclerator information for the specified index, returning true if // there is a shortcut accelerator for the item, false otherwise. diff --git a/chromium/ui/base/models/simple_combobox_model.cc b/chromium/ui/base/models/simple_combobox_model.cc new file mode 100644 index 00000000000..edf339de741 --- /dev/null +++ b/chromium/ui/base/models/simple_combobox_model.cc @@ -0,0 +1,33 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/models/simple_combobox_model.h" + +namespace ui { + +SimpleComboboxModel::SimpleComboboxModel( + const std::vector<base::string16>& items) + : items_(items) { +} + +SimpleComboboxModel::~SimpleComboboxModel() { +} + +int SimpleComboboxModel::GetItemCount() const { + return items_.size(); +} + +base::string16 SimpleComboboxModel::GetItemAt(int index) { + return items_[index]; +} + +bool SimpleComboboxModel::IsItemSeparatorAt(int index) { + return items_[index].empty(); +} + +int SimpleComboboxModel::GetDefaultIndex() const { + return 0; +} + +} // namespace ui diff --git a/chromium/ui/base/models/simple_combobox_model.h b/chromium/ui/base/models/simple_combobox_model.h new file mode 100644 index 00000000000..c978ec932d8 --- /dev/null +++ b/chromium/ui/base/models/simple_combobox_model.h @@ -0,0 +1,35 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_MODELS_SIMPLE_COMBOBOX_MODEL_H_ +#define UI_BASE_MODELS_SIMPLE_COMBOBOX_MODEL_H_ + +#include "ui/base/models/combobox_model.h" + +#include <vector> + +namespace ui { + +// A simple data model for a combobox that takes a string16 vector as the items. +// An empty string will be a separator. +class UI_BASE_EXPORT SimpleComboboxModel : public ComboboxModel { + public: + explicit SimpleComboboxModel(const std::vector<base::string16>& items); + virtual ~SimpleComboboxModel(); + + // ui::ComboboxModel: + virtual int GetItemCount() const OVERRIDE; + virtual base::string16 GetItemAt(int index) OVERRIDE; + virtual bool IsItemSeparatorAt(int index) OVERRIDE; + virtual int GetDefaultIndex() const OVERRIDE; + + private: + const std::vector<base::string16> items_; + + DISALLOW_COPY_AND_ASSIGN(SimpleComboboxModel); +}; + +} // namespace ui + +#endif // UI_BASE_MODELS_SIMPLE_COMBOBOX_MODEL_H_ diff --git a/chromium/ui/base/models/simple_menu_model.h b/chromium/ui/base/models/simple_menu_model.h index 69a227b2444..78c8fd6ec3f 100644 --- a/chromium/ui/base/models/simple_menu_model.h +++ b/chromium/ui/base/models/simple_menu_model.h @@ -23,10 +23,12 @@ class ButtonMenuItemModel; // items. This makes it easy to construct fixed menus. Menus populated by // dynamic data sources may be better off implementing MenuModel directly. // The breadth of MenuModel is not exposed through this API. -class UI_EXPORT SimpleMenuModel : public MenuModel { +class UI_BASE_EXPORT SimpleMenuModel : public MenuModel { public: - class UI_EXPORT Delegate { + class UI_BASE_EXPORT Delegate { public: + virtual ~Delegate() {} + // Methods for determining the state of specific command ids. virtual bool IsCommandIdChecked(int command_id) const = 0; virtual bool IsCommandIdEnabled(int command_id) const = 0; @@ -63,9 +65,6 @@ class UI_EXPORT SimpleMenuModel : public MenuModel { // Notifies the delegate that the menu has closed. virtual void MenuClosed(SimpleMenuModel* source); - - protected: - virtual ~Delegate() {} }; // The Delegate can be NULL, though if it is items can't be checked or diff --git a/chromium/ui/base/models/table_model.h b/chromium/ui/base/models/table_model.h index 5792bfee144..68cf20283bc 100644 --- a/chromium/ui/base/models/table_model.h +++ b/chromium/ui/base/models/table_model.h @@ -9,7 +9,7 @@ #include "base/strings/string16.h" #include "third_party/icu/source/i18n/unicode/coll.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace gfx { class ImageSkia; @@ -20,7 +20,7 @@ namespace ui { class TableModelObserver; // The model driving the TableView. -class UI_EXPORT TableModel { +class UI_BASE_EXPORT TableModel { public: // See HasGroups, get GetGroupID for details as to how this is used. struct Group { @@ -91,7 +91,7 @@ class UI_EXPORT TableModel { }; // TableColumn specifies the title, alignment and size of a particular column. -struct UI_EXPORT TableColumn { +struct UI_BASE_EXPORT TableColumn { enum Alignment { LEFT, RIGHT, CENTER }; diff --git a/chromium/ui/base/models/table_model_observer.h b/chromium/ui/base/models/table_model_observer.h index 21ee645d9d5..4c9d0eb0329 100644 --- a/chromium/ui/base/models/table_model_observer.h +++ b/chromium/ui/base/models/table_model_observer.h @@ -5,13 +5,13 @@ #ifndef UI_BASE_MODELS_TABLE_MODEL_OBSERVER_H_ #define UI_BASE_MODELS_TABLE_MODEL_OBSERVER_H_ -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { // Observer for a TableModel. Anytime the model changes, it must notify its // observer. -class UI_EXPORT TableModelObserver { +class UI_BASE_EXPORT TableModelObserver { public: // Invoked when the model has been completely changed. virtual void OnModelChanged() = 0; diff --git a/chromium/ui/base/models/tree_model.h b/chromium/ui/base/models/tree_model.h index 3ebe745e002..d553a4043a8 100644 --- a/chromium/ui/base/models/tree_model.h +++ b/chromium/ui/base/models/tree_model.h @@ -8,7 +8,7 @@ #include <vector> #include "base/strings/string16.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace gfx { class ImageSkia; @@ -31,7 +31,7 @@ class TreeModelNode { }; // Observer for the TreeModel. Notified of significant events to the model. -class UI_EXPORT TreeModelObserver { +class UI_BASE_EXPORT TreeModelObserver { public: // Notification that nodes were added to the specified parent. virtual void TreeNodesAdded(TreeModel* model, @@ -55,7 +55,7 @@ class UI_EXPORT TreeModelObserver { // TreeModel ------------------------------------------------------------------ // The model for TreeView. -class UI_EXPORT TreeModel { +class UI_BASE_EXPORT TreeModel { public: // Returns the root of the tree. This may or may not be shown in the tree, // see SetRootShown for details. diff --git a/chromium/ui/base/models/tree_node_model.h b/chromium/ui/base/models/tree_node_model.h index db5cb350a1e..003d20f5c91 100644 --- a/chromium/ui/base/models/tree_node_model.h +++ b/chromium/ui/base/models/tree_node_model.h @@ -106,7 +106,7 @@ class TreeNode : public TreeModelNode { void SetChildren(const std::vector<NodeType*>& children) { RemoveAll(); for (size_t i = 0; i < children.size(); ++i) - Add(children[i], i); + Add(children[i], static_cast<int>(i)); } // Returns the parent node, or NULL if this is the root node. diff --git a/chromium/ui/base/models/tree_node_model_unittest.cc b/chromium/ui/base/models/tree_node_model_unittest.cc index 48f71b96713..d9d387c3220 100644 --- a/chromium/ui/base/models/tree_node_model_unittest.cc +++ b/chromium/ui/base/models/tree_node_model_unittest.cc @@ -12,6 +12,8 @@ #include "base/strings/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" +using base::ASCIIToUTF16; + namespace ui { class TreeNodeModelTest : public testing::Test, public TreeModelObserver { diff --git a/chromium/ui/base/nine_image_painter_factory.cc b/chromium/ui/base/nine_image_painter_factory.cc new file mode 100644 index 00000000000..b22ba678c3c --- /dev/null +++ b/chromium/ui/base/nine_image_painter_factory.cc @@ -0,0 +1,32 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/nine_image_painter_factory.h" + +#include "ui/base/resource/resource_bundle.h" +#include "ui/gfx/nine_image_painter.h" + +namespace ui { + +namespace { + +std::vector<gfx::ImageSkia> ImageIdsToImages(const int image_ids[]) { + ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); + std::vector<gfx::ImageSkia> images(9); + for (size_t i = 0; i < 9; ++i) { + if (image_ids[i] != 0) + images[i] = *rb.GetImageSkiaNamed(image_ids[i]); + } + return images; +} + +} // namespace + +scoped_ptr<gfx::NineImagePainter> CreateNineImagePainter( + const int image_ids[]) { + return scoped_ptr<gfx::NineImagePainter>( + new gfx::NineImagePainter(ImageIdsToImages(image_ids))); +} + +} // namespace ui diff --git a/chromium/ui/base/nine_image_painter_factory.h b/chromium/ui/base/nine_image_painter_factory.h new file mode 100644 index 00000000000..8a622839f4f --- /dev/null +++ b/chromium/ui/base/nine_image_painter_factory.h @@ -0,0 +1,40 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_NINE_IMAGE_PAINTER_FACTORY_H_ +#define UI_BASE_NINE_IMAGE_PAINTER_FACTORY_H_ + +#include "base/memory/scoped_ptr.h" +#include "ui/base/ui_base_export.h" + +// A macro to define arrays of IDR constants used with CreateImageGridPainter. +#define IMAGE_GRID(x) { x ## _TOP_LEFT, x ## _TOP, x ## _TOP_RIGHT, \ + x ## _LEFT, x ## _CENTER, x ## _RIGHT, \ + x ## _BOTTOM_LEFT, x ## _BOTTOM, x ## _BOTTOM_RIGHT, } + +// Defines a empty image for used in macro for creating image grid for a ring of +// eight images. +#define EMPTY_IMAGE 0 + +// A macro to define arrays of IDR constants used with CreateImageGridPainter +// where only a ring of eight images is provided and center image is empty. +#define IMAGE_GRID_NO_CENTER(x) { x ## _TOP_LEFT, x ## _TOP, x ## _TOP_RIGHT, \ + x ## _LEFT, EMPTY_IMAGE, x ## _RIGHT, \ + x ## _BOTTOM_LEFT, x ## _BOTTOM, x ## _BOTTOM_RIGHT, } + + +namespace gfx { +class NineImagePainter; +} + +namespace ui { + +// Creates a NineImagePainter from an array of image ids. It's expected the +// array came from the IMAGE_GRID macro. +UI_BASE_EXPORT scoped_ptr<gfx::NineImagePainter> CreateNineImagePainter( + const int image_ids[]); + +} // namespace ui + +#endif // UI_BASE_NINE_IMAGE_PAINTER_FACTORY_H_ diff --git a/chromium/ui/base/resource/data_pack.cc b/chromium/ui/base/resource/data_pack.cc index 8f8f1822444..8e9ee30eef6 100644 --- a/chromium/ui/base/resource/data_pack.cc +++ b/chromium/ui/base/resource/data_pack.cc @@ -84,9 +84,9 @@ bool DataPack::LoadFromPath(const base::FilePath& path) { return LoadImpl(); } -bool DataPack::LoadFromFile(base::PlatformFile file) { +bool DataPack::LoadFromFile(base::File file) { mmap_.reset(new base::MemoryMappedFile); - if (!mmap_->Initialize(file)) { + if (!mmap_->Initialize(file.Pass())) { DLOG(ERROR) << "Failed to mmap datapack"; UMA_HISTOGRAM_ENUMERATION("DataPack.Load", INIT_FAILED_FROM_FILE, LOAD_ERRORS_COUNT); @@ -134,8 +134,9 @@ bool DataPack::LoadImpl() { } // Sanity check the file. - // 1) Check we have enough entries. - if (kHeaderLength + resource_count_ * sizeof(DataPackEntry) > + // 1) Check we have enough entries. There's an extra entry after the last item + // which gives the length of the last item. + if (kHeaderLength + (resource_count_ + 1) * sizeof(DataPackEntry) > mmap_->length()) { LOG(ERROR) << "Data pack file corruption: too short for number of " "entries specified."; @@ -188,9 +189,21 @@ bool DataPack::GetStringPiece(uint16 resource_id, } const DataPackEntry* next_entry = target + 1; - size_t length = next_entry->file_offset - target->file_offset; + // If the next entry points beyond the end of the file this data pack's entry + // table is corrupt. Log an error and return false. See + // http://crbug.com/371301. + if (next_entry->file_offset > mmap_->length()) { + size_t entry_index = target - + reinterpret_cast<const DataPackEntry*>(mmap_->data() + kHeaderLength); + LOG(ERROR) << "Entry #" << entry_index << " in data pack points off end " + << "of file. This should have been caught when loading. Was the " + << "file modified?"; + return false; + } - data->set(mmap_->data() + target->file_offset, length); + size_t length = next_entry->file_offset - target->file_offset; + data->set(reinterpret_cast<const char*>(mmap_->data() + target->file_offset), + length); return true; } @@ -200,8 +213,7 @@ base::RefCountedStaticMemory* DataPack::GetStaticMemory( if (!GetStringPiece(resource_id, &piece)) return NULL; - return new base::RefCountedStaticMemory( - reinterpret_cast<const unsigned char*>(piece.data()), piece.length()); + return new base::RefCountedStaticMemory(piece.data(), piece.length()); } ResourceHandle::TextEncodingType DataPack::GetTextEncodingType() const { diff --git a/chromium/ui/base/resource/data_pack.h b/chromium/ui/base/resource/data_pack.h index 2ea938f9d1b..4d9d4bbdc2f 100644 --- a/chromium/ui/base/resource/data_pack.h +++ b/chromium/ui/base/resource/data_pack.h @@ -12,12 +12,12 @@ #include <map> #include "base/basictypes.h" +#include "base/files/file.h" #include "base/memory/scoped_ptr.h" -#include "base/platform_file.h" #include "base/strings/string_piece.h" #include "ui/base/layout.h" #include "ui/base/resource/resource_handle.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace base { class FilePath; @@ -27,7 +27,7 @@ class RefCountedStaticMemory; namespace ui { -class UI_EXPORT DataPack : public ResourceHandle { +class UI_BASE_EXPORT DataPack : public ResourceHandle { public: DataPack(ui::ScaleFactor scale_factor); virtual ~DataPack(); @@ -36,7 +36,7 @@ class UI_EXPORT DataPack : public ResourceHandle { bool LoadFromPath(const base::FilePath& path); // Loads a pack file from |file|, returning false on error. - bool LoadFromFile(base::PlatformFile file); + bool LoadFromFile(base::File file); // Writes a pack file containing |resources| to |path|. If there are any // text resources to be written, their encoding must already agree to the diff --git a/chromium/ui/base/resource/data_pack_literal.cc b/chromium/ui/base/resource/data_pack_literal.cc index 05e610b8bed..0b3855f3a99 100644 --- a/chromium/ui/base/resource/data_pack_literal.cc +++ b/chromium/ui/base/resource/data_pack_literal.cc @@ -21,6 +21,22 @@ extern const char kSamplePakContents[] = { extern const size_t kSamplePakSize = sizeof(kSamplePakContents); +extern const char kSampleCorruptPakContents[] = { + 0x04, 0x00, 0x00, 0x00, // header(version + 0x04, 0x00, 0x00, 0x00, // no. entries + 0x01, // encoding) + 0x01, 0x00, 0x27, 0x00, 0x00, 0x00, // index entry 1 + 0x04, 0x00, 0x27, 0x00, 0x00, 0x00, // index entry 4 + 0x06, 0x00, 0x33, 0x00, 0x00, 0x00, // index entry 6 + 0x0a, 0x00, 0x3f, 0x00, 0x00, 0x00, // index entry 10 + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // extra entry for the size of last, + // extends past END OF FILE. + 't', 'h', 'i', 's', ' ', 'i', 's', ' ', 'i', 'd', ' ', '4', + 't', 'h', 'i', 's', ' ', 'i', 's', ' ', 'i', 'd', ' ', '6' +}; + +extern const size_t kSampleCorruptPakSize = sizeof(kSampleCorruptPakContents); + extern const char kSamplePakContents2x[] = { 0x04, 0x00, 0x00, 0x00, // header(version 0x01, 0x00, 0x00, 0x00, // no. entries diff --git a/chromium/ui/base/resource/data_pack_unittest.cc b/chromium/ui/base/resource/data_pack_unittest.cc index 0ac7819de72..9583df1b12e 100644 --- a/chromium/ui/base/resource/data_pack_unittest.cc +++ b/chromium/ui/base/resource/data_pack_unittest.cc @@ -3,12 +3,14 @@ // found in the LICENSE file. #include "base/file_util.h" +#include "base/files/file.h" #include "base/files/file_path.h" #include "base/files/scoped_temp_dir.h" #include "base/path_service.h" #include "base/strings/string_piece.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/resource/data_pack.h" +#include "ui/base/ui_base_paths.h" namespace ui { @@ -19,7 +21,9 @@ class DataPackTest }; extern const char kSamplePakContents[]; +extern const char kSampleCorruptPakContents[]; extern const size_t kSamplePakSize; +extern const size_t kSampleCorruptPakSize; TEST(DataPackTest, LoadFromPath) { base::ScopedTempDir dir; @@ -27,7 +31,7 @@ TEST(DataPackTest, LoadFromPath) { base::FilePath data_path = dir.path().Append(FILE_PATH_LITERAL("sample.pak")); // Dump contents into the pak file. - ASSERT_EQ(file_util::WriteFile(data_path, kSamplePakContents, kSamplePakSize), + ASSERT_EQ(base::WriteFile(data_path, kSamplePakContents, kSamplePakSize), static_cast<int>(kSamplePakSize)); // Load the file through the data pack API. @@ -59,18 +63,15 @@ TEST(DataPackTest, LoadFromFile) { base::FilePath data_path = dir.path().Append(FILE_PATH_LITERAL("sample.pak")); // Dump contents into the pak file. - ASSERT_EQ(file_util::WriteFile(data_path, kSamplePakContents, kSamplePakSize), + ASSERT_EQ(base::WriteFile(data_path, kSamplePakContents, kSamplePakSize), static_cast<int>(kSamplePakSize)); - bool created = false; - base::PlatformFileError error_code = base::PLATFORM_FILE_OK; - base::PlatformFile file = base::CreatePlatformFile( - data_path, base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ, - &created, &error_code); + base::File file(data_path, base::File::FLAG_OPEN | base::File::FLAG_READ); + ASSERT_TRUE(file.IsValid()); // Load the file through the data pack API. DataPack pack(SCALE_FACTOR_100P); - ASSERT_TRUE(pack.LoadFromFile(file)); + ASSERT_TRUE(pack.LoadFromFile(file.Pass())); base::StringPiece data; ASSERT_TRUE(pack.HasResource(4)); @@ -89,8 +90,6 @@ TEST(DataPackTest, LoadFromFile) { // Try looking up an invalid key. ASSERT_FALSE(pack.HasResource(140)); ASSERT_FALSE(pack.GetStringPiece(140, &data)); - - base::ClosePlatformFile(file); } INSTANTIATE_TEST_CASE_P(WriteBINARY, DataPackTest, ::testing::Values( @@ -102,9 +101,8 @@ INSTANTIATE_TEST_CASE_P(WriteUTF16, DataPackTest, ::testing::Values( TEST(DataPackTest, LoadFileWithTruncatedHeader) { base::FilePath data_path; - PathService::Get(base::DIR_SOURCE_ROOT, &data_path); - data_path = data_path.Append(FILE_PATH_LITERAL( - "ui/base/test/data/data_pack_unittest/truncated-header.pak")); + ASSERT_TRUE(PathService::Get(UI_DIR_TEST_DATA, &data_path)); + data_path = data_path.AppendASCII("data_pack_unittest/truncated-header.pak"); DataPack pack(SCALE_FACTOR_100P); ASSERT_FALSE(pack.LoadFromPath(data_path)); @@ -147,4 +145,35 @@ TEST_P(DataPackTest, Write) { EXPECT_EQ(fifteen, data); } +#if defined(OS_POSIX) +TEST(DataPackTest, ModifiedWhileUsed) { + base::ScopedTempDir dir; + ASSERT_TRUE(dir.CreateUniqueTempDir()); + base::FilePath data_path = dir.path().Append(FILE_PATH_LITERAL("sample.pak")); + + // Dump contents into the pak file. + ASSERT_EQ(base::WriteFile(data_path, kSamplePakContents, kSamplePakSize), + static_cast<int>(kSamplePakSize)); + + base::File file(data_path, base::File::FLAG_OPEN | base::File::FLAG_READ); + ASSERT_TRUE(file.IsValid()); + + // Load the file through the data pack API. + DataPack pack(SCALE_FACTOR_100P); + ASSERT_TRUE(pack.LoadFromFile(file.Pass())); + + base::StringPiece data; + ASSERT_TRUE(pack.HasResource(10)); + ASSERT_TRUE(pack.GetStringPiece(10, &data)); + + ASSERT_EQ(base::WriteFile(data_path, kSampleCorruptPakContents, + kSampleCorruptPakSize), + static_cast<int>(kSampleCorruptPakSize)); + + // Reading asset #10 should now fail as it extends past the end of the file. + ASSERT_TRUE(pack.HasResource(10)); + ASSERT_FALSE(pack.GetStringPiece(10, &data)); +} +#endif + } // namespace ui diff --git a/chromium/ui/base/resource/resource_bundle.cc b/chromium/ui/base/resource/resource_bundle.cc index b5f8f6138d1..f5a592d0221 100644 --- a/chromium/ui/base/resource/resource_bundle.cc +++ b/chromium/ui/base/resource/resource_bundle.cc @@ -4,10 +4,13 @@ #include "ui/base/resource/resource_bundle.h" +#include <limits> #include <vector> +#include "base/big_endian.h" #include "base/command_line.h" #include "base/file_util.h" +#include "base/files/file.h" #include "base/logging.h" #include "base/memory/ref_counted_memory.h" #include "base/metrics/histogram.h" @@ -18,7 +21,6 @@ #include "base/synchronization/lock.h" #include "build/build_config.h" #include "grit/app_locale_settings.h" -#include "net/base/big_endian.h" #include "skia/ext/image_operations.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/l10n/l10n_util.h" @@ -33,7 +35,6 @@ #include "ui/gfx/safe_integer_conversions.h" #include "ui/gfx/screen.h" #include "ui/gfx/size_conversions.h" -#include "ui/gfx/skbitmap_operations.h" #if defined(OS_CHROMEOS) #include "ui/base/l10n/l10n_util.h" @@ -68,20 +69,40 @@ ResourceBundle* g_shared_instance_ = NULL; void InitDefaultFontList() { #if defined(OS_CHROMEOS) - gfx::FontList::SetDefaultFontDescription( - l10n_util::GetStringUTF8(IDS_UI_FONT_FAMILY_CROS)); + ResourceBundle& rb = ResourceBundle::GetSharedInstance(); + std::string font_family = base::UTF16ToUTF8( + rb.GetLocalizedString(IDS_UI_FONT_FAMILY_CROS)); + gfx::FontList::SetDefaultFontDescription(font_family); // TODO(yukishiino): Remove SetDefaultFontDescription() once the migration to // the font list is done. We will no longer need SetDefaultFontDescription() // after every client gets started using a FontList instead of a Font. - gfx::PlatformFontPango::SetDefaultFontDescription( - l10n_util::GetStringUTF8(IDS_UI_FONT_FAMILY_CROS)); + gfx::PlatformFontPango::SetDefaultFontDescription(font_family); #else // Use a single default font as the default font list. gfx::FontList::SetDefaultFontDescription(std::string()); #endif } +#if defined(OS_ANDROID) +// Returns the scale factor closest to |scale| from the full list of factors. +// Note that it does NOT rely on the list of supported scale factors. +// Finding the closest match is inefficient and shouldn't be done frequently. +ScaleFactor FindClosestScaleFactorUnsafe(float scale) { + float smallest_diff = std::numeric_limits<float>::max(); + ScaleFactor closest_match = SCALE_FACTOR_100P; + for (int i = SCALE_FACTOR_100P; i < NUM_SCALE_FACTORS; ++i) { + const ScaleFactor scale_factor = static_cast<ScaleFactor>(i); + float diff = std::abs(GetScaleForScaleFactor(scale_factor) - scale); + if (diff < smallest_diff) { + closest_match = scale_factor; + smallest_diff = diff; + } + } + return closest_match; +} +#endif // OS_ANDROID + } // namespace // An ImageSkiaSource that loads bitmaps for the requested scale factor from @@ -104,11 +125,15 @@ class ResourceBundle::ResourceBundleImageSource : public gfx::ImageSkiaSource { ScaleFactor scale_factor = GetSupportedScaleFactor(scale); bool found = rb_->LoadBitmap(resource_id_, &scale_factor, &image, &fell_back_to_1x); - // Force to a supported scale. - scale = ui::GetImageScale(scale_factor); if (!found) return gfx::ImageSkiaRep(); + // If the resource is in the package with SCALE_FACTOR_NONE, it + // can be used in any scale factor. The image is maked as "unscaled" + // so that the ImageSkia do not automatically scale. + if (scale_factor == ui::SCALE_FACTOR_NONE) + return gfx::ImageSkiaRep(image, 0.0f); + if (fell_back_to_1x) { // GRIT fell back to the 100% image, so rescale it to the correct size. image = skia::ImageOperations::Resize( @@ -116,21 +141,9 @@ class ResourceBundle::ResourceBundleImageSource : public gfx::ImageSkiaSource { skia::ImageOperations::RESIZE_LANCZOS3, gfx::ToCeiledInt(image.width() * scale), gfx::ToCeiledInt(image.height() * scale)); - // If --highlight-missing-scaled-resources is specified, log the resource - // id and blend the created resource with red. - if (ShouldHighlightMissingScaledResources()) { - LOG(ERROR) << "Missing " << scale << "x scaled resource. id=" - << resource_id_; - - SkBitmap mask; - mask.setConfig(SkBitmap::kARGB_8888_Config, - image.width(), image.height()); - mask.allocPixels(); - mask.eraseColor(SK_ColorRED); - image = SkBitmapOperations::CreateBlendedBitmap(image, mask, 0.2); - } + } else { + scale = GetScaleForScaleFactor(scale_factor); } - return gfx::ImageSkiaRep(image, scale); } @@ -162,14 +175,14 @@ std::string ResourceBundle::InitSharedInstanceLocaleOnly( // static void ResourceBundle::InitSharedInstanceWithPakFile( - base::PlatformFile pak_file, bool should_load_common_resources) { + base::File pak_file, bool should_load_common_resources) { InitSharedInstance(NULL); if (should_load_common_resources) g_shared_instance_->LoadCommonResources(); scoped_ptr<DataPack> data_pack( new DataPack(SCALE_FACTOR_100P)); - if (!data_pack->LoadFromFile(pak_file)) { + if (!data_pack->LoadFromFile(pak_file.Pass())) { NOTREACHED() << "failed to load pak file"; return; } @@ -219,11 +232,11 @@ void ResourceBundle::AddOptionalDataPackFromPath(const base::FilePath& path, AddDataPackFromPathInternal(path, scale_factor, true); } -void ResourceBundle::AddDataPackFromFile(base::PlatformFile file, +void ResourceBundle::AddDataPackFromFile(base::File file, ScaleFactor scale_factor) { scoped_ptr<DataPack> data_pack( new DataPack(scale_factor)); - if (data_pack->LoadFromFile(file)) { + if (data_pack->LoadFromFile(file.Pass())) { AddDataPack(data_pack.release()); } else { LOG(ERROR) << "Failed to load data pack from file." @@ -265,15 +278,8 @@ std::string ResourceBundle::LoadLocaleResources( DCHECK(!locale_resources_data_.get()) << "locale.pak already loaded"; std::string app_locale = l10n_util::GetApplicationLocale(pref_locale); base::FilePath locale_file_path = GetOverriddenPakPath(); - if (locale_file_path.empty()) { - CommandLine* command_line = CommandLine::ForCurrentProcess(); - if (command_line->HasSwitch(switches::kLocalePak)) { - locale_file_path = - command_line->GetSwitchValuePath(switches::kLocalePak); - } else { - locale_file_path = GetLocaleFilePath(app_locale, true); - } - } + if (locale_file_path.empty()) + locale_file_path = GetLocaleFilePath(app_locale, true); if (locale_file_path.empty()) { // It's possible that there is no locale.pak. @@ -350,20 +356,19 @@ gfx::Image& ResourceBundle::GetImageNamed(int resource_id) { DCHECK(!data_packs_.empty()) << "Missing call to SetResourcesDataDLL?"; -#if defined(OS_CHROMEOS) - ui::ScaleFactor scale_factor_to_load = GetMaxScaleFactor(); +#if defined(OS_CHROMEOS) || defined(OS_WIN) + ui::ScaleFactor scale_factor_to_load = GetMaxScaleFactor(); #else - ui::ScaleFactor scale_factor_to_load = ui::SCALE_FACTOR_100P; + ui::ScaleFactor scale_factor_to_load = ui::SCALE_FACTOR_100P; #endif - float scale = GetImageScale(scale_factor_to_load); // TODO(oshima): Consider reading the image size from png IHDR chunk and // skip decoding here and remove #ifdef below. // ResourceBundle::GetSharedInstance() is destroyed after the // BrowserMainLoop has finished running. |image_skia| is guaranteed to be // destroyed before the resource bundle is destroyed. gfx::ImageSkia image_skia(new ResourceBundleImageSource(this, resource_id), - scale); + GetScaleForScaleFactor(scale_factor_to_load)); if (image_skia.isNull()) { LOG(WARNING) << "Unable to load image with id " << resource_id; NOTREACHED(); // Want to assert in debug mode. @@ -405,8 +410,7 @@ base::RefCountedStaticMemory* ResourceBundle::LoadDataResourceBytesForScale( base::StringPiece data = GetRawDataResourceForScale(resource_id, scale_factor); if (!data.empty()) { - bytes = new base::RefCountedStaticMemory( - reinterpret_cast<const unsigned char*>(data.data()), data.length()); + bytes = new base::RefCountedStaticMemory(data.data(), data.length()); } } @@ -434,6 +438,7 @@ base::StringPiece ResourceBundle::GetRawDataResourceForScale( } for (size_t i = 0; i < data_packs_.size(); i++) { if ((data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_100P || + data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_200P || data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_NONE) && data_packs_[i]->GetStringPiece(resource_id, &data)) return data; @@ -481,7 +486,7 @@ base::string16 ResourceBundle::GetLocalizedString(int message_id) { msg = base::string16(reinterpret_cast<const base::char16*>(data.data()), data.length() / 2); } else if (encoding == ResourceHandle::UTF8) { - msg = UTF8ToUTF16(data); + msg = base::UTF8ToUTF16(data); } return msg; } @@ -522,13 +527,21 @@ void ResourceBundle::ReloadFonts() { } ScaleFactor ResourceBundle::GetMaxScaleFactor() const { -#if defined(OS_CHROMEOS) +#if defined(OS_CHROMEOS) || defined(OS_WIN) return max_scale_factor_; #else return GetSupportedScaleFactors().back(); #endif } +bool ResourceBundle::IsScaleFactorSupported(ScaleFactor scale_factor) { + const std::vector<ScaleFactor>& supported_scale_factors = + ui::GetSupportedScaleFactors(); + return std::find(supported_scale_factors.begin(), + supported_scale_factors.end(), + scale_factor) != supported_scale_factors.end(); +} + ResourceBundle::ResourceBundle(Delegate* delegate) : delegate_(delegate), images_and_fonts_lock_(new base::Lock), @@ -546,8 +559,9 @@ void ResourceBundle::InitSharedInstance(Delegate* delegate) { DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice"; g_shared_instance_ = new ResourceBundle(delegate); static std::vector<ScaleFactor> supported_scale_factors; -#if !defined(OS_IOS) +#if !defined(OS_IOS) && !defined(OS_WIN) // On platforms other than iOS, 100P is always a supported scale factor. + // For Windows we have a separate case in this function. supported_scale_factors.push_back(SCALE_FACTOR_100P); #endif #if defined(OS_ANDROID) @@ -571,12 +585,30 @@ void ResourceBundle::InitSharedInstance(Delegate* delegate) { #elif defined(OS_CHROMEOS) // TODO(oshima): Include 200P only if the device support 200P supported_scale_factors.push_back(SCALE_FACTOR_200P); +#elif defined(OS_LINUX) && defined(ENABLE_HIDPI) + supported_scale_factors.push_back(SCALE_FACTOR_200P); +#elif defined(OS_WIN) + bool default_to_100P = true; + if (gfx::IsHighDPIEnabled()) { + // On Windows if the dpi scale is greater than 1.25 on high dpi machines + // downscaling from 200 percent looks better than scaling up from 100 + // percent. + if (gfx::GetDPIScale() > 1.25) { + supported_scale_factors.push_back(SCALE_FACTOR_200P); + default_to_100P = false; + } + } + if (default_to_100P) + supported_scale_factors.push_back(SCALE_FACTOR_100P); #endif ui::SetSupportedScaleFactors(supported_scale_factors); #if defined(OS_WIN) // Must be called _after_ supported scale factors are set since it // uses them. - ui::win::InitDeviceScaleFactor(); + // Don't initialize the device scale factor if it has already been + // initialized. + if (!gfx::win::IsDeviceScaleFactorSet()) + ui::win::InitDeviceScaleFactor(); #endif } @@ -612,8 +644,8 @@ void ResourceBundle::AddDataPackFromPathInternal(const base::FilePath& path, void ResourceBundle::AddDataPack(DataPack* data_pack) { data_packs_.push_back(data_pack); - if (GetImageScale(data_pack->GetScaleFactor()) > - GetImageScale(max_scale_factor_)) + if (GetScaleForScaleFactor(data_pack->GetScaleFactor()) > + GetScaleForScaleFactor(max_scale_factor_)) max_scale_factor_ = data_pack->GetScaleFactor(); } @@ -636,43 +668,43 @@ void ResourceBundle::LoadFontsIfNecessary() { if (!bold_font_list_.get()) { bold_font_list_.reset(new gfx::FontList()); - *bold_font_list_ = base_font_list_->DeriveFontList( + *bold_font_list_ = base_font_list_->DeriveWithStyle( base_font_list_->GetFontStyle() | gfx::Font::BOLD); } if (!small_font_list_.get()) { small_font_list_.reset(new gfx::FontList()); - *small_font_list_ = base_font_list_->DeriveFontListWithSize( - base_font_list_->GetFontSize() + kSmallFontSizeDelta); + *small_font_list_ = + base_font_list_->DeriveWithSizeDelta(kSmallFontSizeDelta); } if (!small_bold_font_list_.get()) { small_bold_font_list_.reset(new gfx::FontList()); - *small_bold_font_list_ = small_font_list_->DeriveFontList( + *small_bold_font_list_ = small_font_list_->DeriveWithStyle( small_font_list_->GetFontStyle() | gfx::Font::BOLD); } if (!medium_font_list_.get()) { medium_font_list_.reset(new gfx::FontList()); - *medium_font_list_ = base_font_list_->DeriveFontListWithSize( - base_font_list_->GetFontSize() + kMediumFontSizeDelta); + *medium_font_list_ = + base_font_list_->DeriveWithSizeDelta(kMediumFontSizeDelta); } if (!medium_bold_font_list_.get()) { medium_bold_font_list_.reset(new gfx::FontList()); - *medium_bold_font_list_ = medium_font_list_->DeriveFontList( + *medium_bold_font_list_ = medium_font_list_->DeriveWithStyle( medium_font_list_->GetFontStyle() | gfx::Font::BOLD); } if (!large_font_list_.get()) { large_font_list_.reset(new gfx::FontList()); - *large_font_list_ = base_font_list_->DeriveFontListWithSize( - base_font_list_->GetFontSize() + kLargeFontSizeDelta); + *large_font_list_ = + base_font_list_->DeriveWithSizeDelta(kLargeFontSizeDelta); } if (!large_bold_font_list_.get()) { large_bold_font_list_.reset(new gfx::FontList()); - *large_bold_font_list_ = large_font_list_->DeriveFontList( + *large_bold_font_list_ = large_font_list_->DeriveWithStyle( large_font_list_->GetFontStyle() | gfx::Font::BOLD); } } @@ -722,13 +754,10 @@ bool ResourceBundle::LoadBitmap(int resource_id, bool* fell_back_to_1x) const { DCHECK(fell_back_to_1x); for (size_t i = 0; i < data_packs_.size(); ++i) { - // If the resource is in the package with SCALE_FACTOR_NONE, it - // can be used in any scale factor, but set 100P in ImageSkia so - // that it will be scaled property. if (data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_NONE && LoadBitmap(*data_packs_[i], resource_id, bitmap, fell_back_to_1x)) { - *scale_factor = ui::SCALE_FACTOR_100P; DCHECK(!*fell_back_to_1x); + *scale_factor = ui::SCALE_FACTOR_NONE; return true; } if (data_packs_[i]->GetScaleFactor() == *scale_factor && @@ -754,14 +783,8 @@ gfx::Image& ResourceBundle::GetEmptyImage() { } // static -bool ResourceBundle::ShouldHighlightMissingScaledResources() { - return CommandLine::ForCurrentProcess()->HasSwitch( - switches::kHighlightMissingScaledResources); -} - -// static bool ResourceBundle::PNGContainsFallbackMarker(const unsigned char* buf, - size_t size) { + size_t size) { if (size < arraysize(kPngMagic) || memcmp(buf, kPngMagic, arraysize(kPngMagic)) != 0) { // Data invalid or a JPEG. @@ -775,7 +798,7 @@ bool ResourceBundle::PNGContainsFallbackMarker(const unsigned char* buf, if (size - pos < kPngChunkMetadataSize) break; uint32 length = 0; - net::ReadBigEndian(reinterpret_cast<const char*>(buf + pos), &length); + base::ReadBigEndian(reinterpret_cast<const char*>(buf + pos), &length); if (size - pos - kPngChunkMetadataSize < length) break; if (length == 0 && memcmp(buf + pos + sizeof(uint32), kPngScaleChunkType, diff --git a/chromium/ui/base/resource/resource_bundle.h b/chromium/ui/base/resource/resource_bundle.h index 272c5b3341b..060ea6c51f5 100644 --- a/chromium/ui/base/resource/resource_bundle.h +++ b/chromium/ui/base/resource/resource_bundle.h @@ -5,8 +5,6 @@ #ifndef UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ #define UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ -#include "build/build_config.h" - #include <map> #include <string> @@ -15,11 +13,11 @@ #include "base/gtest_prod_util.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" -#include "base/platform_file.h" #include "base/strings/string16.h" #include "base/strings/string_piece.h" +#include "build/build_config.h" #include "ui/base/layout.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/font_list.h" #include "ui/gfx/image/image.h" #include "ui/gfx/native_widget_types.h" @@ -27,6 +25,7 @@ class SkBitmap; namespace base { +class File; class Lock; class RefCountedStaticMemory; } @@ -38,7 +37,7 @@ class ResourceHandle; // ResourceBundle is a central facility to load images and other resources, // such as theme graphics. Every resource is loaded only once. -class UI_EXPORT ResourceBundle { +class UI_BASE_EXPORT ResourceBundle { public: // An enumeration of the various font styles used throughout Chrome. // The following holds true for the font sizes: @@ -135,8 +134,8 @@ class UI_EXPORT ResourceBundle { // controls whether or not ResourceBundle::LoadCommonResources is called. // This allows the use of this function in a sandbox without local file // access (as on Android). - static void InitSharedInstanceWithPakFile( - base::PlatformFile file, bool should_load_common_resources); + static void InitSharedInstanceWithPakFile(base::File file, + bool should_load_common_resources); // Initialize the ResourceBundle using given data pack path for testing. static void InitSharedInstanceWithPakPath(const base::FilePath& path); @@ -164,7 +163,7 @@ class UI_EXPORT ResourceBundle { ScaleFactor scale_factor); // Same as above but using an already open file. - void AddDataPackFromFile(base::PlatformFile file, ScaleFactor scale_factor); + void AddDataPackFromFile(base::File file, ScaleFactor scale_factor); // Same as AddDataPackFromPath but does not log an error if the pack fails to // load. @@ -257,6 +256,10 @@ class UI_EXPORT ResourceBundle { // Returns SCALE_FACTOR_100P if no resource is loaded. ScaleFactor GetMaxScaleFactor() const; + protected: + // Returns true if |scale_factor| is supported by this platform. + static bool IsScaleFactorSupported(ScaleFactor scale_factor); + private: FRIEND_TEST_ALL_PREFIXES(ResourceBundleTest, DelegateGetPathForLocalePack); FRIEND_TEST_ALL_PREFIXES(ResourceBundleTest, DelegateGetImageNamed); diff --git a/chromium/ui/base/resource/resource_bundle_auralinux.cc b/chromium/ui/base/resource/resource_bundle_auralinux.cc index d5357175a7b..128fd6762d2 100644 --- a/chromium/ui/base/resource/resource_bundle_auralinux.cc +++ b/chromium/ui/base/resource/resource_bundle_auralinux.cc @@ -36,7 +36,7 @@ void ResourceBundle::LoadCommonResources() { AddDataPackFromPath(GetResourcesPakFilePath( "chrome_100_percent.pak"), SCALE_FACTOR_100P); - if (ui::IsScaleFactorSupported(SCALE_FACTOR_200P)) { + if (IsScaleFactorSupported(SCALE_FACTOR_200P)) { AddOptionalDataPackFromPath(GetResourcesPakFilePath( "chrome_200_percent.pak"), SCALE_FACTOR_200P); } diff --git a/chromium/ui/base/resource/resource_bundle_gtk.cc b/chromium/ui/base/resource/resource_bundle_gtk.cc deleted file mode 100644 index 2578dc29d37..00000000000 --- a/chromium/ui/base/resource/resource_bundle_gtk.cc +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/resource/resource_bundle.h" - -#include "base/i18n/rtl.h" -#include "base/logging.h" -#include "base/memory/ref_counted_memory.h" -#include "base/path_service.h" -#include "base/synchronization/lock.h" -#include "third_party/skia/include/core/SkBitmap.h" -#include "ui/base/layout.h" -#include "ui/base/resource/resource_handle.h" -#include "ui/base/ui_base_paths.h" -#include "ui/gfx/image/image.h" -#include "ui/gfx/scoped_gobject.h" - -#include <gtk/gtk.h> - -namespace ui { - -namespace { - -// Convert the raw image data into a GdkPixbuf. The GdkPixbuf that is returned -// has a ref count of 1 so the caller must call g_object_unref to free the -// memory. -GdkPixbuf* LoadPixbuf(base::RefCountedStaticMemory* data, bool rtl_enabled) { - ScopedGObject<GdkPixbufLoader>::Type loader(gdk_pixbuf_loader_new()); - bool ok = data && gdk_pixbuf_loader_write(loader.get(), - reinterpret_cast<const guint8*>(data->front()), data->size(), NULL); - if (!ok) - return NULL; - // Calling gdk_pixbuf_loader_close forces the data to be parsed by the - // loader. We must do this before calling gdk_pixbuf_loader_get_pixbuf. - ok = gdk_pixbuf_loader_close(loader.get(), NULL); - if (!ok) - return NULL; - GdkPixbuf* pixbuf = gdk_pixbuf_loader_get_pixbuf(loader.get()); - if (!pixbuf) - return NULL; - - if (base::i18n::IsRTL() && rtl_enabled) { - // |pixbuf| will get unreffed and destroyed (see below). The returned value - // has ref count 1. - return gdk_pixbuf_flip(pixbuf, TRUE); - } else { - // The pixbuf is owned by the loader, so add a ref so when we delete the - // loader (when the ScopedGObject goes out of scope), the pixbuf still - // exists. - g_object_ref(pixbuf); - return pixbuf; - } -} - -base::FilePath GetResourcesPakFilePath(const std::string& pak_name) { - base::FilePath path; - if (PathService::Get(base::DIR_MODULE, &path)) - return path.AppendASCII(pak_name.c_str()); - - // Return just the name of the pack file. - return base::FilePath(pak_name.c_str()); -} - -} // namespace - -void ResourceBundle::LoadCommonResources() { - AddDataPackFromPath(GetResourcesPakFilePath( - "chrome_100_percent.pak"), - SCALE_FACTOR_100P); -} - -gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) { - // Use the negative |resource_id| for the key for BIDI-aware images. - int key = rtl == RTL_ENABLED ? -resource_id : resource_id; - - // Check to see if the image is already in the cache. - { - base::AutoLock lock_scope(*images_and_fonts_lock_); - if (images_.count(key)) - return images_[key]; - } - - gfx::Image image; - if (delegate_) - image = delegate_->GetNativeImageNamed(resource_id, rtl); - - if (image.IsEmpty()) { - scoped_refptr<base::RefCountedStaticMemory> data( - LoadDataResourceBytesForScale(resource_id, SCALE_FACTOR_100P)); - GdkPixbuf* pixbuf = LoadPixbuf(data.get(), rtl == RTL_ENABLED); - - if (!pixbuf) { - LOG(WARNING) << "Unable to load pixbuf with id " << resource_id; - NOTREACHED(); // Want to assert in debug mode. - return GetEmptyImage(); - } - - image = gfx::Image(pixbuf); // Takes ownership. - } - - base::AutoLock lock_scope(*images_and_fonts_lock_); - - // Another thread raced the load and has already cached the image. - if (images_.count(key)) - return images_[key]; - - images_[key] = image; - return images_[key]; -} - -} // namespace ui diff --git a/chromium/ui/base/resource/resource_bundle_ios.mm b/chromium/ui/base/resource/resource_bundle_ios.mm index d947c2f55f1..4f5d9bc34fd 100644 --- a/chromium/ui/base/resource/resource_bundle_ios.mm +++ b/chromium/ui/base/resource/resource_bundle_ios.mm @@ -125,7 +125,7 @@ gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) { bool is_fallback = PNGContainsFallbackMarker(data->front(), data->size()); // Create the image from the data. - CGFloat target_scale = ui::GetImageScale(scale_factor); + CGFloat target_scale = ui::GetScaleForScaleFactor(scale_factor); CGFloat source_scale = is_fallback ? 1.0 : target_scale; base::scoped_nsobject<UIImage> ui_image( [[UIImage alloc] initWithData:ns_data scale:source_scale]); @@ -151,14 +151,6 @@ gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) { CGContextSetBlendMode(context, kCGBlendModeCopy); CGContextDrawImage(context, target_rect, [ui_image CGImage]); - if (ShouldHighlightMissingScaledResources()) { - CGContextSetFillColorSpace(context, color_space); - CGFloat components[4] = { 1.0, 0.0, 0.0, 0.3 }; // Translucent red. - CGContextSetFillColor(context, components); - CGContextSetBlendMode(context, kCGBlendModeNormal); - CGContextFillRect(context, target_rect); - } - base::ScopedCFTypeRef<CGImageRef> cg_image( CGBitmapContextCreateImage(context)); ui_image.reset([[UIImage alloc] initWithCGImage:cg_image diff --git a/chromium/ui/base/resource/resource_bundle_unittest.cc b/chromium/ui/base/resource/resource_bundle_unittest.cc index f6ab49dfbb9..4ba3deacba6 100644 --- a/chromium/ui/base/resource/resource_bundle_unittest.cc +++ b/chromium/ui/base/resource/resource_bundle_unittest.cc @@ -5,6 +5,7 @@ #include "ui/base/resource/resource_bundle.h" #include "base/base_paths.h" +#include "base/big_endian.h" #include "base/file_util.h" #include "base/files/file_path.h" #include "base/files/scoped_temp_dir.h" @@ -12,7 +13,7 @@ #include "base/memory/ref_counted_memory.h" #include "base/path_service.h" #include "base/strings/utf_string_conversions.h" -#include "net/base/big_endian.h" +#include "grit/ui_resources.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -20,8 +21,9 @@ #include "ui/base/resource/data_pack.h" #include "ui/gfx/codec/png_codec.h" #include "ui/gfx/image/image_skia.h" - -#include "grit/ui_resources.h" +#if defined(OS_WIN) +#include "ui/gfx/win/dpi.h" +#endif using ::testing::_; using ::testing::Between; @@ -78,8 +80,9 @@ class MockResourceBundleDelegate : public ui::ResourceBundle::Delegate { *value = GetRawDataResourceMock(resource_id, scale_factor); return true; } - MOCK_METHOD1(GetLocalizedStringMock, string16(int message_id)); - virtual bool GetLocalizedString(int message_id, string16* value) OVERRIDE { + MOCK_METHOD1(GetLocalizedStringMock, base::string16(int message_id)); + virtual bool GetLocalizedString(int message_id, + base::string16* value) OVERRIDE { *value = GetLocalizedStringMock(message_id); return true; } @@ -105,8 +108,8 @@ void AddCustomChunk(const base::StringPiece& custom_chunk, for (size_t i = 0; i < sizeof(uint32); ++i) ihdr_length_data[i] = *(ihdr_start + i); uint32 ihdr_chunk_length = 0; - net::ReadBigEndian(reinterpret_cast<char*>(ihdr_length_data), - &ihdr_chunk_length); + base::ReadBigEndian(reinterpret_cast<char*>(ihdr_length_data), + &ihdr_chunk_length); EXPECT_TRUE(std::equal( ihdr_start + sizeof(uint32), ihdr_start + sizeof(uint32) + sizeof(kPngIHDRChunkType), @@ -297,14 +300,14 @@ TEST_F(ResourceBundleTest, DelegateGetLocalizedString) { MockResourceBundleDelegate delegate; ResourceBundle* resource_bundle = CreateResourceBundle(&delegate); - string16 data = ASCIIToUTF16("My test data"); + base::string16 data = base::ASCIIToUTF16("My test data"); int resource_id = 5; EXPECT_CALL(delegate, GetLocalizedStringMock(resource_id)) .Times(1) .WillOnce(Return(data)); - string16 result = resource_bundle->GetLocalizedString(resource_id); + base::string16 result = resource_bundle->GetLocalizedString(resource_id); EXPECT_EQ(data, result); } @@ -359,7 +362,7 @@ class ResourceBundleImageTest : public ResourceBundleTest { // Write an empty data pak for locale data. const base::FilePath& locale_path = dir_path().Append( FILE_PATH_LITERAL("locale.pak")); - EXPECT_EQ(file_util::WriteFile(locale_path, kEmptyPakContents, + EXPECT_EQ(base::WriteFile(locale_path, kEmptyPakContents, kEmptyPakSize), static_cast<int>(kEmptyPakSize)); @@ -386,7 +389,7 @@ TEST_F(ResourceBundleImageTest, LoadDataResourceBytes) { base::FilePath data_path = dir_path().Append(FILE_PATH_LITERAL("sample.pak")); // Dump contents into the pak files. - ASSERT_EQ(file_util::WriteFile(data_path, kEmptyPakContents, + ASSERT_EQ(base::WriteFile(data_path, kEmptyPakContents, kEmptyPakSize), static_cast<int>(kEmptyPakSize)); // Create a resource bundle from the file. @@ -411,9 +414,9 @@ TEST_F(ResourceBundleImageTest, GetRawDataResource) { dir_path().Append(FILE_PATH_LITERAL("sample_2x.pak")); // Dump contents into the pak files. - ASSERT_EQ(file_util::WriteFile(data_path, kSamplePakContents, + ASSERT_EQ(base::WriteFile(data_path, kSamplePakContents, kSamplePakSize), static_cast<int>(kSamplePakSize)); - ASSERT_EQ(file_util::WriteFile(data_2x_path, kSamplePakContents2x, + ASSERT_EQ(base::WriteFile(data_2x_path, kSamplePakContents2x, kSamplePakSize2x), static_cast<int>(kSamplePakSize2x)); // Load the regular and 2x pak files. @@ -439,6 +442,9 @@ TEST_F(ResourceBundleImageTest, GetRawDataResource) { // Test requesting image reps at various scale factors from the image returned // via ResourceBundle::GetImageNamed(). TEST_F(ResourceBundleImageTest, GetImageNamed) { +#if defined(OS_WIN) + gfx::ForceHighDPISupportForTesting(2.0); +#endif std::vector<ScaleFactor> supported_factors; supported_factors.push_back(SCALE_FACTOR_100P); supported_factors.push_back(SCALE_FACTOR_200P); @@ -459,8 +465,8 @@ TEST_F(ResourceBundleImageTest, GetImageNamed) { gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3); -#if defined(OS_CHROMEOS) - // ChromeOS loads highest scale factor first. +#if defined(OS_CHROMEOS) || defined(OS_WIN) + // ChromeOS/Windows load highest scale factor first. EXPECT_EQ(ui::SCALE_FACTOR_200P, GetSupportedScaleFactor(image_skia->image_reps()[0].scale())); #else @@ -471,19 +477,25 @@ TEST_F(ResourceBundleImageTest, GetImageNamed) { // Resource ID 3 exists in both 1x and 2x paks. Image reps should be // available for both scale factors in |image_skia|. gfx::ImageSkiaRep image_rep = - image_skia->GetRepresentation(GetImageScale(ui::SCALE_FACTOR_100P)); + image_skia->GetRepresentation( + GetScaleForScaleFactor(ui::SCALE_FACTOR_100P)); EXPECT_EQ(ui::SCALE_FACTOR_100P, GetSupportedScaleFactor(image_rep.scale())); image_rep = - image_skia->GetRepresentation(GetImageScale(ui::SCALE_FACTOR_200P)); + image_skia->GetRepresentation( + GetScaleForScaleFactor(ui::SCALE_FACTOR_200P)); EXPECT_EQ(ui::SCALE_FACTOR_200P, GetSupportedScaleFactor(image_rep.scale())); // The 1.4x pack was not loaded. Requesting the 1.4x resource should return // either the 1x or the 2x resource. image_rep = image_skia->GetRepresentation( - ui::GetImageScale(ui::SCALE_FACTOR_140P)); + ui::GetScaleForScaleFactor(ui::SCALE_FACTOR_140P)); ui::ScaleFactor scale_factor = GetSupportedScaleFactor(image_rep.scale()); EXPECT_TRUE(scale_factor == ui::SCALE_FACTOR_100P || scale_factor == ui::SCALE_FACTOR_200P); + + // ImageSkia scales image if the one for the requested scale factor is not + // available. + EXPECT_EQ(1.4f, image_skia->GetRepresentation(1.4f).scale()); } // Test that GetImageNamed() behaves properly for images which GRIT has @@ -514,7 +526,8 @@ TEST_F(ResourceBundleImageTest, GetImageNamedFallback1x) { // The image rep for 2x should be available. It should be resized to the // proper 2x size. gfx::ImageSkiaRep image_rep = - image_skia->GetRepresentation(GetImageScale(ui::SCALE_FACTOR_200P)); + image_skia->GetRepresentation(GetScaleForScaleFactor( + ui::SCALE_FACTOR_200P)); EXPECT_EQ(ui::SCALE_FACTOR_200P, GetSupportedScaleFactor(image_rep.scale())); EXPECT_EQ(20, image_rep.pixel_width()); EXPECT_EQ(20, image_rep.pixel_height()); @@ -553,15 +566,21 @@ TEST_F(ResourceBundleImageTest, GetImageNamedFallback1xRounding) { gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3); gfx::ImageSkiaRep image_rep = image_skia->GetRepresentation( - GetImageScale(ui::SCALE_FACTOR_140P)); + GetScaleForScaleFactor(ui::SCALE_FACTOR_140P)); EXPECT_EQ(12, image_rep.pixel_width()); image_rep = image_skia->GetRepresentation( - GetImageScale(ui::SCALE_FACTOR_180P)); + GetScaleForScaleFactor(ui::SCALE_FACTOR_180P)); EXPECT_EQ(15, image_rep.pixel_width()); } #endif -TEST_F(ResourceBundleImageTest, FallbackToNone) { +#if defined(OS_IOS) +// Fails on devices that have non-100P scaling. See crbug.com/298406 +#define MAYBE_FallbackToNone DISABLED_FallbackToNone +#else +#define MAYBE_FallbackToNone FallbackToNone +#endif +TEST_F(ResourceBundleImageTest, MAYBE_FallbackToNone) { base::FilePath data_default_path = dir_path().AppendASCII("sample.pak"); // Create the pak files. @@ -573,6 +592,7 @@ TEST_F(ResourceBundleImageTest, FallbackToNone) { gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3); EXPECT_EQ(1u, image_skia->image_reps().size()); + EXPECT_TRUE(image_skia->image_reps()[0].unscaled()); EXPECT_EQ(ui::SCALE_FACTOR_100P, GetSupportedScaleFactor(image_skia->image_reps()[0].scale())); } diff --git a/chromium/ui/base/resource/resource_bundle_win.cc b/chromium/ui/base/resource/resource_bundle_win.cc index cb99e209c3a..fa17eee5031 100644 --- a/chromium/ui/base/resource/resource_bundle_win.cc +++ b/chromium/ui/base/resource/resource_bundle_win.cc @@ -7,9 +7,13 @@ #include "base/logging.h" #include "base/path_service.h" #include "base/strings/utf_string_conversions.h" +#include "skia/ext/image_operations.h" #include "ui/base/layout.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/resource_data_dll_win.h" +#include "ui/gfx/geometry/size_conversions.h" +#include "ui/gfx/image/image_skia.h" +#include "ui/gfx/image/image_skia_source.h" #include "ui/gfx/win/dpi.h" namespace ui { @@ -30,7 +34,7 @@ base::FilePath GetResourcesPakFilePath(const std::string& pak_name) { return path.AppendASCII(pak_name.c_str()); // Return just the name of the pack file. - return base::FilePath(ASCIIToUTF16(pak_name)); + return base::FilePath(base::ASCIIToUTF16(pak_name)); } } // namespace @@ -38,36 +42,18 @@ base::FilePath GetResourcesPakFilePath(const std::string& pak_name) { void ResourceBundle::LoadCommonResources() { // As a convenience, add the current resource module as a data packs. data_packs_.push_back(new ResourceDataDLL(GetCurrentResourceDLL())); - // Have high-DPI resources for 140% and 180% scaling on Windows based on - // default scaling for Metro mode. If high-DPI mode is enabled, load resource - // pak closest to the desired scale factor. The high-DPI resources are - // scaled up from 100% touch. - float scale = gfx::win::GetDeviceScaleFactor(); - bool force_touch_resources = false; - switch(ui::GetSupportedScaleFactor(scale)) { - case ui::SCALE_FACTOR_180P: - AddDataPackFromPath(GetResourcesPakFilePath( - "chrome_touch_180_percent.pak"), - SCALE_FACTOR_180P); - force_touch_resources = true; - break; - case ui::SCALE_FACTOR_140P: - AddDataPackFromPath(GetResourcesPakFilePath( - "chrome_touch_140_percent.pak"), - SCALE_FACTOR_140P); - force_touch_resources = true; - } - // TODO(kevers|girard): Remove loading of 1x resources when in high-DPI - // mode once all resources are available at 140% and 180%. - if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH || force_touch_resources) { - AddDataPackFromPath( - GetResourcesPakFilePath("chrome_touch_100_percent.pak"), - SCALE_FACTOR_100P); - } else { + + if (IsScaleFactorSupported(SCALE_FACTOR_100P)) { AddDataPackFromPath( GetResourcesPakFilePath("chrome_100_percent.pak"), SCALE_FACTOR_100P); } + if (IsScaleFactorSupported(SCALE_FACTOR_200P)) { + DCHECK(gfx::IsHighDPIEnabled()); + AddDataPackFromPath( + GetResourcesPakFilePath("chrome_200_percent.pak"), + SCALE_FACTOR_200P); + } } gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) { diff --git a/chromium/ui/base/resource/resource_bundle_win.h b/chromium/ui/base/resource/resource_bundle_win.h index 9a75bedf856..811464e1304 100644 --- a/chromium/ui/base/resource/resource_bundle_win.h +++ b/chromium/ui/base/resource/resource_bundle_win.h @@ -10,16 +10,16 @@ #include <windows.h> #include "base/basictypes.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { // NOTE: This needs to be called before initializing ResourceBundle if your // resources are not stored in the executable. -UI_EXPORT void SetResourcesDataDLL(HINSTANCE handle); +UI_BASE_EXPORT void SetResourcesDataDLL(HINSTANCE handle); // Loads and returns an icon from the app module. -UI_EXPORT HICON LoadThemeIconFromResourcesDataDLL(int icon_id); +UI_BASE_EXPORT HICON LoadThemeIconFromResourcesDataDLL(int icon_id); } // namespace ui diff --git a/chromium/ui/base/resource/resource_data_dll_win.cc b/chromium/ui/base/resource/resource_data_dll_win.cc index c6c90c71d5b..e6a35aa3cd8 100644 --- a/chromium/ui/base/resource/resource_data_dll_win.cc +++ b/chromium/ui/base/resource/resource_data_dll_win.cc @@ -47,8 +47,7 @@ base::RefCountedStaticMemory* ResourceDataDLL::GetStaticMemory( size_t data_size; if (base::win::GetDataResourceFromModule(module_, resource_id, &data_ptr, &data_size)) { - return new base::RefCountedStaticMemory( - reinterpret_cast<const unsigned char*>(data_ptr), data_size); + return new base::RefCountedStaticMemory(data_ptr, data_size); } return NULL; } diff --git a/chromium/ui/base/resource/resource_handle.h b/chromium/ui/base/resource/resource_handle.h index 14be54efeb2..11eeac165ed 100644 --- a/chromium/ui/base/resource/resource_handle.h +++ b/chromium/ui/base/resource/resource_handle.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "base/strings/string_piece.h" #include "ui/base/layout.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace base { class RefCountedStaticMemory; @@ -16,7 +16,7 @@ class RefCountedStaticMemory; namespace ui { -class UI_EXPORT ResourceHandle { +class UI_BASE_EXPORT ResourceHandle { public: // What type of encoding the text resources use. enum TextEncodingType { diff --git a/chromium/ui/base/strings/OWNERS b/chromium/ui/base/strings/OWNERS deleted file mode 100644 index 72e8ffc0db8..00000000000 --- a/chromium/ui/base/strings/OWNERS +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/chromium/ui/base/strings/app_locale_settings.grd b/chromium/ui/base/strings/app_locale_settings.grd deleted file mode 100644 index d285e9275b0..00000000000 --- a/chromium/ui/base/strings/app_locale_settings.grd +++ /dev/null @@ -1,263 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<grit latest_public_release="0" current_release="1"> - <outputs> - <output filename="grit/app_locale_settings.h" type="rc_header"> - <emit emit_type='prepend'></emit> - </output> - <output filename="app_locale_settings_am.pak" type="data_package" lang="am" /> - <output filename="app_locale_settings_ar.pak" type="data_package" lang="ar" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="app_locale_settings_ast.pak" type="data_package" lang="ast" /> - </if> - <output filename="app_locale_settings_bg.pak" type="data_package" lang="bg" /> - <output filename="app_locale_settings_bn.pak" type="data_package" lang="bn" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="app_locale_settings_bs.pak" type="data_package" lang="bs" /> - </if> - <output filename="app_locale_settings_ca.pak" type="data_package" lang="ca" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="app_locale_settings_ca@valencia.pak" type="data_package" lang="ca@valencia" /> - </if> - <output filename="app_locale_settings_cs.pak" type="data_package" lang="cs" /> - <output filename="app_locale_settings_da.pak" type="data_package" lang="da" /> - <output filename="app_locale_settings_de.pak" type="data_package" lang="de" /> - <output filename="app_locale_settings_el.pak" type="data_package" lang="el" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="app_locale_settings_en-AU.pak" type="data_package" lang="en-AU" /> - </if> - <output filename="app_locale_settings_en-GB.pak" type="data_package" lang="en-GB" /> - <output filename="app_locale_settings_en-US.pak" type="data_package" lang="en" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="app_locale_settings_eo.pak" type="data_package" lang="eo" /> - </if> - <output filename="app_locale_settings_es.pak" type="data_package" lang="es" /> - <if expr="is_ios"> - <!-- iOS uses es-MX for es-419 --> - <output filename="app_locale_settings_es-MX.pak" type="data_package" lang="es-419" /> - </if> - <if expr="not is_ios"> - <output filename="app_locale_settings_es-419.pak" type="data_package" lang="es-419" /> - </if> - <output filename="app_locale_settings_et.pak" type="data_package" lang="et" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="app_locale_settings_eu.pak" type="data_package" lang="eu" /> - </if> - <output filename="app_locale_settings_fa.pak" type="data_package" lang="fa" /> - <output filename="app_locale_settings_fake-bidi.pak" type="data_package" lang="fake-bidi" /> - <output filename="app_locale_settings_fi.pak" type="data_package" lang="fi" /> - <output filename="app_locale_settings_fil.pak" type="data_package" lang="fil" /> - <output filename="app_locale_settings_fr.pak" type="data_package" lang="fr" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="app_locale_settings_gl.pak" type="data_package" lang="gl" /> - </if> - <output filename="app_locale_settings_gu.pak" type="data_package" lang="gu" /> - <output filename="app_locale_settings_he.pak" type="data_package" lang="he" /> - <output filename="app_locale_settings_hi.pak" type="data_package" lang="hi" /> - <output filename="app_locale_settings_hr.pak" type="data_package" lang="hr" /> - <output filename="app_locale_settings_hu.pak" type="data_package" lang="hu" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="app_locale_settings_hy.pak" type="data_package" lang="hy" /> - <output filename="app_locale_settings_ia.pak" type="data_package" lang="ia" /> - </if> - <output filename="app_locale_settings_id.pak" type="data_package" lang="id" /> - <output filename="app_locale_settings_it.pak" type="data_package" lang="it" /> - <output filename="app_locale_settings_ja.pak" type="data_package" lang="ja" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="app_locale_settings_ka.pak" type="data_package" lang="ka" /> - </if> - <output filename="app_locale_settings_kn.pak" type="data_package" lang="kn" /> - <output filename="app_locale_settings_ko.pak" type="data_package" lang="ko" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="app_locale_settings_ku.pak" type="data_package" lang="ku" /> - <output filename="app_locale_settings_kw.pak" type="data_package" lang="kw" /> - </if> - <output filename="app_locale_settings_lt.pak" type="data_package" lang="lt" /> - <output filename="app_locale_settings_lv.pak" type="data_package" lang="lv" /> - <output filename="app_locale_settings_ml.pak" type="data_package" lang="ml" /> - <output filename="app_locale_settings_mr.pak" type="data_package" lang="mr" /> - <output filename="app_locale_settings_ms.pak" type="data_package" lang="ms" /> - <output filename="app_locale_settings_nl.pak" type="data_package" lang="nl" /> - <!-- The translation console uses 'no' for Norwegian Bokmål. It should - be 'nb'. --> - <output filename="app_locale_settings_nb.pak" type="data_package" lang="no" /> - <output filename="app_locale_settings_pl.pak" type="data_package" lang="pl" /> - <if expr="is_ios"> - <!-- iOS uses pt for pt-BR --> - <output filename="app_locale_settings_pt.pak" type="data_package" lang="pt-BR" /> - </if> - <if expr="not is_ios"> - <output filename="app_locale_settings_pt-BR.pak" type="data_package" lang="pt-BR" /> - </if> - <output filename="app_locale_settings_pt-PT.pak" type="data_package" lang="pt-PT" /> - <output filename="app_locale_settings_ro.pak" type="data_package" lang="ro" /> - <output filename="app_locale_settings_ru.pak" type="data_package" lang="ru" /> - <output filename="app_locale_settings_sk.pak" type="data_package" lang="sk" /> - <output filename="app_locale_settings_sl.pak" type="data_package" lang="sl" /> - <output filename="app_locale_settings_sr.pak" type="data_package" lang="sr" /> - <output filename="app_locale_settings_sv.pak" type="data_package" lang="sv" /> - <output filename="app_locale_settings_sw.pak" type="data_package" lang="sw" /> - <output filename="app_locale_settings_ta.pak" type="data_package" lang="ta" /> - <output filename="app_locale_settings_te.pak" type="data_package" lang="te" /> - <output filename="app_locale_settings_th.pak" type="data_package" lang="th" /> - <output filename="app_locale_settings_tr.pak" type="data_package" lang="tr" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="app_locale_settings_ug.pak" type="data_package" lang="ug" /> - </if> - <output filename="app_locale_settings_uk.pak" type="data_package" lang="uk" /> - <output filename="app_locale_settings_vi.pak" type="data_package" lang="vi" /> - <output filename="app_locale_settings_zh-CN.pak" type="data_package" lang="zh-CN" /> - <output filename="app_locale_settings_zh-TW.pak" type="data_package" lang="zh-TW" /> - </outputs> - <translations> - <file path="app_locale_settings_am.xtb" lang="am" /> - <file path="app_locale_settings_ar.xtb" lang="ar" /> - <file path="app_locale_settings_bg.xtb" lang="bg" /> - <file path="app_locale_settings_bn.xtb" lang="bn" /> - <file path="app_locale_settings_ca.xtb" lang="ca" /> - <file path="app_locale_settings_cs.xtb" lang="cs" /> - <file path="app_locale_settings_da.xtb" lang="da" /> - <file path="app_locale_settings_de.xtb" lang="de" /> - <file path="app_locale_settings_el.xtb" lang="el" /> - <file path="app_locale_settings_en-GB.xtb" lang="en-GB" /> - <file path="app_locale_settings_es.xtb" lang="es" /> - <file path="app_locale_settings_es-419.xtb" lang="es-419" /> - <file path="app_locale_settings_et.xtb" lang="et" /> - <file path="app_locale_settings_fa.xtb" lang="fa" /> - <file path="app_locale_settings_fi.xtb" lang="fi" /> - <file path="app_locale_settings_fil.xtb" lang="fil" /> - <file path="app_locale_settings_fr.xtb" lang="fr" /> - <file path="app_locale_settings_gu.xtb" lang="gu" /> - <file path="app_locale_settings_he.xtb" lang="he" /> - <file path="app_locale_settings_hi.xtb" lang="hi" /> - <file path="app_locale_settings_hr.xtb" lang="hr" /> - <file path="app_locale_settings_hu.xtb" lang="hu" /> - <file path="app_locale_settings_id.xtb" lang="id" /> - <file path="app_locale_settings_it.xtb" lang="it" /> - <file path="app_locale_settings_ja.xtb" lang="ja" /> - <file path="app_locale_settings_kn.xtb" lang="kn" /> - <file path="app_locale_settings_ko.xtb" lang="ko" /> - <file path="app_locale_settings_lt.xtb" lang="lt" /> - <file path="app_locale_settings_lv.xtb" lang="lv" /> - <file path="app_locale_settings_ml.xtb" lang="ml" /> - <file path="app_locale_settings_mr.xtb" lang="mr" /> - <file path="app_locale_settings_ms.xtb" lang="ms" /> - <file path="app_locale_settings_nl.xtb" lang="nl" /> - <file path="app_locale_settings_nb.xtb" lang="no" /> - <file path="app_locale_settings_pl.xtb" lang="pl" /> - <file path="app_locale_settings_pt-BR.xtb" lang="pt-BR" /> - <file path="app_locale_settings_pt-PT.xtb" lang="pt-PT" /> - <file path="app_locale_settings_ro.xtb" lang="ro" /> - <file path="app_locale_settings_ru.xtb" lang="ru" /> - <file path="app_locale_settings_sk.xtb" lang="sk" /> - <file path="app_locale_settings_sl.xtb" lang="sl" /> - <file path="app_locale_settings_sr.xtb" lang="sr" /> - <file path="app_locale_settings_sv.xtb" lang="sv" /> - <file path="app_locale_settings_sw.xtb" lang="sw" /> - <file path="app_locale_settings_ta.xtb" lang="ta" /> - <file path="app_locale_settings_te.xtb" lang="te" /> - <file path="app_locale_settings_th.xtb" lang="th" /> - <file path="app_locale_settings_tr.xtb" lang="tr" /> - <file path="app_locale_settings_uk.xtb" lang="uk" /> - <file path="app_locale_settings_vi.xtb" lang="vi" /> - <file path="app_locale_settings_zh-CN.xtb" lang="zh-CN" /> - <file path="app_locale_settings_zh-TW.xtb" lang="zh-TW" /> - </translations> - <release seq="1" allow_pseudo="false"> - <messages fallback_to_english="true"> - <!-- The UI font used in native UI components (e.g. menu). 'default' - indicates that the font obtained from the system be used. - Otherwise, the system default UI font will be overriden with - the family specified. This should be default for locales - other than Indian locales. - TODO(jungshik): This and IDS_UI_FONT_SIZE_SCALER are only used - on Windows now and are likely to be so in the future because Mac and - Linux fonts do not have the issue Windows fonts for some locales - (Indian) have. In that case, this need to be enclosed - by platform-dependent if-clause. --> - <if expr="is_win"> - <!-- Limit minimum UI font size to 5 by default. --> - <message name="IDS_MINIMUM_UI_FONT_SIZE" use_name_for_id="true"> - 5 - </message> - - <message name="IDS_UI_FONT_FAMILY" use_name_for_id="true"> - default - </message> - <!-- For Windows XP --> - <message name="IDS_UI_FONT_FAMILY_XP" use_name_for_id="true"> - default - </message> - - <!-- To get the actual UI font size for native UI components - (e.g. menu), the system UI font size is scaled with this value/100. - This should be 100 for most locales. --> - <message name="IDS_UI_FONT_SIZE_SCALER" use_name_for_id="true"> - 100 - </message> - <!-- For Windows XP --> - <message name="IDS_UI_FONT_SIZE_SCALER_XP" use_name_for_id="true"> - 100 - </message> - - <!-- The font used in Web UI (e.g. History). --> - <message name="IDS_WEB_FONT_FAMILY" use_name_for_id="true"> - 'Segoe UI', Tahoma, sans-serif - </message> - <!-- The font used in Web UI on Windows XP (e.g. History). --> - <message name="IDS_WEB_FONT_FAMILY_XP" use_name_for_id="true"> - Tahoma, sans-serif - </message> - - <!-- The relative font size in % used in Web UI (e.g. History). --> - <message name="IDS_WEB_FONT_SIZE" use_name_for_id="true"> - 75% - </message> - <!-- The relative font size in % used in web-style native pages - on Windows earlier than Vista (e.g. History). --> - <message name="IDS_WEB_FONT_SIZE_XP" use_name_for_id="true"> - 75% - </message> - </if> - <if expr="is_macosx or is_ios"> - <!-- The font used in Web UI (e.g. History). --> - <message name="IDS_WEB_FONT_FAMILY" use_name_for_id="true"> - 'Lucida Grande', sans-serif - </message> - - <!-- The relative font size in % used in Web UI (e.g. History). --> - <message name="IDS_WEB_FONT_SIZE" use_name_for_id="true"> - 75% - </message> - </if> - <if expr="(is_linux or is_android) and not pp_ifdef('chromeos')"> - <!-- The font used in Web UI (e.g. History). Note that these are only - backups. We try to use the system font if possible. --> - <message name="IDS_WEB_FONT_FAMILY" use_name_for_id="true"> - Arial, sans-serif - </message> - - <!-- The relative font size in % used in Web UI (e.g. History). --> - <message name="IDS_WEB_FONT_SIZE" use_name_for_id="true"> - 75% - </message> - </if> - <!-- For Chrome OS --> - <if expr="pp_ifdef('chromeos')"> - <!-- The font name like: 'Font Name, 10' --> - <message name="IDS_UI_FONT_FAMILY_CROS" use_name_for_id="true"> - Noto Sans UI,ui-sans, 12px - </message> - - <!-- The font used in Web UI (e.g. History). --> - <message name="IDS_WEB_FONT_FAMILY" use_name_for_id="true"> - 'Noto Sans UI', sans-serif - </message> - - <!-- The relative font size in % used in Web UI (e.g. History). --> - <message name="IDS_WEB_FONT_SIZE" use_name_for_id="true"> - 75% - </message> - </if> - </messages> - </release> -</grit> diff --git a/chromium/ui/base/strings/app_locale_settings_am.xtb b/chromium/ui/base/strings/app_locale_settings_am.xtb deleted file mode 100644 index e16e4992f36..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_am.xtb +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="am"> -<translation id="IDS_UI_FONT_FAMILY_XP">abyssinica sil</translation> -<if expr="pp_ifdef('chromeos')"> - <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI,Abyssinica SIL, sans-serif</translation> -</if> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_ar.xtb b/chromium/ui/base/strings/app_locale_settings_ar.xtb deleted file mode 100644 index 2ec65feb761..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_ar.xtb +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ar"> -<translation id="IDS_MINIMUM_UI_FONT_SIZE">10</translation> -<translation id="IDS_UI_FONT_FAMILY_CROS">Noto Sans UI,Droid Arabic Kufi,ui-sans, 13px</translation> -<if expr="pp_ifdef('chromeos')"> - <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI, Droid Arabic Naskh, sans-serif</translation> -</if> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_bg.xtb b/chromium/ui/base/strings/app_locale_settings_bg.xtb deleted file mode 100644 index ebab4736462..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_bg.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="bg"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_bn.xtb b/chromium/ui/base/strings/app_locale_settings_bn.xtb deleted file mode 100644 index 1e9ee2c4a56..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_bn.xtb +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="bn"> -<if expr="is_win"> - <translation id="IDS_UI_FONT_FAMILY">Vrinda</translation> - <translation id="IDS_UI_FONT_FAMILY_XP">Vrinda</translation> - <translation id="IDS_UI_FONT_SIZE_SCALER_XP">160</translation> - <translation id="IDS_UI_FONT_SIZE_SCALER">120</translation> - <translation id="IDS_WEB_FONT_SIZE_XP">110%</translation> - <translation id="IDS_WEB_FONT_FAMILY">Vrinda</translation> - <translation id="IDS_WEB_FONT_FAMILY_XP">Vrinda</translation> -</if> -<if expr="is_linux and not pp_ifdef('chromeos')"> - <translation id="IDS_WEB_FONT_FAMILY">Lohit Bengali</translation> -</if> -<if expr="pp_ifdef('chromeos')"> - <translation id="IDS_UI_FONT_FAMILY_CROS">Noto Sans UI, Noto Sans Bengali UI, ui-sans, 13px</translation> - <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI, Noto Sans Bengali UI, sans-serif</translation> -</if> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_ca.xtb b/chromium/ui/base/strings/app_locale_settings_ca.xtb deleted file mode 100644 index 1438d89736b..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_ca.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ca"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_cs.xtb b/chromium/ui/base/strings/app_locale_settings_cs.xtb deleted file mode 100644 index 2d95130b933..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_cs.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="cs"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_da.xtb b/chromium/ui/base/strings/app_locale_settings_da.xtb deleted file mode 100644 index 751fa4a8b98..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_da.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="da"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_de.xtb b/chromium/ui/base/strings/app_locale_settings_de.xtb deleted file mode 100644 index 91de7f5115b..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_de.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="de"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_el.xtb b/chromium/ui/base/strings/app_locale_settings_el.xtb deleted file mode 100644 index 6e5e7d8157a..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_el.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="el"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_en-GB.xtb b/chromium/ui/base/strings/app_locale_settings_en-GB.xtb deleted file mode 100644 index 0fb2133a32a..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_en-GB.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="en-GB"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_es-419.xtb b/chromium/ui/base/strings/app_locale_settings_es-419.xtb deleted file mode 100644 index 2fe4770c0d6..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_es-419.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="es-419"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_es.xtb b/chromium/ui/base/strings/app_locale_settings_es.xtb deleted file mode 100644 index 64022ecf43c..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_es.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="es"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_et.xtb b/chromium/ui/base/strings/app_locale_settings_et.xtb deleted file mode 100644 index 5244dfd4bfd..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_et.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="et"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_fa.xtb b/chromium/ui/base/strings/app_locale_settings_fa.xtb deleted file mode 100644 index 386e0aeb95e..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_fa.xtb +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="fa"> -<translation id="IDS_MINIMUM_UI_FONT_SIZE">10</translation> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_fi.xtb b/chromium/ui/base/strings/app_locale_settings_fi.xtb deleted file mode 100644 index 4691cd56eaf..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_fi.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="fi"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_fil.xtb b/chromium/ui/base/strings/app_locale_settings_fil.xtb deleted file mode 100644 index 443630e740a..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_fil.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="fil"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_fr.xtb b/chromium/ui/base/strings/app_locale_settings_fr.xtb deleted file mode 100644 index 63026a3ad03..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_fr.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="fr"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_gu.xtb b/chromium/ui/base/strings/app_locale_settings_gu.xtb deleted file mode 100644 index 36e499834fc..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_gu.xtb +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="gu"> -<translation id="IDS_UI_FONT_SIZE_SCALER">115</translation> -<translation id="IDS_MINIMUM_UI_FONT_SIZE">10</translation> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_he.xtb b/chromium/ui/base/strings/app_locale_settings_he.xtb deleted file mode 100644 index 55450118f8a..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_he.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="he"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_hi.xtb b/chromium/ui/base/strings/app_locale_settings_hi.xtb deleted file mode 100644 index 73814971c8e..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_hi.xtb +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="hi"> -<translation id="IDS_UI_FONT_SIZE_SCALER_XP">140</translation> -<translation id="IDS_UI_FONT_SIZE_SCALER">125</translation> -<translation id="IDS_MINIMUM_UI_FONT_SIZE">10</translation> -<translation id="IDS_UI_FONT_FAMILY_CROS">Noto Sans UI,Noto Sans Devanagari UI,ui-sans, 13px</translation> -<if expr="pp_ifdef('chromeos')"> - <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI,Noto Sans Devanagari UI,sans-serif</translation> -</if> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_hr.xtb b/chromium/ui/base/strings/app_locale_settings_hr.xtb deleted file mode 100644 index 26f99d08e94..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_hr.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="hr"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_hu.xtb b/chromium/ui/base/strings/app_locale_settings_hu.xtb deleted file mode 100644 index 7ef9a5e0bbe..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_hu.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="hu"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_id.xtb b/chromium/ui/base/strings/app_locale_settings_id.xtb deleted file mode 100644 index aa34783a27c..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_id.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="id"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_it.xtb b/chromium/ui/base/strings/app_locale_settings_it.xtb deleted file mode 100644 index a6ac8d46363..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_it.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="it"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_ja.xtb b/chromium/ui/base/strings/app_locale_settings_ja.xtb deleted file mode 100644 index 1e843b0ad73..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_ja.xtb +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ja"> -<translation id="IDS_MINIMUM_UI_FONT_SIZE">10</translation> -<translation id="IDS_UI_FONT_FAMILY_CROS">MotoyaG04Gothic,Noto Sans UI,IPAPGothic,ui-sans, 13px</translation> -<if expr="is_win"> - <translation id="IDS_WEB_FONT_FAMILY">'Segoe UI',Arial,Meiryo,'MS PGothic',sans-serif</translation> - <translation id="IDS_WEB_FONT_FAMILY_XP">Arial,Meiryo,'MS PGothic',sans-serif</translation> -</if> -<if expr="is_macosx or is_ios"> - <translation id="IDS_WEB_FONT_FAMILY">Helvetica,Hiragino Kaku Gothic Pro,sans-serif</translation> -</if> -<if expr="is_linux and not pp_ifdef('chromeos')"> - <translation id="IDS_WEB_FONT_FAMILY">VL PGothic,Sazanami Gothic,Kochi Gothic,sans-serif</translation> -</if> -<if expr="pp_ifdef('chromeos') and pp_ifdef('_google_chrome')"> - <translation id="IDS_WEB_FONT_FAMILY">MotoyaG04Gothic, Noto Sans UI, sans-serif</translation> -</if> -<if expr="pp_ifdef('chromeos') and not pp_ifdef('_google_chrome')"> - <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI, IPAPGothic, sans-serif</translation> -</if> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_kn.xtb b/chromium/ui/base/strings/app_locale_settings_kn.xtb deleted file mode 100644 index f385c52feb9..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_kn.xtb +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="kn"> -<translation id="IDS_MINIMUM_UI_FONT_SIZE">10</translation> -<if expr="is_win"> - <translation id="IDS_UI_FONT_SIZE_SCALER_XP">142</translation> - <translation id="IDS_UI_FONT_SIZE_SCALER">130</translation> -</if> -<if expr="pp_ifdef('chromeos')"> - <translation id="IDS_UI_FONT_FAMILY_CROS">Noto Sans UI, Noto Sans Kannada UI,ui-sans, 13px</translation> - <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI, Noto Sans Kannada UI, sans-serif</translation> -</if> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_ko.xtb b/chromium/ui/base/strings/app_locale_settings_ko.xtb deleted file mode 100644 index e1db12edb41..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_ko.xtb +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ko"> -<translation id="IDS_MINIMUM_UI_FONT_SIZE">10</translation> -<translation id="IDS_UI_FONT_FAMILY_CROS">Noto Sans UI,NanumGothic,ui-sans, 13px</translation> -<if expr="is_win"> - <translation id="IDS_WEB_FONT_FAMILY">'Segoe UI',Arial,'Malgun Gothic',Gulim,sans-serif</translation> - <translation id="IDS_WEB_FONT_FAMILY_XP">Arial,'Malgun Gothic',Gulim,sans-serif</translation> -</if> -<if expr="is_macosx or is_ios"> - <translation id="IDS_WEB_FONT_FAMILY">Helvetica,AppleGothic,sans-serif</translation> -</if> -<if expr="is_linux and not pp_ifdef('chromeos')"> - <translation id="IDS_WEB_FONT_FAMILY">NanumGothic,UnDotum,Baekmuk Gulim,sans-serif</translation> -</if> -<if expr="pp_ifdef('chromeos')"> - <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI, NanumGothic, sans-serif</translation> -</if> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_lt.xtb b/chromium/ui/base/strings/app_locale_settings_lt.xtb deleted file mode 100644 index 5804ae2a34c..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_lt.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="lt"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_lv.xtb b/chromium/ui/base/strings/app_locale_settings_lv.xtb deleted file mode 100644 index a0a1c477043..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_lv.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="lv"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_ml.xtb b/chromium/ui/base/strings/app_locale_settings_ml.xtb deleted file mode 100644 index 27292f926b3..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_ml.xtb +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ml"> -<translation id="IDS_MINIMUM_UI_FONT_SIZE">10</translation> -<if expr="is_win"> - <translation id="IDS_UI_FONT_FAMILY_XP">kartika</translation> - <translation id="IDS_UI_FONT_SIZE_SCALER_XP">150</translation> - <translation id="IDS_UI_FONT_SIZE_SCALER">120</translation> - <translation id="IDS_WEB_FONT_FAMILY">'Segoe UI',Arial,AnjaliOldLipi,Rachana,Kartika</translation> - <translation id="IDS_WEB_FONT_FAMILY_XP">Arial,AnjaliOldLipi,Rachana,Kartika</translation> -</if> -<if expr="is_linux and not pp_ifdef('chromeos')"> - <translation id="IDS_WEB_FONT_FAMILY">Arial,AnjaliOldLipi,Rachana,Kartika,sans-serif</translation> -</if> -<if expr="pp_ifdef('chromeos')"> - <translation id="IDS_UI_FONT_FAMILY_CROS">Noto Sans UI, Noto Sans Malayalam UI,ui-sans, 13px</translation> - <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI, Noto Sans Malayalam UI, sans-serif</translation> -</if> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_mr.xtb b/chromium/ui/base/strings/app_locale_settings_mr.xtb deleted file mode 100644 index d657ca38355..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_mr.xtb +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="mr"> -<translation id="IDS_UI_FONT_SIZE_SCALER_XP">140</translation> -<translation id="IDS_UI_FONT_SIZE_SCALER">125</translation> -<translation id="IDS_MINIMUM_UI_FONT_SIZE">10</translation> -<translation id="IDS_UI_FONT_FAMILY_CROS">Noto Sans UI,Noto Sans Devanagari UI,ui-sans, 13px</translation> -<if expr="pp_ifdef('chromeos')"> - <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI,Noto Sans Devanagari UI,sans-serif</translation> -</if> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_ms.xtb b/chromium/ui/base/strings/app_locale_settings_ms.xtb deleted file mode 100644 index 518685dd52f..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_ms.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ms"> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/app_locale_settings_nb.xtb b/chromium/ui/base/strings/app_locale_settings_nb.xtb deleted file mode 100644 index 913638ba4e9..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_nb.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="no"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_nl.xtb b/chromium/ui/base/strings/app_locale_settings_nl.xtb deleted file mode 100644 index e78241066f9..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_nl.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="nl"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_pl.xtb b/chromium/ui/base/strings/app_locale_settings_pl.xtb deleted file mode 100644 index 4519e3de389..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_pl.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="pl"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_pt-BR.xtb b/chromium/ui/base/strings/app_locale_settings_pt-BR.xtb deleted file mode 100644 index e95eb56bb7b..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_pt-BR.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="pt-BR"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_pt-PT.xtb b/chromium/ui/base/strings/app_locale_settings_pt-PT.xtb deleted file mode 100644 index 1dcf557a081..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_pt-PT.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="pt-PT"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_ro.xtb b/chromium/ui/base/strings/app_locale_settings_ro.xtb deleted file mode 100644 index 9e434933f16..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_ro.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ro"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_ru.xtb b/chromium/ui/base/strings/app_locale_settings_ru.xtb deleted file mode 100644 index c4a621b9fdd..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_ru.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ru"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_sk.xtb b/chromium/ui/base/strings/app_locale_settings_sk.xtb deleted file mode 100644 index 00750d31cd0..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_sk.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="sk"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_sl.xtb b/chromium/ui/base/strings/app_locale_settings_sl.xtb deleted file mode 100644 index 489b7e46ba0..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_sl.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="sl"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_sr.xtb b/chromium/ui/base/strings/app_locale_settings_sr.xtb deleted file mode 100644 index 38f6f354db5..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_sr.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="sr"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_sv.xtb b/chromium/ui/base/strings/app_locale_settings_sv.xtb deleted file mode 100644 index ddea3dcce5d..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_sv.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="sv"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_sw.xtb b/chromium/ui/base/strings/app_locale_settings_sw.xtb deleted file mode 100644 index b7750886d22..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_sw.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="sw"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_ta.xtb b/chromium/ui/base/strings/app_locale_settings_ta.xtb deleted file mode 100644 index ef5ff549358..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_ta.xtb +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ta"> -<translation id="IDS_UI_FONT_FAMILY_CROS">Noto Sans UI,Noto Sans Tamil UI,ui-sans, 13px</translation> -<if expr="pp_ifdef('chromeos')"> - <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI,Noto Sans Tamil UI,sans-serif</translation> -</if> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_te.xtb b/chromium/ui/base/strings/app_locale_settings_te.xtb deleted file mode 100644 index a25522e8696..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_te.xtb +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="te"> -<translation id="IDS_MINIMUM_UI_FONT_SIZE">10</translation> -<if expr="is_win"> -<translation id="IDS_UI_FONT_SIZE_SCALER_XP">145</translation> -<translation id="IDS_UI_FONT_SIZE_SCALER">130</translation> -</if> -<if expr="pp_ifdef('chromeos')"> - <translation id="IDS_UI_FONT_FAMILY_CROS">Noto Sans UI, Noto Sans Telugu UI,ui-sans, 13px</translation> - <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI, Noto Sans Telugu UI, sans-serif</translation> -</if> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_th.xtb b/chromium/ui/base/strings/app_locale_settings_th.xtb deleted file mode 100644 index d1851985d0d..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_th.xtb +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="th"> -<translation id="IDS_MINIMUM_UI_FONT_SIZE">10</translation> -<translation id="IDS_UI_FONT_FAMILY_CROS">Noto Sans UI,Noto Sans Thai UI,ui-sans, 13px</translation> -<if expr="is_win"> - <translation id="IDS_WEB_FONT_FAMILY">Tahoma,sans-serif</translation> - <translation id="IDS_WEB_FONT_FAMILY_XP">Tahoma,sans-serif</translation> -</if> -<if expr="is_linux and not pp_ifdef('chromeos')"> - <translation id="IDS_WEB_FONT_FAMILY">Norasi,Waree,Garuda,Loma,sans-serif</translation> -</if> -<if expr="pp_ifdef('chromeos')"> - <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI,Noto Sans Thai UI,sans-serif</translation> -</if> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_tr.xtb b/chromium/ui/base/strings/app_locale_settings_tr.xtb deleted file mode 100644 index 9a299515338..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_tr.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="tr"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_uk.xtb b/chromium/ui/base/strings/app_locale_settings_uk.xtb deleted file mode 100644 index f0db52c6692..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_uk.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="uk"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_vi.xtb b/chromium/ui/base/strings/app_locale_settings_vi.xtb deleted file mode 100644 index b2957daa924..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_vi.xtb +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="vi"> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_zh-CN.xtb b/chromium/ui/base/strings/app_locale_settings_zh-CN.xtb deleted file mode 100644 index e67b6c12e12..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_zh-CN.xtb +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="zh-CN"> -<translation id="IDS_MINIMUM_UI_FONT_SIZE">10</translation> -<translation id="IDS_UI_FONT_FAMILY_CROS">Noto Sans UI,MYingHeiGB18030,MYingHeiB5HK,ui-sans, 13px</translation> -<if expr="is_win"> - <translation id="IDS_WEB_FONT_FAMILY">'Segoe UI',Arial,'Microsoft Yahei',Simsun,sans-serif</translation> - <translation id="IDS_WEB_FONT_FAMILY_XP">Arial,'Microsoft Yahei',Simsun,sans-serif</translation> -</if> -<if expr="is_macosx or is_ios"> - <translation id="IDS_WEB_FONT_FAMILY">Helvetica,STHeiti,sans-serif</translation> -</if> -<if expr="pp_ifdef('chromeos') and pp_ifdef('_google_chrome')"> - <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI, MYingHeiGB18030, MYingHeiB5HK, sans-serif</translation> -</if> -<if expr="pp_ifdef('chromeos') and not pp_ifdef('_google_chrome')"> - <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI, Droid Sans Fallback, sans-serif</translation> -</if> -</translationbundle> diff --git a/chromium/ui/base/strings/app_locale_settings_zh-TW.xtb b/chromium/ui/base/strings/app_locale_settings_zh-TW.xtb deleted file mode 100644 index 2492fbc3138..00000000000 --- a/chromium/ui/base/strings/app_locale_settings_zh-TW.xtb +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="zh-TW"> -<translation id="IDS_MINIMUM_UI_FONT_SIZE">10</translation> -<translation id="IDS_UI_FONT_FAMILY_CROS">Noto Sans UI,MYingHeiB5HK,MYingHeiGB18030,ui-sans, 13px</translation> -<if expr="is_win"> - <translation id="IDS_WEB_FONT_FAMILY">'Segoe UI',Arial,'Microsoft Jhenghei',PMingLiu,sans-serif</translation> - <translation id="IDS_WEB_FONT_FAMILY_XP">Arial,'Microsoft Jhenghei',PMingLiu,sans-serif</translation> -</if> -<if expr="is_macosx or is_ios"> - <translation id="IDS_WEB_FONT_FAMILY">Helvetica,LiHei Pro,sans-serif</translation> -</if> -<if expr="pp_ifdef('chromeos') and pp_ifdef('_google_chrome')"> - <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI, MYingHeiB5HK, MYingHeiGB18030, sans-serif</translation> -</if> -<if expr="pp_ifdef('chromeos') and not pp_ifdef('_google_chrome')"> - <translation id="IDS_WEB_FONT_FAMILY">Noto Sans UI, Droid Sans Fallback, sans-serif</translation> -</if> -</translationbundle> diff --git a/chromium/ui/base/strings/ui_strings.grd b/chromium/ui/base/strings/ui_strings.grd deleted file mode 100644 index 31413635cee..00000000000 --- a/chromium/ui/base/strings/ui_strings.grd +++ /dev/null @@ -1,1616 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- This file contains definitions of resources that will be translated for -each locale. Specifically, these are UI strings that are used by app/ that -need to be translated for each locale.--> - -<grit base_dir="." latest_public_release="0" current_release="1" - source_lang_id="en" enc_check="möl"> - <outputs> - <!-- TODO add each of your output files. Modify the three below, and add - your own for your various languages. See the user's guide - (http://wiki/Main/GritUsersGuide) for more details. - Note that all output references are relative to the output directory - which is specified at build time. --> - <output filename="grit/ui_strings.h" type="rc_header"> - <emit emit_type='prepend'></emit> - </output> - <output filename="ui_strings_am.pak" type="data_package" lang="am" /> - <output filename="ui_strings_ar.pak" type="data_package" lang="ar" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="ui_strings_ast.pak" type="data_package" lang="ast" /> - </if> - <output filename="ui_strings_bg.pak" type="data_package" lang="bg" /> - <output filename="ui_strings_bn.pak" type="data_package" lang="bn" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="ui_strings_bs.pak" type="data_package" lang="bs" /> - </if> - <output filename="ui_strings_ca.pak" type="data_package" lang="ca" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="ui_strings_ca@valencia.pak" type="data_package" lang="ca@valencia" /> - </if> - <output filename="ui_strings_cs.pak" type="data_package" lang="cs" /> - <output filename="ui_strings_da.pak" type="data_package" lang="da" /> - <output filename="ui_strings_de.pak" type="data_package" lang="de" /> - <output filename="ui_strings_el.pak" type="data_package" lang="el" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="ui_strings_en-AU.pak" type="data_package" lang="en-AU" /> - </if> - <output filename="ui_strings_en-GB.pak" type="data_package" lang="en-GB" /> - <output filename="ui_strings_en-US.pak" type="data_package" lang="en" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="ui_strings_eo.pak" type="data_package" lang="eo" /> - </if> - <output filename="ui_strings_es.pak" type="data_package" lang="es" /> - <if expr="is_ios"> - <!-- iOS uses es-MX for es-419 --> - <output filename="ui_strings_es-MX.pak" type="data_package" lang="es-419" /> - </if> - <if expr="not is_ios"> - <output filename="ui_strings_es-419.pak" type="data_package" lang="es-419" /> - </if> - <output filename="ui_strings_et.pak" type="data_package" lang="et" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="ui_strings_eu.pak" type="data_package" lang="eu" /> - </if> - <output filename="ui_strings_fa.pak" type="data_package" lang="fa" /> - <output filename="ui_strings_fake-bidi.pak" type="data_package" lang="fake-bidi" /> - <output filename="ui_strings_fi.pak" type="data_package" lang="fi" /> - <output filename="ui_strings_fil.pak" type="data_package" lang="fil" /> - <output filename="ui_strings_fr.pak" type="data_package" lang="fr" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="ui_strings_gl.pak" type="data_package" lang="gl" /> - </if> - <output filename="ui_strings_gu.pak" type="data_package" lang="gu" /> - <output filename="ui_strings_he.pak" type="data_package" lang="he" /> - <output filename="ui_strings_hi.pak" type="data_package" lang="hi" /> - <output filename="ui_strings_hr.pak" type="data_package" lang="hr" /> - <output filename="ui_strings_hu.pak" type="data_package" lang="hu" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="ui_strings_hy.pak" type="data_package" lang="hy" /> - <output filename="ui_strings_ia.pak" type="data_package" lang="ia" /> - </if> - <output filename="ui_strings_id.pak" type="data_package" lang="id" /> - <output filename="ui_strings_it.pak" type="data_package" lang="it" /> - <output filename="ui_strings_ja.pak" type="data_package" lang="ja" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="ui_strings_ka.pak" type="data_package" lang="ka" /> - </if> - <output filename="ui_strings_kn.pak" type="data_package" lang="kn" /> - <output filename="ui_strings_ko.pak" type="data_package" lang="ko" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="ui_strings_ku.pak" type="data_package" lang="ku" /> - <output filename="ui_strings_kw.pak" type="data_package" lang="kw" /> - </if> - <output filename="ui_strings_lt.pak" type="data_package" lang="lt" /> - <output filename="ui_strings_lv.pak" type="data_package" lang="lv" /> - <output filename="ui_strings_ml.pak" type="data_package" lang="ml" /> - <output filename="ui_strings_mr.pak" type="data_package" lang="mr" /> - <output filename="ui_strings_ms.pak" type="data_package" lang="ms" /> - <output filename="ui_strings_nl.pak" type="data_package" lang="nl" /> - <!-- The translation console uses 'no' for Norwegian Bokmål. It should - be 'nb'. --> - <output filename="ui_strings_nb.pak" type="data_package" lang="no" /> - <output filename="ui_strings_pl.pak" type="data_package" lang="pl" /> - <if expr="is_ios"> - <!-- iOS uses pt for pt-BR --> - <output filename="ui_strings_pt.pak" type="data_package" lang="pt-BR" /> - </if> - <if expr="not is_ios"> - <output filename="ui_strings_pt-BR.pak" type="data_package" lang="pt-BR" /> - </if> - <output filename="ui_strings_pt-PT.pak" type="data_package" lang="pt-PT" /> - <output filename="ui_strings_ro.pak" type="data_package" lang="ro" /> - <output filename="ui_strings_ru.pak" type="data_package" lang="ru" /> - <output filename="ui_strings_sk.pak" type="data_package" lang="sk" /> - <output filename="ui_strings_sl.pak" type="data_package" lang="sl" /> - <output filename="ui_strings_sr.pak" type="data_package" lang="sr" /> - <output filename="ui_strings_sv.pak" type="data_package" lang="sv" /> - <output filename="ui_strings_sw.pak" type="data_package" lang="sw" /> - <output filename="ui_strings_ta.pak" type="data_package" lang="ta" /> - <output filename="ui_strings_te.pak" type="data_package" lang="te" /> - <output filename="ui_strings_th.pak" type="data_package" lang="th" /> - <output filename="ui_strings_tr.pak" type="data_package" lang="tr" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <output filename="ui_strings_ug.pak" type="data_package" lang="ug" /> - </if> - <output filename="ui_strings_uk.pak" type="data_package" lang="uk" /> - <output filename="ui_strings_vi.pak" type="data_package" lang="vi" /> - <output filename="ui_strings_zh-CN.pak" type="data_package" lang="zh-CN" /> - <output filename="ui_strings_zh-TW.pak" type="data_package" lang="zh-TW" /> - </outputs> - <translations> - <file path="ui_strings_am.xtb" lang="am" /> - <file path="ui_strings_ar.xtb" lang="ar" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <file path="../../../third_party/launchpad_translations/ui_strings_ast.xtb" lang="ast" /> - </if> - <file path="ui_strings_bg.xtb" lang="bg" /> - <file path="ui_strings_bn.xtb" lang="bn" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <file path="../../../third_party/launchpad_translations/ui_strings_bs.xtb" lang="bs" /> - </if> - <file path="ui_strings_ca.xtb" lang="ca" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <file path="../../../third_party/launchpad_translations/ui_strings_ca-valencia.xtb" lang="ca@valencia" /> - </if> - <file path="ui_strings_cs.xtb" lang="cs" /> - <file path="ui_strings_da.xtb" lang="da" /> - <file path="ui_strings_de.xtb" lang="de" /> - <file path="ui_strings_el.xtb" lang="el" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <file path="../../../third_party/launchpad_translations/ui_strings_en-AU.xtb" lang="en-AU" /> - </if> - <file path="ui_strings_en-GB.xtb" lang="en-GB" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <file path="../../../third_party/launchpad_translations/ui_strings_eo.xtb" lang="eo" /> - </if> - <file path="ui_strings_es.xtb" lang="es" /> - <file path="ui_strings_es-419.xtb" lang="es-419" /> - <file path="ui_strings_et.xtb" lang="et" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <file path="../../../third_party/launchpad_translations/ui_strings_eu.xtb" lang="eu" /> - </if> - <file path="ui_strings_fa.xtb" lang="fa" /> - <file path="ui_strings_fi.xtb" lang="fi" /> - <file path="ui_strings_fil.xtb" lang="fil" /> - <file path="ui_strings_fr.xtb" lang="fr" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <file path="../../../third_party/launchpad_translations/ui_strings_gl.xtb" lang="gl" /> - </if> - <file path="ui_strings_gu.xtb" lang="gu" /> - <file path="ui_strings_hi.xtb" lang="hi" /> - <file path="ui_strings_hr.xtb" lang="hr" /> - <file path="ui_strings_hu.xtb" lang="hu" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <file path="../../../third_party/launchpad_translations/ui_strings_hy.xtb" lang="hy" /> - <file path="../../../third_party/launchpad_translations/ui_strings_ia.xtb" lang="ia" /> - </if> - <file path="ui_strings_id.xtb" lang="id" /> - <file path="ui_strings_it.xtb" lang="it" /> - <!-- The translation console uses 'iw' for Hebrew, but we use 'he'. --> - <file path="ui_strings_iw.xtb" lang="he" /> - <file path="ui_strings_ja.xtb" lang="ja" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <file path="../../../third_party/launchpad_translations/ui_strings_ka.xtb" lang="ka" /> - </if> - <file path="ui_strings_kn.xtb" lang="kn" /> - <file path="ui_strings_ko.xtb" lang="ko" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <file path="../../../third_party/launchpad_translations/ui_strings_ku.xtb" lang="ku" /> - <file path="../../../third_party/launchpad_translations/ui_strings_kw.xtb" lang="kw" /> - </if> - <file path="ui_strings_lt.xtb" lang="lt" /> - <file path="ui_strings_lv.xtb" lang="lv" /> - <file path="ui_strings_ml.xtb" lang="ml" /> - <file path="ui_strings_mr.xtb" lang="mr" /> - <file path="ui_strings_ms.xtb" lang="ms" /> - <file path="ui_strings_nl.xtb" lang="nl" /> - <file path="ui_strings_no.xtb" lang="no" /> - <file path="ui_strings_pl.xtb" lang="pl" /> - <file path="ui_strings_pt-BR.xtb" lang="pt-BR" /> - <file path="ui_strings_pt-PT.xtb" lang="pt-PT" /> - <file path="ui_strings_ro.xtb" lang="ro" /> - <file path="ui_strings_ru.xtb" lang="ru" /> - <file path="ui_strings_sk.xtb" lang="sk" /> - <file path="ui_strings_sl.xtb" lang="sl" /> - <file path="ui_strings_sr.xtb" lang="sr" /> - <file path="ui_strings_sv.xtb" lang="sv" /> - <file path="ui_strings_sw.xtb" lang="sw" /> - <file path="ui_strings_ta.xtb" lang="ta" /> - <file path="ui_strings_te.xtb" lang="te" /> - <file path="ui_strings_th.xtb" lang="th" /> - <file path="ui_strings_tr.xtb" lang="tr" /> - <if expr="pp_ifdef('use_third_party_translations')"> - <file path="../../../third_party/launchpad_translations/ui_strings_ug.xtb" lang="ug" /> - </if> - <file path="ui_strings_uk.xtb" lang="uk" /> - <file path="ui_strings_vi.xtb" lang="vi" /> - <file path="ui_strings_zh-CN.xtb" lang="zh-CN" /> - <file path="ui_strings_zh-TW.xtb" lang="zh-TW" /> - </translations> - <release seq="1" allow_pseudo="false"> - <messages fallback_to_english="true"> - - <!-- time format --> - <message name="IDS_TIME_SECS_DEFAULT" - desc="This is necessary for every language. This is the default for all the numbers NOT covered by special cases (singular, dual/two, few, many) some languages need. For CJK, Vietnamese, Turkish and Kannada, this is the only string necessary. For languages with singular-plural distinction, this is the generic plural. For Lithuanian, NUMBER_DEFAULT is 11 .. 19."> - <ph name="NUMBER_DEFAULT"><ex>37</ex>#</ph> secs - </message> - - <if expr="lang not in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message name="IDS_TIME_SEC_SINGULAR" - desc="NUMBER_ONE is one or one-like numbers : 1 (many European and most Indian languages), 1 and 0 (French, Brazilian Portuguese and Hindi), 1,21,31, .. (Russian, Ukrainian, Croatian, Serbian, Latvian, Lithuanian), or 1, 101, 201, .. (Slovenian). Do NOT translate this for CJK, Vietnamese, Turkish and Kannada"> - <ph name="NUMBER_ONE"><ex>1</ex>#</ph> sec - </message> - </if> - <if expr="lang in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message translateable="false" name="IDS_TIME_SEC_SINGULAR" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ar', 'ro', 'lv']"> - <message name="IDS_TIME_SECS_ZERO" - desc="NUMBER_ZERO is 0 (Arabic, Latvian) or 0, 2..19, 101..119, ... (Romanian). For other languages, do NOT translate."> - <ph name="NUMBER_ZERO"><ex>0</ex>#</ph> secs - </message> - </if> - <if expr="lang not in ['ar', 'ro', 'lv']"> - <message translateable="false" name="IDS_TIME_SECS_ZERO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ga', 'sl', 'ar']"> - <message name="IDS_TIME_SECS_TWO" - desc="NUMBER_TWO is two or two-like/dual numbers : 2 (Arabic and Irish) or 2, 102, 202 ... (Slovenian). For other languages, do NOT translated."> - <ph name="NUMBER_TWO"><ex>2</ex>#</ph> secs - </message> - </if> - <if expr="lang not in ['ga', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_SECS_TWO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message name="IDS_TIME_SECS_FEW" - desc="NUMBER_FEW is few or few-like numbers in Arabic, Russian, Polish, Croatian, Serbian, Ukrainian, Czech, Slovak, Slovenian, Latvian. For other languages, do NOT translate."> - <ph name="NUMBER_FEW"><ex>3</ex>#</ph> secs - </message> - </if> - <if expr="lang not in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_SECS_FEW" - desc=""> - NA - </message> - </if> - - <if expr="lang == 'ar'"> - <message name="IDS_TIME_SECS_MANY" - desc="NUMBER_MANY is 11 through 99 in Arabic. For all other languages, do NOT translate."> - <ph name="NUMBER_MANY"><ex>23</ex>#</ph> secs - </message> - </if> - <if expr="lang != 'ar'"> - <message translateable="false" name="IDS_TIME_SECS_MANY" - desc=""> - NA - </message> - </if> - - <message name="IDS_TIME_MINS_DEFAULT" - desc="This is necessary for every language. This is the default for all the numbers NOT covered by special cases (singular, dual/two, few, many) some languages need. For CJK, Vietnamese, Turkish and Kannada, this is the only string necessary. For languages with singular-plural distinction, this is the generic plural. For Lithuanian, NUMBER_DEFAULT is 11 .. 19."> - <ph name="NUMBER_DEFAULT"><ex>37</ex>#</ph> mins - </message> - - <if expr="lang not in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message name="IDS_TIME_MIN_SINGULAR" - desc="NUMBER_ONE is one or one-like numbers : 1 (many European and most Indian languages), 1 and 0 (French, Brazilian Portuguese and Hindi), 1,21,31, .. (Russian, Ukrainian, Croatian, Serbian, Latvian, Lithuanian), or 1, 101, 201, .. (Slovenian). Do NOT translate this for CJK, Vietnamese, Turkish and Kannada"> - <ph name="NUMBER_ONE"><ex>1</ex>#</ph> min - </message> - </if> - <if expr="lang in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message translateable="false" name="IDS_TIME_MIN_SINGULAR" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ar', 'ro', 'lv']"> - <message name="IDS_TIME_MINS_ZERO" - desc="NUMBER_ZERO is 0 (Arabic, Latvian) or 0, 2..19, 101..119, ... (Romanian). For other languages, do NOT translate."> - <ph name="NUMBER_ZERO"><ex>0</ex>#</ph> mins - </message> - </if> - <if expr="lang not in ['ar', 'ro', 'lv']"> - <message translateable="false" name="IDS_TIME_MINS_ZERO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ga', 'sl', 'ar']"> - <message name="IDS_TIME_MINS_TWO" - desc="NUMBER_TWO is two or two-like/dual numbers : 2 (Arabic and Irish) or 2, 102, 202 ... (Slovenian). For other languages, do NOT translated."> - <ph name="NUMBER_TWO"><ex>2</ex>#</ph> mins - </message> - </if> - <if expr="lang not in ['ga', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_MINS_TWO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message name="IDS_TIME_MINS_FEW" - desc="NUMBER_FEW is few or few-like numbers in Arabic, Russian, Polish, Croatian, Serbian, Ukrainian, Czech, Slovak, Slovenian, Latvian. For other languages, do NOT translate."> - <ph name="NUMBER_FEW"><ex>3</ex>#</ph> mins - </message> - </if> - <if expr="lang not in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_MINS_FEW" - desc=""> - NA - </message> - </if> - - <if expr="lang == 'ar'"> - <message name="IDS_TIME_MINS_MANY" - desc="NUMBER_MANY is 11 through 99 in Arabic. For all other languages, do NOT translate."> - <ph name="NUMBER_MANY"><ex>23</ex>#</ph> mins - </message> - </if> - <if expr="lang != 'ar'"> - <message translateable="false" name="IDS_TIME_MINS_MANY" - desc=""> - NA - </message> - </if> - - - <message name="IDS_TIME_HOURS_DEFAULT" - desc="This is necessary for every language. This is the default for all the numbers NOT covered by special cases (singular, dual/two, few, many) some languages need. For CJK, Vietnamese, Turkish and Kannada, this is the only string necessary. For languages with singular-plural distinction, this is the generic plural. For Lithuanian, NUMBER_DEFAULT is 11 .. 19."> - <ph name="NUMBER_DEFAULT"><ex>37</ex>#</ph> hours - </message> - - <if expr="lang not in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message name="IDS_TIME_HOUR_SINGULAR" - desc="NUMBER_ONE is one or one-like numbers : 1 (many European and most Indian languages), 1 and 0 (French, Brazilian Portuguese and Hindi), 1,21,31, .. (Russian, Ukrainian, Croatian, Serbian, Latvian, Lithuanian), or 1, 101, 201, .. (Slovenian). Do NOT translate this for CJK, Vietnamese, Turkish and Kannada"> - <ph name="NUMBER_ONE"><ex>1</ex>#</ph> hour - </message> - </if> - <if expr="lang in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message translateable="false" name="IDS_TIME_HOUR_SINGULAR" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ar', 'ro', 'lv']"> - <message name="IDS_TIME_HOURS_ZERO" - desc="NUMBER_ZERO is 0 (Arabic, Latvian) or 0, 2..19, 101..119, ... (Romanian). For other languages, do NOT translate."> - <ph name="NUMBER_ZERO"><ex>0</ex>#</ph> hours - </message> - </if> - <if expr="lang not in ['ar', 'ro', 'lv']"> - <message translateable="false" name="IDS_TIME_HOURS_ZERO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ga', 'sl', 'ar']"> - <message name="IDS_TIME_HOURS_TWO" - desc="NUMBER_TWO is two or two-like/dual numbers : 2 (Arabic and Irish) or 2, 102, 202 ... (Slovenian). For other languages, do NOT translated."> - <ph name="NUMBER_TWO"><ex>2</ex>#</ph> hours - </message> - </if> - <if expr="lang not in ['ga', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_HOURS_TWO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message name="IDS_TIME_HOURS_FEW" - desc="NUMBER_FEW is few or few-like numbers in Arabic, Russian, Polish, Croatian, Serbian, Ukrainian, Czech, Slovak, Slovenian, Latvian. For other languages, do NOT translate."> - <ph name="NUMBER_FEW"><ex>3</ex>#</ph> hours - </message> - </if> - <if expr="lang not in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_HOURS_FEW" - desc=""> - NA - </message> - </if> - - <if expr="lang == 'ar'"> - <message name="IDS_TIME_HOURS_MANY" - desc="NUMBER_MANY is 11 through 99 in Arabic. For all other languages, do NOT translate."> - <ph name="NUMBER_MANY"><ex>23</ex>#</ph> hours - </message> - </if> - <if expr="lang != 'ar'"> - <message translateable="false" name="IDS_TIME_HOURS_MANY" - desc=""> - NA - </message> - </if> - - - <message name="IDS_TIME_DAYS_DEFAULT" - desc="This is necessary for every language. This is the default for all the numbers NOT covered by special cases (singular, dual/two, few, many) some languages need. For CJK, Vietnamese, Turkish and Kannada, this is the only string necessary. For languages with singular-plural distinction, this is the generic plural. For Lithuanian, NUMBER_DEFAULT is 11 .. 19."> - <ph name="NUMBER_DEFAULT"><ex>37</ex>#</ph> days - </message> - - <if expr="lang not in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message name="IDS_TIME_DAY_SINGULAR" - desc="NUMBER_ONE is one or one-like numbers : 1 (many European and most Indian languages), 1 and 0 (French, Brazilian Portuguese and Hindi), 1,21,31, .. (Russian, Ukrainian, Croatian, Serbian, Latvian, Lithuanian), or 1, 101, 201, .. (Slovenian). Do NOT translate this for CJK, Vietnamese, Turkish and Kannada"> - <ph name="NUMBER_ONE"><ex>1</ex>#</ph> day - </message> - </if> - <if expr="lang in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message translateable="false" name="IDS_TIME_DAY_SINGULAR" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ar', 'ro', 'lv']"> - <message name="IDS_TIME_DAYS_ZERO" - desc="NUMBER_ZERO is 0 (Arabic, Latvian) or 0, 2..19, 101..119, ... (Romanian). For other languages, do NOT translate."> - <ph name="NUMBER_ZERO"><ex>0</ex>#</ph> days - </message> - </if> - <if expr="lang not in ['ar', 'ro', 'lv']"> - <message translateable="false" name="IDS_TIME_DAYS_ZERO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ga', 'sl', 'ar']"> - <message name="IDS_TIME_DAYS_TWO" - desc="NUMBER_TWO is two or two-like/dual numbers : 2 (Arabic and Irish) or 2, 102, 202 ... (Slovenian). For other languages, do NOT translated."> - <ph name="NUMBER_TWO"><ex>2</ex>#</ph> days - </message> - </if> - <if expr="lang not in ['ga', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_DAYS_TWO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message name="IDS_TIME_DAYS_FEW" - desc="NUMBER_FEW is few or few-like numbers in Arabic, Russian, Polish, Croatian, Serbian, Ukrainian, Czech, Slovak, Slovenian, Latvian. For other languages, do NOT translate."> - <ph name="NUMBER_FEW"><ex>3</ex>#</ph> days - </message> - </if> - <if expr="lang not in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_DAYS_FEW" - desc=""> - NA - </message> - </if> - - <if expr="lang == 'ar'"> - <message name="IDS_TIME_DAYS_MANY" - desc="NUMBER_MANY is 11 through 99 in Arabic. For all other languages, do NOT translate."> - <ph name="NUMBER_MANY"><ex>23</ex>#</ph> days - </message> - </if> - <if expr="lang != 'ar'"> - <message translateable="false" name="IDS_TIME_DAYS_MANY" - desc=""> - NA - </message> - </if> - - - <message name="IDS_TIME_REMAINING_SECS_DEFAULT" - desc="This is necessary for every language. This is the default for all the numbers NOT covered by special cases (singular, dual/two, few, many) some languages need. For CJK, Vietnamese, Turkish and Kannada, this is the only string necessary. For languages with singular-plural distinction, this is the generic plural. For Lithuanian, NUMBER_DEFAULT is 11 .. 19."> - <ph name="NUMBER_DEFAULT"><ex>37</ex>#</ph> secs left - </message> - - <if expr="lang not in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message name="IDS_TIME_REMAINING_SEC_SINGULAR" - desc="NUMBER_ONE is one or one-like numbers : 1 (many European and most Indian languages), 1 and 0 (French, Brazilian Portuguese and Hindi), 1,21,31, .. (Russian, Ukrainian, Croatian, Serbian, Latvian, Lithuanian), or 1, 101, 201, .. (Slovenian). Do NOT translate this for CJK, Vietnamese, Turkish and Kannada"> - <ph name="NUMBER_ONE"><ex>1</ex>#</ph> sec left - </message> - </if> - <if expr="lang in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message translateable="false" name="IDS_TIME_REMAINING_SEC_SINGULAR" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ar', 'ro', 'lv']"> - <message name="IDS_TIME_REMAINING_SECS_ZERO" - desc="NUMBER_ZERO is 0 (Arabic, Latvian) or 0, 2..19, 101..119, ... (Romanian). For other languages, do NOT translate."> - <ph name="NUMBER_ZERO"><ex>0</ex>#</ph> secs left - </message> - </if> - <if expr="lang not in ['ar', 'ro', 'lv']"> - <message translateable="false" name="IDS_TIME_REMAINING_SECS_ZERO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ga', 'sl', 'ar']"> - <message name="IDS_TIME_REMAINING_SECS_TWO" - desc="NUMBER_TWO is two or two-like/dual numbers : 2 (Arabic and Irish) or 2, 102, 202 ... (Slovenian). For other languages, do NOT translated."> - <ph name="NUMBER_TWO"><ex>2</ex>#</ph> secs left - </message> - </if> - <if expr="lang not in ['ga', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_REMAINING_SECS_TWO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message name="IDS_TIME_REMAINING_SECS_FEW" - desc="NUMBER_FEW is few or few-like numbers in Arabic, Russian, Polish, Croatian, Serbian, Ukrainian, Czech, Slovak, Slovenian, Latvian. For other languages, do NOT translate."> - <ph name="NUMBER_FEW"><ex>3</ex>#</ph> secs left - </message> - </if> - <if expr="lang not in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_REMAINING_SECS_FEW" - desc=""> - NA - </message> - </if> - - <if expr="lang == 'ar'"> - <message name="IDS_TIME_REMAINING_SECS_MANY" - desc="NUMBER_MANY is 11 through 99 in Arabic. For all other languages, do NOT translate."> - <ph name="NUMBER_MANY"><ex>23</ex>#</ph> secs left - </message> - </if> - <if expr="lang != 'ar'"> - <message translateable="false" name="IDS_TIME_REMAINING_SECS_MANY" - desc=""> - NA - </message> - </if> - - - <message name="IDS_TIME_REMAINING_MINS_DEFAULT" - desc="This is necessary for every language. This is the default for all the numbers NOT covered by special cases (singular, dual/two, few, many) some languages need. For CJK, Vietnamese, Turkish and Kannada, this is the only string necessary. For languages with singular-plural distinction, this is the generic plural. For Lithuanian, NUMBER_DEFAULT is 11 .. 19."> - <ph name="NUMBER_DEFAULT"><ex>37</ex>#</ph> mins left - </message> - - <if expr="lang not in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message name="IDS_TIME_REMAINING_MIN_SINGULAR" - desc="NUMBER_ONE is one or one-like numbers : 1 (many European and most Indian languages), 1 and 0 (French, Brazilian Portuguese and Hindi), 1,21,31, .. (Russian, Ukrainian, Croatian, Serbian, Latvian, Lithuanian), or 1, 101, 201, .. (Slovenian). Do NOT translate this for CJK, Vietnamese, Turkish and Kannada"> - <ph name="NUMBER_ONE"><ex>1</ex>#</ph> min left - </message> - </if> - <if expr="lang in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message translateable="false" name="IDS_TIME_REMAINING_MIN_SINGULAR" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ar', 'ro', 'lv']"> - <message name="IDS_TIME_REMAINING_MINS_ZERO" - desc="NUMBER_ZERO is 0 (Arabic, Latvian) or 0, 2..19, 101..119, ... (Romanian). For other languages, do NOT translate."> - <ph name="NUMBER_ZERO"><ex>0</ex>#</ph> mins left - </message> - </if> - <if expr="lang not in ['ar', 'ro', 'lv']"> - <message translateable="false" name="IDS_TIME_REMAINING_MINS_ZERO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ga', 'sl', 'ar']"> - <message name="IDS_TIME_REMAINING_MINS_TWO" - desc="NUMBER_TWO is two or two-like/dual numbers : 2 (Arabic and Irish) or 2, 102, 202 ... (Slovenian). For other languages, do NOT translated."> - <ph name="NUMBER_TWO"><ex>2</ex>#</ph> mins left - </message> - </if> - <if expr="lang not in ['ga', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_REMAINING_MINS_TWO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message name="IDS_TIME_REMAINING_MINS_FEW" - desc="NUMBER_FEW is few or few-like numbers in Arabic, Russian, Polish, Croatian, Serbian, Ukrainian, Czech, Slovak, Slovenian, Latvian. For other languages, do NOT translate."> - <ph name="NUMBER_FEW"><ex>3</ex>#</ph> mins left - </message> - </if> - <if expr="lang not in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_REMAINING_MINS_FEW" - desc=""> - NA - </message> - </if> - - <if expr="lang == 'ar'"> - <message name="IDS_TIME_REMAINING_MINS_MANY" - desc="NUMBER_MANY is 11 through 99 in Arabic. For all other languages, do NOT translate."> - <ph name="NUMBER_MANY"><ex>23</ex>#</ph> mins left - </message> - </if> - <if expr="lang != 'ar'"> - <message translateable="false" name="IDS_TIME_REMAINING_MINS_MANY" - desc=""> - NA - </message> - </if> - - <message name="IDS_TIME_REMAINING_LONG_MINS_DEFAULT" - desc="This is necessary for every language. This is the default for all the numbers NOT covered by special cases (singular, dual/two, few, many) some languages need. For CJK, Vietnamese, Turkish and Kannada, this is the only string necessary. For languages with singular-plural distinction, this is the generic plural. For Lithuanian, NUMBER_DEFAULT is 11 .. 19."> - <ph name="NUMBER_DEFAULT"><ex>37</ex>#</ph> minutes left - </message> - - <if expr="lang not in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message name="IDS_TIME_REMAINING_LONG_MIN_SINGULAR" - desc="NUMBER_ONE is one or one-like numbers : 1 (many European and most Indian languages), 1 and 0 (French, Brazilian Portuguese and Hindi), 1,21,31, .. (Russian, Ukrainian, Croatian, Serbian, Latvian, Lithuanian), or 1, 101, 201, .. (Slovenian). Do NOT translate this for CJK, Vietnamese, Turkish and Kannada"> - <ph name="NUMBER_ONE"><ex>1</ex>#</ph> minute left - </message> - </if> - <if expr="lang in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message translateable="false" name="IDS_TIME_REMAINING_LONG_MIN_SINGULAR" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ar', 'ro', 'lv']"> - <message name="IDS_TIME_REMAINING_LONG_MINS_ZERO" - desc="NUMBER_ZERO is 0 (Arabic, Latvian) or 0, 2..19, 101..119, ... (Romanian). For other languages, do NOT translate."> - <ph name="NUMBER_ZERO"><ex>0</ex>#</ph> minutes left - </message> - </if> - <if expr="lang not in ['ar', 'ro', 'lv']"> - <message translateable="false" name="IDS_TIME_REMAINING_LONG_MINS_ZERO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ga', 'sl', 'ar']"> - <message name="IDS_TIME_REMAINING_LONG_MINS_TWO" - desc="NUMBER_TWO is two or two-like/dual numbers : 2 (Arabic and Irish) or 2, 102, 202 ... (Slovenian). For other languages, do NOT translated."> - <ph name="NUMBER_TWO"><ex>2</ex>#</ph> minutes left - </message> - </if> - <if expr="lang not in ['ga', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_REMAINING_LONG_MINS_TWO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message name="IDS_TIME_REMAINING_LONG_MINS_FEW" - desc="NUMBER_FEW is few or few-like numbers in Arabic, Russian, Polish, Croatian, Serbian, Ukrainian, Czech, Slovak, Slovenian, Latvian. For other languages, do NOT translate."> - <ph name="NUMBER_FEW"><ex>3</ex>#</ph> minutes left - </message> - </if> - <if expr="lang not in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_REMAINING_LONG_MINS_FEW" - desc=""> - NA - </message> - </if> - - <if expr="lang == 'ar'"> - <message name="IDS_TIME_REMAINING_LONG_MINS_MANY" - desc="NUMBER_MANY is 11 through 99 in Arabic. For all other languages, do NOT translate."> - <ph name="NUMBER_MANY"><ex>23</ex>#</ph> minutes left - </message> - </if> - <if expr="lang != 'ar'"> - <message translateable="false" name="IDS_TIME_REMAINING_LONG_MINS_MANY" - desc=""> - NA - </message> - </if> - - <message name="IDS_TIME_REMAINING_HOURS_DEFAULT" - desc="This is necessary for every language. This is the default for all the numbers NOT covered by special cases (singular, dual/two, few, many) some languages need. For CJK, Vietnamese, Turkish and Kannada, this is the only string necessary. For languages with singular-plural distinction, this is the generic plural. For Lithuanian, NUMBER_DEFAULT is 11 .. 19."> - <ph name="NUMBER_DEFAULT"><ex>37</ex>#</ph> hours left - </message> - - <if expr="lang not in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message name="IDS_TIME_REMAINING_HOUR_SINGULAR" - desc="NUMBER_ONE is one or one-like numbers : 1 (many European and most Indian languages), 1 and 0 (French, Brazilian Portuguese and Hindi), 1,21,31, .. (Russian, Ukrainian, Croatian, Serbian, Latvian, Lithuanian), or 1, 101, 201, .. (Slovenian). Do NOT translate this for CJK, Vietnamese, Turkish and Kannada"> - <ph name="NUMBER_ONE"><ex>1</ex>#</ph> hour left - </message> - </if> - <if expr="lang in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message translateable="false" name="IDS_TIME_REMAINING_HOUR_SINGULAR" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ar', 'ro', 'lv']"> - <message name="IDS_TIME_REMAINING_HOURS_ZERO" - desc="NUMBER_ZERO is 0 (Arabic, Latvian) or 0, 2..19, 101..119, ... (Romanian). For other languages, do NOT translate."> - <ph name="NUMBER_ZERO"><ex>0</ex>#</ph> hours left - </message> - </if> - <if expr="lang not in ['ar', 'ro', 'lv']"> - <message translateable="false" name="IDS_TIME_REMAINING_HOURS_ZERO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ga', 'sl', 'ar']"> - <message name="IDS_TIME_REMAINING_HOURS_TWO" - desc="NUMBER_TWO is two or two-like/dual numbers : 2 (Arabic and Irish) or 2, 102, 202 ... (Slovenian). For other languages, do NOT translated."> - <ph name="NUMBER_TWO"><ex>2</ex>#</ph> hours left - </message> - </if> - <if expr="lang not in ['ga', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_REMAINING_HOURS_TWO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message name="IDS_TIME_REMAINING_HOURS_FEW" - desc="NUMBER_FEW is few or few-like numbers in Arabic, Russian, Polish, Croatian, Serbian, Ukrainian, Czech, Slovak, Slovenian, Latvian. For other languages, do NOT translate."> - <ph name="NUMBER_FEW"><ex>3</ex>#</ph> hours left - </message> - </if> - <if expr="lang not in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_REMAINING_HOURS_FEW" - desc=""> - NA - </message> - </if> - - <if expr="lang == 'ar'"> - <message name="IDS_TIME_REMAINING_HOURS_MANY" - desc="NUMBER_MANY is 11 through 99 in Arabic. For all other languages, do NOT translate."> - <ph name="NUMBER_MANY"><ex>23</ex>#</ph> hours left - </message> - </if> - <if expr="lang != 'ar'"> - <message translateable="false" name="IDS_TIME_REMAINING_HOURS_MANY" - desc=""> - NA - </message> - </if> - - - <message name="IDS_TIME_REMAINING_DAYS_DEFAULT" - desc="This is necessary for every language. This is the default for all the numbers NOT covered by special cases (singular, dual/two, few, many) some languages need. For CJK, Vietnamese, Turkish and Kannada, this is the only string necessary. For languages with singular-plural distinction, this is the generic plural. For Lithuanian, NUMBER_DEFAULT is 11 .. 19."> - <ph name="NUMBER_DEFAULT"><ex>37</ex>#</ph> days left - </message> - - <if expr="lang not in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message name="IDS_TIME_REMAINING_DAY_SINGULAR" - desc="NUMBER_ONE is one or one-like numbers : 1 (many European and most Indian languages), 1 and 0 (French, Brazilian Portuguese and Hindi), 1,21,31, .. (Russian, Ukrainian, Croatian, Serbian, Latvian, Lithuanian), or 1, 101, 201, .. (Slovenian). Do NOT translate this for CJK, Vietnamese, Turkish and Kannada"> - <ph name="NUMBER_ONE"><ex>1</ex>#</ph> day left - </message> - </if> - <if expr="lang in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message translateable="false" name="IDS_TIME_REMAINING_DAY_SINGULAR" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ar', 'ro', 'lv']"> - <message name="IDS_TIME_REMAINING_DAYS_ZERO" - desc="NUMBER_ZERO is 0 (Arabic, Latvian) or 0, 2..19, 101..119, ... (Romanian). For other languages, do NOT translate."> - <ph name="NUMBER_ZERO"><ex>0</ex>#</ph> days left - </message> - </if> - <if expr="lang not in ['ar', 'ro', 'lv']"> - <message translateable="false" name="IDS_TIME_REMAINING_DAYS_ZERO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ga', 'sl', 'ar']"> - <message name="IDS_TIME_REMAINING_DAYS_TWO" - desc="NUMBER_TWO is two or two-like/dual numbers : 2 (Arabic and Irish) or 2, 102, 202 ... (Slovenian). For other languages, do NOT translated."> - <ph name="NUMBER_TWO"><ex>2</ex>#</ph> days left - </message> - </if> - <if expr="lang not in ['ga', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_REMAINING_DAYS_TWO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message name="IDS_TIME_REMAINING_DAYS_FEW" - desc="NUMBER_FEW is few or few-like numbers in Arabic, Russian, Polish, Croatian, Serbian, Ukrainian, Czech, Slovak, Slovenian, Latvian. For other languages, do NOT translate."> - <ph name="NUMBER_FEW"><ex>3</ex>#</ph> days left - </message> - </if> - <if expr="lang not in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_REMAINING_DAYS_FEW" - desc=""> - NA - </message> - </if> - - <if expr="lang == 'ar'"> - <message name="IDS_TIME_REMAINING_DAYS_MANY" - desc="NUMBER_MANY is 11 through 99 in Arabic. For all other languages, do NOT translate."> - <ph name="NUMBER_MANY"><ex>23</ex>#</ph> days left - </message> - </if> - <if expr="lang != 'ar'"> - <message translateable="false" name="IDS_TIME_REMAINING_DAYS_MANY" - desc=""> - NA - </message> - </if> - - <message name="IDS_TIME_DURATION_LONG_SECS_DEFAULT" - desc="This is necessary for every language. This is the default for all the numbers NOT covered by special cases (singular, dual/two, few, many) some languages need. For CJK, Vietnamese, Turkish and Kannada, this is the only string necessary. For languages with singular-plural distinction, this is the generic plural. For Lithuanian, NUMBER_DEFAULT is 11 .. 19."> - <ph name="NUMBER_DEFAULT"><ex>37</ex>#</ph> seconds - </message> - - <if expr="lang not in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message name="IDS_TIME_DURATION_LONG_SEC_SINGULAR" - desc="NUMBER_ONE is one or one-like numbers : 1 (many European and most Indian languages), 1 and 0 (French, Brazilian Portuguese and Hindi), 1,21,31, .. (Russian, Ukrainian, Croatian, Serbian, Latvian, Lithuanian), or 1, 101, 201, .. (Slovenian). Do NOT translate this for CJK, Vietnamese, Turkish and Kannada"> - <ph name="NUMBER_ONE"><ex>1</ex>#</ph> second - </message> - </if> - <if expr="lang in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message translateable="false" name="IDS_TIME_DURATION_LONG_SEC_SINGULAR" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ar', 'ro', 'lv']"> - <message name="IDS_TIME_DURATION_LONG_SECS_ZERO" - desc="NUMBER_ZERO is 0 (Arabic, Latvian) or 0, 2..19, 101..119, ... (Romanian). For other languages, do NOT translate."> - <ph name="NUMBER_ZERO"><ex>0</ex>#</ph> seconds - </message> - </if> - <if expr="lang not in ['ar', 'ro', 'lv']"> - <message translateable="false" name="IDS_TIME_DURATION_LONG_SECS_ZERO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ga', 'sl', 'ar']"> - <message name="IDS_TIME_DURATION_LONG_SECS_TWO" - desc="NUMBER_TWO is two or two-like/dual numbers : 2 (Arabic and Irish) or 2, 102, 202 ... (Slovenian). For other languages, do NOT translated."> - <ph name="NUMBER_TWO"><ex>2</ex>#</ph> seconds - </message> - </if> - <if expr="lang not in ['ga', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_DURATION_LONG_SECS_TWO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message name="IDS_TIME_DURATION_LONG_SECS_FEW" - desc="NUMBER_FEW is few or few-like numbers in Arabic, Russian, Polish, Croatian, Serbian, Ukrainian, Czech, Slovak, Slovenian, Latvian. For other languages, do NOT translate."> - <ph name="NUMBER_FEW"><ex>3</ex>#</ph> seconds - </message> - </if> - <if expr="lang not in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_DURATION_LONG_SECS_FEW" - desc=""> - NA - </message> - </if> - - <if expr="lang == 'ar'"> - <message name="IDS_TIME_DURATION_LONG_SECS_MANY" - desc="NUMBER_MANY is 11 through 99 in Arabic. For all other languages, do NOT translate."> - <ph name="NUMBER_MANY"><ex>23</ex>#</ph> seconds - </message> - </if> - <if expr="lang != 'ar'"> - <message translateable="false" name="IDS_TIME_DURATION_LONG_SECS_MANY" - desc=""> - NA - </message> - </if> - - <message name="IDS_TIME_DURATION_LONG_MINS_DEFAULT" - desc="This is necessary for every language. This is the default for all the numbers NOT covered by special cases (singular, dual/two, few, many) some languages need. For CJK, Vietnamese, Turkish and Kannada, this is the only string necessary. For languages with singular-plural distinction, this is the generic plural. For Lithuanian, NUMBER_DEFAULT is 11 .. 19."> - <ph name="NUMBER_DEFAULT"><ex>37</ex>#</ph> minutes - </message> - - <if expr="lang not in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message name="IDS_TIME_DURATION_LONG_MIN_SINGULAR" - desc="NUMBER_ONE is one or one-like numbers : 1 (many European and most Indian languages), 1 and 0 (French, Brazilian Portuguese and Hindi), 1,21,31, .. (Russian, Ukrainian, Croatian, Serbian, Latvian, Lithuanian), or 1, 101, 201, .. (Slovenian). Do NOT translate this for CJK, Vietnamese, Turkish and Kannada"> - <ph name="NUMBER_ONE"><ex>1</ex>#</ph> minute - </message> - </if> - <if expr="lang in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message translateable="false" name="IDS_TIME_DURATION_LONG_MIN_SINGULAR" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ar', 'ro', 'lv']"> - <message name="IDS_TIME_DURATION_LONG_MINS_ZERO" - desc="NUMBER_ZERO is 0 (Arabic, Latvian) or 0, 2..19, 101..119, ... (Romanian). For other languages, do NOT translate."> - <ph name="NUMBER_ZERO"><ex>0</ex>#</ph> minutes - </message> - </if> - <if expr="lang not in ['ar', 'ro', 'lv']"> - <message translateable="false" name="IDS_TIME_DURATION_LONG_MINS_ZERO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ga', 'sl', 'ar']"> - <message name="IDS_TIME_DURATION_LONG_MINS_TWO" - desc="NUMBER_TWO is two or two-like/dual numbers : 2 (Arabic and Irish) or 2, 102, 202 ... (Slovenian). For other languages, do NOT translated."> - <ph name="NUMBER_TWO"><ex>2</ex>#</ph> minutes - </message> - </if> - <if expr="lang not in ['ga', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_DURATION_LONG_MINS_TWO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message name="IDS_TIME_DURATION_LONG_MINS_FEW" - desc="NUMBER_FEW is few or few-like numbers in Arabic, Russian, Polish, Croatian, Serbian, Ukrainian, Czech, Slovak, Slovenian, Latvian. For other languages, do NOT translate."> - <ph name="NUMBER_FEW"><ex>3</ex>#</ph> minutes - </message> - </if> - <if expr="lang not in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_DURATION_LONG_MINS_FEW" - desc=""> - NA - </message> - </if> - - <if expr="lang == 'ar'"> - <message name="IDS_TIME_DURATION_LONG_MINS_MANY" - desc="NUMBER_MANY is 11 through 99 in Arabic. For all other languages, do NOT translate."> - <ph name="NUMBER_MANY"><ex>23</ex>#</ph> minutes - </message> - </if> - <if expr="lang != 'ar'"> - <message translateable="false" name="IDS_TIME_DURATION_LONG_MINS_MANY" - desc=""> - NA - </message> - </if> - - <message name="IDS_TIME_ELAPSED_SECS_DEFAULT" - desc="This is necessary for every language. This is the default for all the numbers NOT covered by special cases (singular, dual/two, few, many) some languages need. For CJK, Vietnamese, Turkish and Kannada, this is the only string necessary. For languages with singular-plural distinction, this is the generic plural. For Lithuanian, NUMBER_DEFAULT is 11 .. 19."> - <ph name="NUMBER_DEFAULT"><ex>37</ex>#</ph> secs ago - </message> - - <if expr="lang not in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message name="IDS_TIME_ELAPSED_SEC_SINGULAR" - desc="NUMBER_ONE is one or one-like numbers : 1 (many European and most Indian languages), 1 and 0 (French, Brazilian Portuguese and Hindi), 1,21,31, .. (Russian, Ukrainian, Croatian, Serbian, Latvian, Lithuanian), or 1, 101, 201, .. (Slovenian). Do NOT translate this for CJK, Vietnamese, Turkish and Kannada"> - <ph name="NUMBER_ONE"><ex>1</ex>#</ph> sec ago - </message> - </if> - <if expr="lang in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message translateable="false" name="IDS_TIME_ELAPSED_SEC_SINGULAR" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ar', 'ro', 'lv']"> - <message name="IDS_TIME_ELAPSED_SECS_ZERO" - desc="NUMBER_ZERO is 0 (Arabic, Latvian) or 0, 2..19, 101..119, ... (Romanian). For other languages, do NOT translate."> - <ph name="NUMBER_ZERO"><ex>0</ex>#</ph> secs ago - </message> - </if> - <if expr="lang not in ['ar', 'ro', 'lv']"> - <message translateable="false" name="IDS_TIME_ELAPSED_SECS_ZERO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ga', 'sl', 'ar']"> - <message name="IDS_TIME_ELAPSED_SECS_TWO" - desc="NUMBER_TWO is two or two-like/dual numbers : 2 (Arabic and Irish) or 2, 102, 202 ... (Slovenian). For other languages, do NOT translated."> - <ph name="NUMBER_TWO"><ex>2</ex>#</ph> secs ago - </message> - </if> - <if expr="lang not in ['ga', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_ELAPSED_SECS_TWO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message name="IDS_TIME_ELAPSED_SECS_FEW" - desc="NUMBER_FEW is few or few-like numbers in Arabic, Russian, Polish, Croatian, Serbian, Ukrainian, Czech, Slovak, Slovenian, Latvian. For other languages, do NOT translate."> - <ph name="NUMBER_FEW"><ex>3</ex>#</ph> secs ago - </message> - </if> - <if expr="lang not in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_ELAPSED_SECS_FEW" - desc=""> - NA - </message> - </if> - - <if expr="lang == 'ar'"> - <message name="IDS_TIME_ELAPSED_SECS_MANY" - desc="NUMBER_MANY is 11 through 99 in Arabic. For all other languages, do NOT translate."> - <ph name="NUMBER_MANY"><ex>23</ex>#</ph> secs ago - </message> - </if> - <if expr="lang != 'ar'"> - <message translateable="false" name="IDS_TIME_ELAPSED_SECS_MANY" - desc=""> - NA - </message> - </if> - - - <message name="IDS_TIME_ELAPSED_MINS_DEFAULT" - desc="This is necessary for every language. This is the default for all the numbers NOT covered by special cases (singular, dual/two, few, many) some languages need. For CJK, Vietnamese, Turkish and Kannada, this is the only string necessary. For languages with singular-plural distinction, this is the generic plural. For Lithuanian, NUMBER_DEFAULT is 11 .. 19."> - <ph name="NUMBER_DEFAULT"><ex>37</ex>#</ph> mins ago - </message> - - <if expr="lang not in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message name="IDS_TIME_ELAPSED_MIN_SINGULAR" - desc="NUMBER_ONE is one or one-like numbers : 1 (many European and most Indian languages), 1 and 0 (French, Brazilian Portuguese and Hindi), 1,21,31, .. (Russian, Ukrainian, Croatian, Serbian, Latvian, Lithuanian), or 1, 101, 201, .. (Slovenian). Do NOT translate this for CJK, Vietnamese, Turkish and Kannada"> - <ph name="NUMBER_ONE"><ex>1</ex>#</ph> min ago - </message> - </if> - <if expr="lang in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message translateable="false" name="IDS_TIME_ELAPSED_MIN_SINGULAR" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ar', 'ro', 'lv']"> - <message name="IDS_TIME_ELAPSED_MINS_ZERO" - desc="NUMBER_ZERO is 0 (Arabic, Latvian) or 0, 2..19, 101..119, ... (Romanian). For other languages, do NOT translate."> - <ph name="NUMBER_ZERO"><ex>0</ex>#</ph> mins ago - </message> - </if> - <if expr="lang not in ['ar', 'ro', 'lv']"> - <message translateable="false" name="IDS_TIME_ELAPSED_MINS_ZERO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ga', 'sl', 'ar']"> - <message name="IDS_TIME_ELAPSED_MINS_TWO" - desc="NUMBER_TWO is two or two-like/dual numbers : 2 (Arabic and Irish) or 2, 102, 202 ... (Slovenian). For other languages, do NOT translated."> - <ph name="NUMBER_TWO"><ex>2</ex>#</ph> mins ago - </message> - </if> - <if expr="lang not in ['ga', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_ELAPSED_MINS_TWO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message name="IDS_TIME_ELAPSED_MINS_FEW" - desc="NUMBER_FEW is few or few-like numbers in Arabic, Russian, Polish, Croatian, Serbian, Ukrainian, Czech, Slovak, Slovenian, Latvian. For other languages, do NOT translate."> - <ph name="NUMBER_FEW"><ex>3</ex>#</ph> mins ago - </message> - </if> - <if expr="lang not in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_ELAPSED_MINS_FEW" - desc=""> - NA - </message> - </if> - - <if expr="lang == 'ar'"> - <message name="IDS_TIME_ELAPSED_MINS_MANY" - desc="NUMBER_MANY is 11 through 99 in Arabic. For all other languages, do NOT translate."> - <ph name="NUMBER_MANY"><ex>23</ex>#</ph> mins ago - </message> - </if> - <if expr="lang != 'ar'"> - <message translateable="false" name="IDS_TIME_ELAPSED_MINS_MANY" - desc=""> - NA - </message> - </if> - - - <message name="IDS_TIME_ELAPSED_HOURS_DEFAULT" - desc="This is necessary for every language. This is the default for all the numbers NOT covered by special cases (singular, dual/two, few, many) some languages need. For CJK, Vietnamese, Turkish and Kannada, this is the only string necessary. For languages with singular-plural distinction, this is the generic plural. For Lithuanian, NUMBER_DEFAULT is 11 .. 19."> - <ph name="NUMBER_DEFAULT"><ex>37</ex>#</ph> hours ago - </message> - - <if expr="lang not in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message name="IDS_TIME_ELAPSED_HOUR_SINGULAR" - desc="NUMBER_ONE is one or one-like numbers : 1 (many European and most Indian languages), 1 and 0 (French, Brazilian Portuguese and Hindi), 1,21,31, .. (Russian, Ukrainian, Croatian, Serbian, Latvian, Lithuanian), or 1, 101, 201, .. (Slovenian). Do NOT translate this for CJK, Vietnamese, Turkish and Kannada"> - <ph name="NUMBER_ONE"><ex>1</ex>#</ph> hour ago - </message> - </if> - <if expr="lang in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message translateable="false" name="IDS_TIME_ELAPSED_HOUR_SINGULAR" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ar', 'ro', 'lv']"> - <message name="IDS_TIME_ELAPSED_HOURS_ZERO" - desc="NUMBER_ZERO is 0 (Arabic, Latvian) or 0, 2..19, 101..119, ... (Romanian). For other languages, do NOT translate."> - <ph name="NUMBER_ZERO"><ex>0</ex>#</ph> hours ago - </message> - </if> - <if expr="lang not in ['ar', 'ro', 'lv']"> - <message translateable="false" name="IDS_TIME_ELAPSED_HOURS_ZERO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ga', 'sl', 'ar']"> - <message name="IDS_TIME_ELAPSED_HOURS_TWO" - desc="NUMBER_TWO is two or two-like/dual numbers : 2 (Arabic and Irish) or 2, 102, 202 ... (Slovenian). For other languages, do NOT translated."> - <ph name="NUMBER_TWO"><ex>2</ex>#</ph> hours ago - </message> - </if> - <if expr="lang not in ['ga', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_ELAPSED_HOURS_TWO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message name="IDS_TIME_ELAPSED_HOURS_FEW" - desc="NUMBER_FEW is few or few-like numbers in Arabic, Russian, Polish, Croatian, Serbian, Ukrainian, Czech, Slovak, Slovenian, Latvian. For other languages, do NOT translate."> - <ph name="NUMBER_FEW"><ex>3</ex>#</ph> hours ago - </message> - </if> - <if expr="lang not in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_ELAPSED_HOURS_FEW" - desc=""> - NA - </message> - </if> - - <if expr="lang == 'ar'"> - <message name="IDS_TIME_ELAPSED_HOURS_MANY" - desc="NUMBER_MANY is 11 through 99 in Arabic. For all other languages, do NOT translate."> - <ph name="NUMBER_MANY"><ex>23</ex>#</ph> hours ago - </message> - </if> - <if expr="lang != 'ar'"> - <message translateable="false" name="IDS_TIME_ELAPSED_HOURS_MANY" - desc=""> - NA - </message> - </if> - - - <message name="IDS_TIME_ELAPSED_DAYS_DEFAULT" - desc="This is necessary for every language. This is the default for all the numbers NOT covered by special cases (singular, dual/two, few, many) some languages need. For CJK, Vietnamese, Turkish and Kannada, this is the only string necessary. For languages with singular-plural distinction, this is the generic plural. For Lithuanian, NUMBER_DEFAULT is 11 .. 19."> - <ph name="NUMBER_DEFAULT"><ex>37</ex>#</ph> days ago - </message> - - <if expr="lang not in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message name="IDS_TIME_ELAPSED_DAY_SINGULAR" - desc="NUMBER_ONE is one or one-like numbers : 1 (many European and most Indian languages), 1 and 0 (French, Brazilian Portuguese and Hindi), 1,21,31, .. (Russian, Ukrainian, Croatian, Serbian, Latvian, Lithuanian), or 1, 101, 201, .. (Slovenian). Do NOT translate this for CJK, Vietnamese, Turkish and Kannada"> - <ph name="NUMBER_ONE"><ex>1</ex>#</ph> day ago - </message> - </if> - <if expr="lang in ['zh-CN', 'zh-TW', 'ko', 'ja', 'vi', 'tr', 'kn']"> - <message translateable="false" name="IDS_TIME_ELAPSED_DAY_SINGULAR" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ar', 'ro', 'lv']"> - <message name="IDS_TIME_ELAPSED_DAYS_ZERO" - desc="NUMBER_ZERO is 0 (Arabic, Latvian) or 0, 2..19, 101..119, ... (Romanian). For other languages, do NOT translate."> - <ph name="NUMBER_ZERO"><ex>0</ex>#</ph> days ago - </message> - </if> - <if expr="lang not in ['ar', 'ro', 'lv']"> - <message translateable="false" name="IDS_TIME_ELAPSED_DAYS_ZERO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ga', 'sl', 'ar']"> - <message name="IDS_TIME_ELAPSED_DAYS_TWO" - desc="NUMBER_TWO is two or two-like/dual numbers : 2 (Arabic and Irish) or 2, 102, 202 ... (Slovenian). For other languages, do NOT translated."> - <ph name="NUMBER_TWO"><ex>2</ex>#</ph> days ago - </message> - </if> - <if expr="lang not in ['ga', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_ELAPSED_DAYS_TWO" - desc=""> - NA - </message> - </if> - - <if expr="lang in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message name="IDS_TIME_ELAPSED_DAYS_FEW" - desc="NUMBER_FEW is few or few-like numbers in Arabic, Russian, Polish, Croatian, Serbian, Ukrainian, Czech, Slovak, Slovenian, Latvian. For other languages, do NOT translate."> - <ph name="NUMBER_FEW"><ex>3</ex>#</ph> days ago - </message> - </if> - <if expr="lang not in ['ru', 'lt', 'hr', 'uk', 'cs', 'sk', 'pl', 'sl', 'ar']"> - <message translateable="false" name="IDS_TIME_ELAPSED_DAYS_FEW" - desc=""> - NA - </message> - </if> - - <if expr="lang == 'ar'"> - <message name="IDS_TIME_ELAPSED_DAYS_MANY" - desc="NUMBER_MANY is 11 through 99 in Arabic. For all other languages, do NOT translate."> - <ph name="NUMBER_MANY"><ex>23</ex>#</ph> days ago - </message> - </if> - <if expr="lang != 'ar'"> - <message translateable="false" name="IDS_TIME_ELAPSED_DAYS_MANY" - desc=""> - NA - </message> - </if> - - <message name="IDS_PAST_TIME_TODAY" desc="Relative day today"> - Today - </message> - <message name="IDS_PAST_TIME_YESTERDAY" desc="Relative day yesterday"> - Yesterday - </message> - - <!-- Menus --> - <message name="IDS_APP_MENU_EMPTY_SUBMENU" desc="Used when a submenu has no entries"> - (empty) - </message> - - <!-- General application strings --> - <message name="IDS_APP_UNTITLED_SHORTCUT_FILE_NAME" desc="The name of the Internet Shortcut file created for URLs dragged that have no title"> - Untitled Webpage - </message> - <message name="IDS_APP_SAVEAS_ALL_FILES" desc="Save As dialog box default text"> - All Files - </message> - <message name="IDS_APP_SAVEAS_EXTENSION_FORMAT" desc="Save As dialog box extension format text"> - <ph name="SAVEAS_EXTENSION_TYPE">$1<ex>EXE</ex></ph> File (.<ph name="SAVEAS_EXTENSION_NAME">$2<ex>exe</ex></ph>) - </message> - <message name="IDS_SELECT_UPLOAD_FOLDER_DIALOG_TITLE" desc="The default title for the Select Upload Folder dialog."> - Select Folder to Upload - </message> - - <if expr="is_macosx"> - <message name="IDS_SELECT_FOLDER_BUTTON_TITLE" desc="The name of the Select button in the folder selection dialog."> - Select - </message> - <message name="IDS_SELECT_UPLOAD_FOLDER_BUTTON_TITLE" desc="The name of the Select button in the folder selection dialog for uploading."> - Upload - </message> - </if> - - <!-- File chooser dialog default titles (only used on Linux) --> - <message name="IDS_SELECT_FOLDER_DIALOG_TITLE" desc="The default title for the Select Folder file chooser dialog."> - Select Folder - </message> - <message name="IDS_SAVE_AS_DIALOG_TITLE" desc="The default title for the Save As file chooser dialog."> - Save File - </message> - <message name="IDS_OPEN_FILE_DIALOG_TITLE" desc="The default title for the Open File file chooser dialog (single file)."> - Open File - </message> - <message name="IDS_OPEN_FILES_DIALOG_TITLE" desc="The default title for the Open File file chooser dialog (multiple files)."> - Open Files - </message> - <message name="IDS_SAVEAS_ALL_FILES" desc="Save As dialog box default text"> - All Files - </message> - <message name="IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON" desc="Button label text for Upload Folder dialog"> - Upload - </message> - - <!--Accessible name/action strings--> - <message name="IDS_APP_ACCACTION_PRESS" desc="The accessible default action for a button."> - Press - </message> - <message name="IDS_APP_ACCNAME_CLOSE" desc="The accessible name for the Close button."> - Close - </message> - <message name="IDS_APP_ACCNAME_MINIMIZE" desc="The accessible name for the Minimize button."> - Minimize - </message> - <message name="IDS_APP_ACCNAME_MAXIMIZE" desc="The accessible name for the Maximize button."> - Maximize - </message> - <message name="IDS_APP_ACCNAME_RESTORE" desc="The accessible name for the Restore button."> - Restore - </message> - - <!-- Scroll Bar Context Menu Labels --> - <message name="IDS_APP_SCROLLBAR_CXMENU_SCROLLHERE" desc="The label for the 'Scroll Here' item"> - Scroll to Here - </message> - <message name="IDS_APP_SCROLLBAR_CXMENU_SCROLLLEFTEDGE" desc="The label for the 'Left Edge' item"> - Left Edge - </message> - <message name="IDS_APP_SCROLLBAR_CXMENU_SCROLLRIGHTEDGE" desc="The label for the 'Right Edge' item"> - Right Edge - </message> - <message name="IDS_APP_SCROLLBAR_CXMENU_SCROLLHOME" desc="The label for the 'Top' item"> - Top - </message> - <message name="IDS_APP_SCROLLBAR_CXMENU_SCROLLEND" desc="The label for the 'Bottom' item"> - Bottom - </message> - <message name="IDS_APP_SCROLLBAR_CXMENU_SCROLLPAGEUP" desc="The label for the 'Page Up' item"> - Page Up - </message> - <message name="IDS_APP_SCROLLBAR_CXMENU_SCROLLPAGEDOWN" desc="The label for the 'Page Down' item"> - Page Down - </message> - <message name="IDS_APP_SCROLLBAR_CXMENU_SCROLLLEFT" desc="The label for the 'Scroll Left' item"> - Scroll Left - </message> - <message name="IDS_APP_SCROLLBAR_CXMENU_SCROLLRIGHT" desc="The label for the 'Scroll Left' item"> - Scroll Right - </message> - <message name="IDS_APP_SCROLLBAR_CXMENU_SCROLLUP" desc="The label for the 'Scroll Up' item"> - Scroll Up - </message> - <message name="IDS_APP_SCROLLBAR_CXMENU_SCROLLDOWN" desc="The label for the 'Scroll Down' item"> - Scroll Down - </message> - - <!-- Edit field context menu item labels. --> - <message name="IDS_APP_UNDO" desc="The text label of the Undo menu item"> - &Undo - </message> - <message name="IDS_APP_CUT" desc="The text label of the Cut menu item"> - Cu&t - </message> - <message name="IDS_APP_COPY" desc="The text label of the Copy menu item"> - &Copy - </message> - <message name="IDS_APP_PASTE" desc="The text label of the Paste menu item"> - &Paste - </message> - <message name="IDS_APP_DELETE" desc="The text label of the Delete menu item"> - &Delete - </message> - <message name="IDS_APP_SELECT_ALL" desc="The text label of the Select All menu item"> - Select &all - </message> - - <!-- Generic terms --> - <message name="IDS_APP_OK" desc="Used for Ok on buttons"> - OK - </message> - <message name="IDS_APP_CANCEL" desc="Used for Cancel on buttons"> - Cancel - </message> - <message name="IDS_APP_CLOSE" desc="A generic term for Close on buttons and menus."> - Close - </message> - - <!-- Key names --> - <message name="IDS_APP_ESC_KEY" desc="Escape key"> - Esc - </message> - <message name="IDS_APP_TAB_KEY" desc="Tab key"> - Tab - </message> - <message name="IDS_APP_INSERT_KEY" desc="Insert key"> - Ins - </message> - <message name="IDS_APP_HOME_KEY" desc="Home key"> - Home - </message> - <message name="IDS_APP_DELETE_KEY" desc="Delete key"> - Del - </message> - <message name="IDS_APP_END_KEY" desc="End key"> - End - </message> - <message name="IDS_APP_PAGEUP_KEY" desc="Page up key"> - PgUp - </message> - <message name="IDS_APP_PAGEDOWN_KEY" desc="Page down key"> - PgDwn - </message> - <message name="IDS_APP_LEFT_ARROW_KEY" desc="Left arrow key"> - Left Arrow - </message> - <message name="IDS_APP_RIGHT_ARROW_KEY" desc="Right arrow key"> - Right Arrow - </message> - <message name="IDS_APP_UP_ARROW_KEY" desc="Up arrow key"> - Up Arrow - </message> - <message name="IDS_APP_DOWN_ARROW_KEY" desc="Down arrow key"> - Down Arrow - </message> - <message name="IDS_APP_ENTER_KEY" desc="Enter key"> - Enter - </message> - <message name="IDS_APP_F1_KEY" desc="F1 key"> - F1 - </message> - <message name="IDS_APP_F11_KEY" desc="F11 key"> - F11 - </message> - <message name="IDS_APP_BACKSPACE_KEY" desc="Backspace key"> - Backspace - </message> - <message name="IDS_APP_COMMA_KEY" desc="Comma key"> - Comma - </message> - <message name="IDS_APP_PERIOD_KEY" desc="Period key"> - Period - </message> - <message name="IDS_APP_MEDIA_NEXT_TRACK_KEY" desc="Media next track key"> - Media Next Track - </message> - <message name="IDS_APP_MEDIA_PLAY_PAUSE_KEY" desc="Media play pause key"> - Media Play/Pause - </message> - <message name="IDS_APP_MEDIA_PREV_TRACK_KEY" desc="Media previous track key"> - Media Previous Track - </message> - <message name="IDS_APP_MEDIA_STOP_KEY" desc="Media stop key"> - Media Stop - </message> - - <!-- Shortcut Modifiers --> - <message name="IDS_APP_CONTROL_MODIFIER" desc="Control key shortcut modifier"> - Ctrl+<ph name="KEY_COMBO_NAME">$1<ex>C</ex></ph> - </message> - <message name="IDS_APP_ALT_MODIFIER" desc="Alt key shortcut modifier"> - Alt+<ph name="KEY_COMBO_NAME">$1<ex>C</ex></ph> - </message> - <message name="IDS_APP_SHIFT_MODIFIER" desc="Shift key shortcut modifier"> - Shift+<ph name="KEY_COMBO_NAME">$1<ex>C</ex></ph> - </message> - <message name="IDS_APP_COMMAND_MODIFIER" desc="Command key shortcut modifier"> - Command+<ph name="KEY_COMBO_NAME">$1<ex>C</ex></ph> - </message> - - <!-- Byte size units --> - <message name="IDS_APP_BYTES" desc="Units tag indicating a quantity of bytes"> - <ph name="QUANTITY">$1<ex>42</ex></ph> B - </message> - <message name="IDS_APP_KIBIBYTES" desc="Units tag indicating a quantity of kilobytes"> - <ph name="QUANTITY">$1<ex>42.0</ex></ph> KB - </message> - <message name="IDS_APP_MEBIBYTES" desc="Units tag indicating a quantity of megabytes"> - <ph name="QUANTITY">$1<ex>42.0</ex></ph> MB - </message> - <message name="IDS_APP_GIBIBYTES" desc="Units tag indicating a quantity of gigabytes"> - <ph name="QUANTITY">$1<ex>42.0</ex></ph> GB - </message> - <message name="IDS_APP_TEBIBYTES" desc="Units tag indicating a quantity of terabytes"> - <ph name="QUANTITY">$1<ex>42.0</ex></ph> TB - </message> - <message name="IDS_APP_PEBIBYTES" desc="Units tag indicating a quantity of petabytes"> - <ph name="QUANTITY">$1<ex>42.0</ex></ph> PB - </message> - <message name="IDS_APP_BYTES_PER_SECOND" desc="Units tag indicating a speed of bytes/second"> - <ph name="QUANTITY">$1<ex>42</ex></ph> B/s - </message> - <message name="IDS_APP_KIBIBYTES_PER_SECOND" desc="Units tag indicating a speed of kilobytes/second"> - <ph name="QUANTITY">$1<ex>42.0</ex></ph> KB/s - </message> - <message name="IDS_APP_MEBIBYTES_PER_SECOND" desc="Units tag indicating a speed of megabytes/second"> - <ph name="QUANTITY">$1<ex>42.0</ex></ph> MB/s - </message> - <message name="IDS_APP_GIBIBYTES_PER_SECOND" desc="Units tag indicating a speed of gigabytes/second"> - <ph name="QUANTITY">$1<ex>42.0</ex></ph> GB/s - </message> - <message name="IDS_APP_TEBIBYTES_PER_SECOND" desc="Units tag indicating a speed of terabytes/second"> - <ph name="QUANTITY">$1<ex>42.0</ex></ph> TB/s - </message> - <message name="IDS_APP_PEBIBYTES_PER_SECOND" desc="Units tag indicating a speed of petabytes/second"> - <ph name="QUANTITY">$1<ex>42.0</ex></ph> PB/s - </message> - - <!-- Message center --> - <message name="IDS_MESSAGE_CENTER_ACCESSIBLE_NAME" desc="The accessible name for the Notification Center window."> - Notification Center - </message> - <message name="IDS_MESSAGE_CENTER_NOTIFIER_DISABLE" desc="The menu entry for disabling a notifier from a notification."> - Disable notifications from <ph name="notifier_name">$1<ex>Notification Galore!</ex></ph> - </message> - <message name="IDS_MESSAGE_CENTER_FOOTER_TITLE" desc="The label in the footer of the message center"> - Notifications - </message> - <message name="IDS_MESSAGE_CENTER_SETTINGS_BUTTON_LABEL" desc="The button label for visiting the appropriate settings page in the footer of the message center."> - Settings - </message> - <message name="IDS_MESSAGE_CENTER_SETTINGS_GO_BACK_BUTTON_TOOLTIP" desc="The tooltip on back button that returns from settings to the notification list."> - Go back to notifications - </message> - <message name="IDS_MESSAGE_CENTER_SETTINGS_DIALOG_DESCRIPTION" desc="The label to describe the settings dialog."> - Allow notifications from the following: - </message> - <message name="IDS_MESSAGE_CENTER_SETTINGS_DESCRIPTION_MULTIUSER" desc="The label to describe the settings dialog if there is more than one user."> - Allow notifications from the following for each user: - </message> - <message name="IDS_MESSAGE_CENTER_SETTINGS" desc="The menu entry or button for visiting the appropriate settings page."> - Settings... - </message> - <message name="IDS_MESSAGE_CENTER_CLEAR_ALL" desc="The button for clearing all notifications."> - Clear All - </message> - <if expr="not pp_ifdef('use_titlecase')"> - <message name="IDS_MESSAGE_CENTER_QUIET_MODE_BUTTON_TOOLTIP" desc="The tooltip text for the do not disturb button."> - Do not disturb - </message> - </if> - <if expr="pp_ifdef('use_titlecase')"> - <message name="IDS_MESSAGE_CENTER_QUIET_MODE_BUTTON_TOOLTIP" desc="In Title Case: The tooltip text for the do not disturb button."> - Do Not Disturb - </message> - </if> - <message name="IDS_MESSAGE_CENTER_NO_MESSAGES" desc="The message displayed in the message center when there are no notifications."> - Nothing to see here, move along. - </message> - <message name="IDS_MESSAGE_CENTER_QUIET_MODE" desc="The button label for do not disturb mode."> - Do not disturb - </message> - <message name="IDS_MESSAGE_CENTER_QUIET_MODE_1HOUR" desc="The button label to enter do not disturb mode in one hour."> - Do not disturb for one hour - </message> - <message name="IDS_MESSAGE_CENTER_QUIET_MODE_1DAY" desc="The button label to enter do not disturb mode in one day."> - Do not disturb for one day - </message> - <message name="IDS_MESSAGE_CENTER_CLOSE_NOTIFICATION_BUTTON_ACCESSIBLE_NAME" desc="The spoken feedback text for the close button in a notification. Usually 'button' is suffixed to this text automatically."> - Notification close - </message> - <message name="IDS_MESSAGE_CENTER_EXPAND_NOTIFICATION_BUTTON_ACCESSIBLE_NAME" desc="The spoken feedback text for the expand button in a notification. Usually 'button' is suffixed to this text automatically."> - Notification expand - </message> - <message name="IDS_MESSAGE_CENTER_NOTIFIER_SCREENSHOT_NAME" desc="The name of screenshot notifier that is a system componet"> - Screenshot - </message> - <message name="IDS_MESSAGE_CENTER_NOTIFICATION_BUTTON_COPY_SCREENSHOT_TO_CLIPBOARD" desc="The button label for the screenshot notification which copies the screenshot image to clipboard on click."> - Copy to clipboard - </message> - <message name="IDS_MESSAGE_CENTER_MORE_FROM" desc="Indicates how many more notifications came from the given source."> - <ph name="number_of_notifications">$1<ex>20</ex></ph> more from <ph name="source_of_notifications">$2<ex>GMail</ex></ph> - </message> - - <!-- App list --> - <message name="IDS_APP_LIST_HELP" desc="The menu entry to show the app list help UI."> - Help - </message> - <message name="IDS_APP_LIST_OPEN_SETTINGS" desc="The menu entry to show the settings UI."> - Settings - </message> - <message name="IDS_APP_LIST_OPEN_FEEDBACK" desc="The menu entry to show the feedback UI."> - Send feedback - </message> - <message name="IDS_APP_LIST_FOLDER_NAME_PLACEHOLDER" desc="The placeholder text for app list folder name."> - Unnamed Folder - </message> - <message name="IDS_APP_LIST_SPEECH_HINT_TEXT" desc="The text label in the speech recognition UI to ask the user to speak the search query"> - Speak now - </message> - </messages> - </release> -</grit> diff --git a/chromium/ui/base/strings/ui_strings.gyp b/chromium/ui/base/strings/ui_strings.gyp deleted file mode 100644 index f8750c209fc..00000000000 --- a/chromium/ui/base/strings/ui_strings.gyp +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 2013 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'chromium_code': 1, - 'grit_base_out_dir': '<(SHARED_INTERMEDIATE_DIR)/ui', - }, - 'targets': [ - { - 'target_name': 'ui_strings', - 'type': 'none', - 'actions': [ - { - 'action_name': 'ui_strings', - 'variables': { - 'grit_grd_file': 'ui_strings.grd', - 'grit_out_dir': '<(grit_base_out_dir)/ui_strings', - }, - 'includes': [ '../../../build/grit_action.gypi' ], - }, - { - 'action_name': 'app_locale_settings', - 'variables': { - 'grit_grd_file': 'app_locale_settings.grd', - 'grit_out_dir': '<(grit_base_out_dir)/app_locale_settings', - }, - 'includes': [ '../../../build/grit_action.gypi' ], - }, - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '<(grit_base_out_dir)/app_locale_settings', - '<(grit_base_out_dir)/ui_strings', - ], - }, - }, - ], - 'conditions': [ - ['os_posix == 1 and OS != "mac"', { - 'targets': [{ - 'target_name': 'ui_unittest_strings', - 'type': 'none', - 'dependencies': [ - 'ui_strings', - ], - 'variables': { - 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py', - 'conditions': [ - ['OS == "ios"', { - 'pak_output': '<(PRODUCT_DIR)/ui_unittests_strings/en.lproj/locale.pak', - }, { - 'pak_output': '<(PRODUCT_DIR)/ui_unittests_strings/en-US.pak', - }], - ], - }, - 'actions': [ - { - 'action_name': 'repack_ui_unittest_strings', - 'variables': { - 'pak_inputs': [ - '<(grit_base_out_dir)/ui_strings/ui_strings_en-US.pak', - '<(grit_base_out_dir)/app_locale_settings/app_locale_settings_en-US.pak', - ], - }, - 'inputs': [ - '<(repack_path)', - '<@(pak_inputs)', - ], - 'outputs': [ - '<(pak_output)', - ], - 'action': ['python', '<(repack_path)', '<@(_outputs)', - '<@(pak_inputs)'], - }, - ], - 'copies': [ - { - 'destination': '<(PRODUCT_DIR)/ui_unittests_strings', - 'files': [ - '<(grit_base_out_dir)/ui_resources/ui_resources_100_percent.pak', - ], - }, - ], - }], - }], - ], -} diff --git a/chromium/ui/base/strings/ui_strings_am.xtb b/chromium/ui/base/strings/ui_strings_am.xtb deleted file mode 100644 index d7ae9c214fc..00000000000 --- a/chromium/ui/base/strings/ui_strings_am.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="am"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">ጨርስ</translation> -<translation id="5341849548509163798">ከ<ph name="NUMBER_MANY"/> ሰዓቶች በፊት</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> ሴኮንድ ይቀራል</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> ሴኮንድ ይቀራል</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> ደቂቃ ይቀራል</translation> -<translation id="1801827354178857021">ነቁጥ</translation> -<translation id="1190609913194133056">የማሳወቂያ ማዕከል</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> ደቂቃዎች ቀርተዋል</translation> -<translation id="5613020302032141669">ግራ ቀስት</translation> -<translation id="4971687151119236543">የሚዲያ ቀዳሚ ትራክ</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> ፋይል(.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918">ከ<ph name="NUMBER_ZERO"/> ደቂቃ በፊት</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> ሴኮንድ</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> ሰዓቶች ይቀራሉ</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> ተጨማሪ ከ<ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">ሰርዝ</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> ባ</translation> -<translation id="3660179305079774227">የላይ ቀስት</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> ሜባ/ሰ</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> ሰዓት</translation> -<translation id="3990502903496589789">የቀኝ ጠርዝ</translation> -<translation id="9038489124413477075">ያልተሰየመ አቃፊ</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> ደቂቃ</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> ቀናት ይቀራሉ</translation> -<translation id="932327136139879170">መነሻ</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> ደቂቃ ይቀራል</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> ቀናት ይቀራሉ</translation> -<translation id="6390842777729054533">ከ<ph name="NUMBER_ZERO"/> ሴኮንድ በፊት</translation> -<translation id="3909791450649380159">&ቁረጥ</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> ደቂቃዎች ቀርተዋል</translation> -<translation id="688711909580084195">ርዕስ-አልባ ድረ-ገጽ</translation> -<translation id="3353284378027041011">ከ<ph name="NUMBER_FEW"/> ቀናት በፊት</translation> -<translation id="5076340679995252485">&ለጥፍ</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> ቴባ</translation> -<translation id="364720409959344976">የሚሰቀል ዓቃፊ ይምረጡ</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016">ከ<ph name="NUMBER_TWO"/> ደቂቃ በፊት</translation> -<translation id="3234408098842461169">ዝቅዝቅ ቀስት</translation> -<translation id="3087734570205094154">ግርጌ</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> ደቂቃ ይቀራል</translation> -<translation id="1860796786778352021">ማሳወቂያ ዝጋ</translation> -<translation id="6364916375976753737">ወደ ግራ ሸብልል</translation> -<translation id="2629089419211541119">ከ<ph name="NUMBER_ONE"/> ሰዓት በፊት</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> ደቂቃዎች</translation> -<translation id="6982279413068714821">ከ<ph name="NUMBER_DEFAULT"/> ደቂቃ በፊት</translation> -<translation id="6945221475159498467">ይምረጡ</translation> -<translation id="6620110761915583480">ፋይል አስቀምጥ</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> ሰከንዶች</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> ሰዓት</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> ደቂቃ ቀርቷል</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> ደቂቃ</translation> -<translation id="8210608804940886430">ወደታች አንቀሳቅስ</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> ቀናት</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> ሰዓቶች ይቀራሉ</translation> -<translation id="5329858601952122676">&ሠርዝ</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> ሴኮንድ</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> ኪባ</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> ደቂቃዎች</translation> -<translation id="7275974018215686543">ከ<ph name="NUMBER_MANY"/> ሴኮንድ በፊት</translation> -<translation id="7781829728241885113">ትናንት</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> ደቂቃዎች</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> ደቂቃ ይቀራል</translation> -<translation id="6659594942844771486">ትር</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> ሜባ</translation> -<translation id="4988273303304146523">ከ<ph name="NUMBER_DEFAULT"/> ቀን በፊት</translation> -<translation id="8428213095426709021">ቅንብሮች</translation> -<translation id="2497284189126895209">ሁሉም ፋይሎች</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> ደቂቃዎች ቀርተዋል</translation> -<translation id="5110450810124758964">ከ<ph name="NUMBER_ONE"/> ቀን በፊት</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> ሴኮንድ</translation> -<translation id="7814458197256864873">&ቅዳ</translation> -<translation id="3889424535448813030">ቀኝ ቀስት</translation> -<translation id="4229495110203539533">ከ<ph name="NUMBER_ONE"/> ሴኮንድ በፊት</translation> -<translation id="2544782972264605588">ከ<ph name="NUMBER_DEFAULT"/> ሴኮንድ በፊት</translation> -<translation id="6829324100069873704">ወደ ማሳወቂያዎች ተመለስ።</translation> -<translation id="6528179044667508675">አትረብሽ</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> ሰከንዶች</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> ደቂቃ</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> ሰዓት ይቀራል</translation> -<translation id="7135556860107312402">ማሳወቂያዎች ከሚከተሉት እንዲመጡ ፍቀድ፦</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> ሰዓቶች</translation> -<translation id="1398853756734560583">አስፋ</translation> -<translation id="4250229828105606438">ቅጽበታዊ ገጽ እይታ</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> ሰዓቶች</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> ደቂቃ ይቀራል</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> ጊባ</translation> -<translation id="1901303067676059328">&ሁሉንም ምረጥ</translation> -<translation id="2168039046890040389">ወደላይ አንቀሳቅስ</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> ደቂቃ</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> ቀን</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> ደቂቃ</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> ደቂቃ</translation> -<translation id="8448317557906454022">ከ<ph name="NUMBER_ZERO"/> ሴኮንድ በፊት</translation> -<translation id="4927753642311223124">እዚህ ምንም የሚታይ ነገር የለም፣ ይቀጥሉ።</translation> -<translation id="2482878487686419369">ማስታወቂያዎች</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> ቀን</translation> -<translation id="3183922693828471536">ወደ እዚህ ሸብልል</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> ሰዓቶች</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> ኪባ/ሰ</translation> -<translation id="8394908167088220973">ሚዲያ አጫውት/ለአፍታ አቁም</translation> -<translation id="2148716181193084225">ዛሬ</translation> -<translation id="7960078400008666149">ለአንድ ሰዓት አትረብሽ</translation> -<translation id="4373894838514502496">ከ<ph name="NUMBER_FEW"/> ደቂቃ በፊት</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> ቀናት</translation> -<translation id="2190355936436201913">(ባዶ)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> ሰዓት ይቀራል</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> ሴኮንድ ይቀራል</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">ወደ ቀኝ ሸብልል</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> ሰዓት ይቀራል</translation> -<translation id="1413622004203049571">ከ<ph name="NOTIFIER_NAME"/> የሚመጡ ማሳወቂያዎችን አሰናክል</translation> -<translation id="2666092431469916601">ላይ</translation> -<translation id="8331626408530291785">ወደ ላይ ሸብልል</translation> -<translation id="7907591526440419938">ፋይል ክፈት</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> ቀን ይቀራል</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">ከ<ph name="NUMBER_DEFAULT"/> ሰዓት በፊት</translation> -<translation id="815598010540052116">ወደ ታች ሸብልል</translation> -<translation id="6808150112686056157">ሚዲያ አቁም</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> ደቂቃ ይቀራል</translation> -<translation id="3157931365184549694">እነበረበት መልስ</translation> -<translation id="1243314992276662751">ስቀል</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> ቀን ይቀራል</translation> -<translation id="8179976553408161302">አስገባ</translation> -<translation id="945522503751344254">ግብረ መልስ ላክ</translation> -<translation id="9170848237812810038">&ቀልብስ</translation> -<translation id="1285266685456062655">ከ<ph name="NUMBER_FEW"/> ሰዓቶች በፊት</translation> -<translation id="6918245111648057970">ከሚከተሉት ውስጥ ለእያንዳንዱ ተጠቃሚ ማሳወቂያዎችን ይፍቀዱ፦</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> ሴኮንድ</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> ደቂቃዎች ቀርተዋል</translation> -<translation id="6358975074282722691">ከ<ph name="NUMBER_TWO"/> ሴኮንድ በፊት</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> ፔታ</translation> -<translation id="2983818520079887040">ቅንብሮች ...</translation> -<translation id="6845383723252244143">አቃፊ ምረጥ</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> ሰከንዶች</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> ሴኮንድ</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534">ከ<ph name="NUMBER_MANY"/> ቀናት በፊት</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> ቀናት</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> ሰዓት</translation> -<translation id="2679312662830811292">ከ<ph name="NUMBER_ONE"/> ደቂቃ በፊት</translation> -<translation id="8788572795284305350">ከ<ph name="NUMBER_ZERO"/> ሰዓት በፊት</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> ጊባ/ሰ</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> ቀን</translation> -<translation id="9098468523912235228">ከ<ph name="NUMBER_DEFAULT"/> ሴኮንድ በፊት</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> ሴኮንድ ይቀራል</translation> -<translation id="4570886800634958009">ማሳወቂያ ዘርጋ</translation> -<translation id="436869212180315161">ተጫን</translation> -<translation id="4860787810836767172">ከ<ph name="NUMBER_FEW"/> ሴኮንድ በፊት</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> ቴባ/ሰ</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> ደቂቃዎች</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> ደቂቃዎች ቀርተዋል</translation> -<translation id="6040143037577758943">ዝጋ</translation> -<translation id="1101671447232096497">ከ<ph name="NUMBER_MANY"/> ደቂቃ በፊት</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> ባ/ሰ</translation> -<translation id="7649070708921625228">እገዛ</translation> -<translation id="6699343763173986273">የሚዲያ ቀጣይ ትራክ</translation> -<translation id="8226233771743600312">ለአንድ ቀን አትረብሽ</translation> -<translation id="7457942297256758195">ሁሉንም አጽዳ</translation> -<translation id="822618367988303761">ከ<ph name="NUMBER_TWO"/> ቀናት በፊት</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> ደቂቃ</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> ቀን ይቀራል</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> ደቂቃዎች</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> ሰዓቶች ይቀራሉ</translation> -<translation id="8959208747503200525">ከ<ph name="NUMBER_TWO"/> ሰዓቶች በፊት</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> ሴኮንድ</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> ሴኮንድ</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> ሰከንዶች</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> ቀን ይቀራል</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> ፔባ/ሰ</translation> -<translation id="2743387203779672305">ወደ ቅንጥብ ሰሌዳ ገልብጥ</translation> -<translation id="8371695176452482769">አሁን ይናገሩ</translation> -<translation id="6965382102122355670">ይሁን</translation> -<translation id="7850320739366109486">አትረብሽ</translation> -<translation id="6978839998405419496">ከ<ph name="NUMBER_ZERO"/> ቀን በፊት</translation> -<translation id="5941711191222866238">አሳንስ</translation> -<translation id="6394627529324717982">ኮማ</translation> -<translation id="3036649622769666520">ፋይሎች ክፈት</translation> -<translation id="8328145009876646418">የግራ ጠርዝ</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> ሰከንዶች</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_ar.xtb b/chromium/ui/base/strings/ui_strings_ar.xtb deleted file mode 100644 index e57fa3b1672..00000000000 --- a/chromium/ui/base/strings/ui_strings_ar.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ar"> -<translation id="4820616160060340806">المفتاح Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">مفتاح Ins</translation> -<translation id="6135826906199951471">مفتاح Del (حذف)</translation> -<translation id="528468243742722775">مفتاح End</translation> -<translation id="5341849548509163798">قبل <ph name="NUMBER_MANY"/> ساعة</translation> -<translation id="6310545596129886942">عدد الثواني المتبقية <ph name="NUMBER_FEW"/></translation> -<translation id="9213479837033539041">عدد الثواني المتبقية: <ph name="NUMBER_MANY"/></translation> -<translation id="1209866192426315618">عدد الدقائق المتبقية: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="1801827354178857021">نقطة</translation> -<translation id="1190609913194133056">مركز الإشعارات</translation> -<translation id="7470933019269157899">عدد الدقائق المتبقية: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="5613020302032141669">مفتاح سهم إلى اليسار</translation> -<translation id="4971687151119236543">المقطع الصوتي السابق للوسائط</translation> -<translation id="8602707065186045623">ملف <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918">قبل <ph name="NUMBER_ZERO"/> دقيقة</translation> -<translation id="7121570032414343252">عدد الثواني: <ph name="NUMBER_TWO"/></translation> -<translation id="7511635910912978956">عدد الساعات المتبقية: <ph name="NUMBER_FEW"/></translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> أكثر من <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">إلغاء</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> بايت</translation> -<translation id="3660179305079774227">مفتاح سهم إلى أعلى</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> ميغابايات/ثانية</translation> -<translation id="5608669887400696928">عدد الساعات: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="3990502903496589789">الحافة اليسرى</translation> -<translation id="9038489124413477075">مجلد بدون اسم</translation> -<translation id="8507996248087185956">عدد الدقائق: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="3520476450377425184">عدد الأيام المتبقيّة <ph name="NUMBER_MANY"/></translation> -<translation id="932327136139879170">الصفحة الرئيسية</translation> -<translation id="5600907569873192868">عدد الدقائق المتبقية: <ph name="NUMBER_MANY"/></translation> -<translation id="8666066831007952346">عدد الأيام المتبقية <ph name="NUMBER_TWO"/></translation> -<translation id="6390842777729054533">عدد الثواني المتبقية: <ph name="NUMBER_ZERO"/></translation> -<translation id="3909791450649380159">&قص</translation> -<translation id="2560788951337264832">عدد الدقائق المتبقية: <ph name="NUMBER_ZERO"/></translation> -<translation id="688711909580084195">صفحة ويب بدون عنوان</translation> -<translation id="3353284378027041011">قبل <ph name="NUMBER_FEW"/> يوم</translation> -<translation id="5076340679995252485">ل&صق</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> تيرابايت</translation> -<translation id="364720409959344976">حدد مجلدًا للتحميل</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016">قبل <ph name="NUMBER_TWO"/> دقيقة</translation> -<translation id="3234408098842461169">مفتاح سهم إلى أسفل</translation> -<translation id="3087734570205094154">أسفل</translation> -<translation id="5935630983280450497">عدد الدقائق المتبقية: <ph name="NUMBER_ONE"/></translation> -<translation id="1860796786778352021">إغلاق الإشعار</translation> -<translation id="6364916375976753737">التمرير إلى اليمين</translation> -<translation id="2629089419211541119">قبل <ph name="NUMBER_ONE"/> ساعة</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> دقيقة</translation> -<translation id="6982279413068714821">قبل <ph name="NUMBER_DEFAULT"/> دقيقة</translation> -<translation id="6945221475159498467">تحديد</translation> -<translation id="6620110761915583480">حفظ الملف</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> بلا ثوانٍ</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> ساعة</translation> -<translation id="7836361698254323868">عدد الدقائق المتبقية: <ph name="NUMBER_ONE"/></translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> دقيقة</translation> -<translation id="8210608804940886430">صفحة إلى أسفل</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> يومًا</translation> -<translation id="7163503212501929773">عدد الساعات المتبقية: <ph name="NUMBER_MANY"/></translation> -<translation id="5329858601952122676">&حذف</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> ثانية</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> كيلوبايت</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> دقيقة</translation> -<translation id="7275974018215686543">قبل <ph name="NUMBER_MANY"/> ثانية</translation> -<translation id="7781829728241885113">أمس</translation> -<translation id="3424538384153559412">دقيقتان (<ph name="NUMBER_TWO"/>)</translation> -<translation id="50960180632766478">عدد الدقائق المتبقية: <ph name="NUMBER_FEW"/></translation> -<translation id="6659594942844771486">علامة تبويب</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> ميغابايت</translation> -<translation id="4988273303304146523">قبل <ph name="NUMBER_DEFAULT"/> يوم</translation> -<translation id="8428213095426709021">الإعدادات</translation> -<translation id="2497284189126895209">الملفّات كلّها</translation> -<translation id="7487278341251176613">عدد الدقائق المتبقية: <ph name="NUMBER_TWO"/></translation> -<translation id="5110450810124758964">قبل <ph name="NUMBER_ONE"/> يوم</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> ثانية</translation> -<translation id="7814458197256864873">&نسخ</translation> -<translation id="3889424535448813030">مفتاح سهم إلى اليمين</translation> -<translation id="4229495110203539533">قبل <ph name="NUMBER_ONE"/> ثانية</translation> -<translation id="2544782972264605588">عدد الثواني المتبقية: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="6829324100069873704">الرجوع إلى الإشعارات</translation> -<translation id="6528179044667508675">الرجاء عدم الإزعاج</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> ثانية</translation> -<translation id="290555789621781773">عدد الدقائق: <ph name="NUMBER_TWO"/></translation> -<translation id="5149131957118398098">متبقٍ <ph name="NUMBER_ZERO"/> ساعة</translation> -<translation id="7135556860107312402">السماح بالإشعارات من الجهات التالية:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> ساعات</translation> -<translation id="1398853756734560583">تكبير</translation> -<translation id="4250229828105606438">لقطة شاشة</translation> -<translation id="6690744523875189208">عدد الساعات: <ph name="NUMBER_TWO"/></translation> -<translation id="5260878308685146029">عدد الدقائق المتبقية: <ph name="NUMBER_TWO"/></translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> غيغابايت</translation> -<translation id="1901303067676059328">تح&ديد الكلّ</translation> -<translation id="2168039046890040389">صفحة إلى أعلى</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> دقيقة</translation> -<translation id="9107059250669762581">عدد الأيام <ph name="NUMBER_DEFAULT"/></translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> دقيقة</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> دقيقة واحدة</translation> -<translation id="8448317557906454022">قبل <ph name="NUMBER_ZERO"/> ثانية</translation> -<translation id="4927753642311223124">ليس هناك شيء تراه هنا، انتقل إلى مكان آخر.</translation> -<translation id="2482878487686419369">الاشعارات</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> يوم</translation> -<translation id="3183922693828471536">التمرير إلى هنا</translation> -<translation id="4552416320897244156">مفتاح PgDwn (صفحة إلى أسفل)</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> ساعة</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> كيلوبايت/ثانية</translation> -<translation id="8394908167088220973">تشغيل/إيقاف الوسائط</translation> -<translation id="2148716181193084225">اليوم</translation> -<translation id="7960078400008666149">الرجاء عدم الإزعاج لمدة ساعة واحدة</translation> -<translation id="4373894838514502496">قبل <ph name="NUMBER_FEW"/> دقيقة</translation> -<translation id="4115153316875436289">عدد الأيام: <ph name="NUMBER_TWO"/></translation> -<translation id="2190355936436201913">(فارغ)</translation> -<translation id="1164369517022005061">عدد الساعات المتبقية: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="152482086482215392">عدد الثواني المتبقية: <ph name="NUMBER_ONE"/></translation> -<translation id="8447116497070723931">مفتاح PgUp (صفحة إلى أعلى)</translation> -<translation id="4588090240171750605">التمرير إلى اليسار</translation> -<translation id="7414887922320653780">عدد الساعات المتبقية: <ph name="NUMBER_ONE"/></translation> -<translation id="1413622004203049571">تعطيل الإشعارات من <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">أعلى</translation> -<translation id="8331626408530291785">التمرير إلى أعلى</translation> -<translation id="7907591526440419938">فتح ملف</translation> -<translation id="2864069933652346933">متبقٍ <ph name="NUMBER_ZERO"/> يوم</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">قبل <ph name="NUMBER_DEFAULT"/> ساعة</translation> -<translation id="815598010540052116">التمرير إلى أسفل</translation> -<translation id="6808150112686056157">إيقاف الوسائط</translation> -<translation id="1308727876662951186">متبقٍ <ph name="NUMBER_ZERO"/> دقيقة</translation> -<translation id="3157931365184549694">استعادة</translation> -<translation id="1243314992276662751">تحميل</translation> -<translation id="50030952220075532">عدد الأيام المتبقية <ph name="NUMBER_ONE"/></translation> -<translation id="8179976553408161302">تفضل</translation> -<translation id="945522503751344254">إرسال تعليقات</translation> -<translation id="9170848237812810038">&إلغاء</translation> -<translation id="1285266685456062655">قبل <ph name="NUMBER_FEW"/> ساعة</translation> -<translation id="6918245111648057970">السماح بإشعارات مما يلي لكل مستخدم:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> ثانية واحدة</translation> -<translation id="3994835489895548312">عدد الدقائق المتبقية: <ph name="NUMBER_MANY"/></translation> -<translation id="6358975074282722691">قبل <ph name="NUMBER_TWO"/> ثانية</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> بيتابايت</translation> -<translation id="2983818520079887040">الإعدادات...</translation> -<translation id="6845383723252244143">تحديد مجلد</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> ثوانٍ</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> ثوانٍ</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534">قبل <ph name="NUMBER_MANY"/> يوم</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> أيام</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> ساعة</translation> -<translation id="2679312662830811292">قبل <ph name="NUMBER_ONE"/> دقيقة</translation> -<translation id="8788572795284305350">قبل <ph name="NUMBER_ZERO"/> ساعة</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> غيغابايت/ثانية</translation> -<translation id="6644971472240498405">عدد الأيام <ph name="NUMBER_ONE"/></translation> -<translation id="9098468523912235228">قبل <ph name="NUMBER_DEFAULT"/> ثانية</translation> -<translation id="494645311413743213">عدد الثواني المتبقية: <ph name="NUMBER_TWO"/></translation> -<translation id="4570886800634958009">توسيع الإشعار</translation> -<translation id="436869212180315161">اضغط</translation> -<translation id="4860787810836767172">قبل <ph name="NUMBER_FEW"/> ثانية</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> تيرابايت/ثانية</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> بلا دقائق</translation> -<translation id="1858722859751911017">عدد الدقائق المتبقية: <ph name="NUMBER_FEW"/></translation> -<translation id="6040143037577758943">إغلاق</translation> -<translation id="1101671447232096497">قبل <ph name="NUMBER_MANY"/> دقيقة</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> بايت/ثانية</translation> -<translation id="7649070708921625228">مساعدة</translation> -<translation id="6699343763173986273">المقطع الصوتي التالي للوسائط</translation> -<translation id="8226233771743600312">الرجاء عدم الإزعاج لمدة يوم واحد</translation> -<translation id="7457942297256758195">محو الكل</translation> -<translation id="822618367988303761">قبل <ph name="NUMBER_TWO"/> يوم</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> دقيقة</translation> -<translation id="1963692530539281474">عدد الأيام المتبقية <ph name="NUMBER_DEFAULT"/></translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> دقائق</translation> -<translation id="5906719743126878045">عدد الساعات المتبقية: <ph name="NUMBER_TWO"/></translation> -<translation id="8959208747503200525">قبل <ph name="NUMBER_TWO"/> ساعة</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> من الثواني</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> ثانية</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> ثانية</translation> -<translation id="3759876923365568382">عدد الأيام المتبقية <ph name="NUMBER_FEW"/></translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> بيتابايت/ثانية</translation> -<translation id="2743387203779672305">نسخ إلى الحافظة</translation> -<translation id="8371695176452482769">تحدث الآن</translation> -<translation id="6965382102122355670">موافق</translation> -<translation id="7850320739366109486">الرجاء عدم الإزعاج</translation> -<translation id="6978839998405419496">قبل <ph name="NUMBER_ZERO"/> يوم</translation> -<translation id="5941711191222866238">تصغير</translation> -<translation id="6394627529324717982">فاصلة</translation> -<translation id="3036649622769666520">فتح الملفات</translation> -<translation id="8328145009876646418">الحافة اليمنى</translation> -<translation id="7372005818821648611">ثانيتان (<ph name="NUMBER_TWO"/>)</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_bg.xtb b/chromium/ui/base/strings/ui_strings_bg.xtb deleted file mode 100644 index d1195c4d21c..00000000000 --- a/chromium/ui/base/strings/ui_strings_bg.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="bg"> -<translation id="4820616160060340806">Command + <ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798">преди <ph name="NUMBER_MANY"/> часа</translation> -<translation id="6310545596129886942">Остават <ph name="NUMBER_FEW"/> сек</translation> -<translation id="9213479837033539041">Остават <ph name="NUMBER_MANY"/> сек</translation> -<translation id="1209866192426315618">Остават <ph name="NUMBER_DEFAULT"/> минути</translation> -<translation id="1801827354178857021">Точка</translation> -<translation id="1190609913194133056">Център за известия</translation> -<translation id="7470933019269157899">Остават <ph name="NUMBER_DEFAULT"/> минути</translation> -<translation id="5613020302032141669">Стрелка наляво</translation> -<translation id="4971687151119236543">Мултимедия, предишният запис</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> файл (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> сек</translation> -<translation id="7511635910912978956">Остават <ph name="NUMBER_FEW"/> часа</translation> -<translation id="8717309436826820190">Още <ph name="NUMBER_OF_NOTIFICATIONS"/> от <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Отказ</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> Б</translation> -<translation id="3660179305079774227">Стрелка нагоре</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> МБ/сек</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> часа</translation> -<translation id="3990502903496589789">Десн край</translation> -<translation id="9038489124413477075">Папка без име</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> мин</translation> -<translation id="3520476450377425184">Остават <ph name="NUMBER_MANY"/> дни</translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868">Остават <ph name="NUMBER_MANY"/> мин</translation> -<translation id="8666066831007952346">Остават <ph name="NUMBER_TWO"/> дни</translation> -<translation id="6390842777729054533">Остават <ph name="NUMBER_ZERO"/> сек</translation> -<translation id="3909791450649380159">Изрязва&не</translation> -<translation id="2560788951337264832">Остават <ph name="NUMBER_ZERO"/> минути</translation> -<translation id="688711909580084195">Неозаглавена уеб страница</translation> -<translation id="3353284378027041011">преди <ph name="NUMBER_FEW"/> дни</translation> -<translation id="5076340679995252485">&Поставяне</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> ТБ</translation> -<translation id="364720409959344976">Избиране на папка за качване</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016">преди <ph name="NUMBER_TWO"/> мин</translation> -<translation id="3234408098842461169">Стрелка надолу</translation> -<translation id="3087734570205094154">Най-долу</translation> -<translation id="5935630983280450497">Остава <ph name="NUMBER_ONE"/> мин</translation> -<translation id="1860796786778352021">Затваряне на известието</translation> -<translation id="6364916375976753737">Превъртане наляво</translation> -<translation id="2629089419211541119">преди <ph name="NUMBER_ONE"/> час/а</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> минути</translation> -<translation id="6982279413068714821">преди <ph name="NUMBER_DEFAULT"/> мин</translation> -<translation id="6945221475159498467">Изберете</translation> -<translation id="6620110761915583480">Запазване на файл</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> секунди</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Остава <ph name="NUMBER_ONE"/> минута</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> мин</translation> -<translation id="8210608804940886430">Страница надолу</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> дни</translation> -<translation id="7163503212501929773">Остават <ph name="NUMBER_MANY"/> часа</translation> -<translation id="5329858601952122676">&Изтриване</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> сек</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KБ</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> минути</translation> -<translation id="7275974018215686543">преди <ph name="NUMBER_MANY"/> сек</translation> -<translation id="7781829728241885113">Вчера</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> минути</translation> -<translation id="50960180632766478">Остават <ph name="NUMBER_FEW"/> мин</translation> -<translation id="6659594942844771486">Раздел</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> МБ</translation> -<translation id="4988273303304146523">преди <ph name="NUMBER_DEFAULT"/> дни</translation> -<translation id="8428213095426709021">Настройки</translation> -<translation id="2497284189126895209">Всички файлове</translation> -<translation id="7487278341251176613">Остават <ph name="NUMBER_TWO"/> минути</translation> -<translation id="5110450810124758964">преди <ph name="NUMBER_ONE"/> ден/дни</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> сек</translation> -<translation id="7814458197256864873">&Копиране</translation> -<translation id="3889424535448813030">Стрелка надясно</translation> -<translation id="4229495110203539533">преди <ph name="NUMBER_ONE"/> сек</translation> -<translation id="2544782972264605588">Остават <ph name="NUMBER_DEFAULT"/> сек</translation> -<translation id="6829324100069873704">Назад към известията</translation> -<translation id="6528179044667508675">Не безпокойте</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> секунди</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> мин</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Разрешаване на известията от следните неща:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> часа</translation> -<translation id="1398853756734560583">Увеличаване</translation> -<translation id="4250229828105606438">Eкранна снимка</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> часа</translation> -<translation id="5260878308685146029">Остават <ph name="NUMBER_TWO"/> мин</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> ГБ</translation> -<translation id="1901303067676059328">&Избиране на всички</translation> -<translation id="2168039046890040389">Страница нагоре</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> дни</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> мин</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> минута</translation> -<translation id="8448317557906454022">преди <ph name="NUMBER_ZERO"/> сек</translation> -<translation id="4927753642311223124">Тук няма нищо, продължете нататък.</translation> -<translation id="2482878487686419369">Известия</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Превъртане до тук</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> часа</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> КБ/сек</translation> -<translation id="8394908167088220973">Мултимедия, пускане/пауза</translation> -<translation id="2148716181193084225">Днес</translation> -<translation id="7960078400008666149">Не безпокойте за един час</translation> -<translation id="4373894838514502496">преди <ph name="NUMBER_FEW"/> мин</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> дни</translation> -<translation id="2190355936436201913">(празно)</translation> -<translation id="1164369517022005061">Остават <ph name="NUMBER_DEFAULT"/> часа</translation> -<translation id="152482086482215392">Остава <ph name="NUMBER_ONE"/> сек</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Превъртане надясно</translation> -<translation id="7414887922320653780">Остава <ph name="NUMBER_ONE"/> час</translation> -<translation id="1413622004203049571">Деактивиране на известията от <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Най-горе</translation> -<translation id="8331626408530291785">Превъртане нагоре</translation> -<translation id="7907591526440419938">Отваряне на файл</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">преди <ph name="NUMBER_DEFAULT"/> часа</translation> -<translation id="815598010540052116">Превъртане надолу</translation> -<translation id="6808150112686056157">Мултимедия, стоп</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Възстановяване</translation> -<translation id="1243314992276662751">Качване</translation> -<translation id="50030952220075532">Остава <ph name="NUMBER_ONE"/> ден</translation> -<translation id="8179976553408161302">Влизане</translation> -<translation id="945522503751344254">Изпращане на отзиви</translation> -<translation id="9170848237812810038">&Отмяна</translation> -<translation id="1285266685456062655">преди <ph name="NUMBER_FEW"/> часа</translation> -<translation id="6918245111648057970">Разрешаване на известията от следните неща за всеки потребител:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> секунда</translation> -<translation id="3994835489895548312">Остават <ph name="NUMBER_MANY"/> минути</translation> -<translation id="6358975074282722691">преди <ph name="NUMBER_TWO"/> сек</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> ПБ</translation> -<translation id="2983818520079887040">Настройки...</translation> -<translation id="6845383723252244143">Избор на папка</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> секунди</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> сек</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534">преди <ph name="NUMBER_MANY"/> дни</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> дни</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> час</translation> -<translation id="2679312662830811292">преди <ph name="NUMBER_ONE"/> мин</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> ГБ/сек</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> ден</translation> -<translation id="9098468523912235228">преди <ph name="NUMBER_DEFAULT"/> сек</translation> -<translation id="494645311413743213">Остават <ph name="NUMBER_TWO"/> сек</translation> -<translation id="4570886800634958009">Разгъване на известието</translation> -<translation id="436869212180315161">Натиснете</translation> -<translation id="4860787810836767172">преди <ph name="NUMBER_FEW"/> сек</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> ТБ/сек</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> минути</translation> -<translation id="1858722859751911017">Остават <ph name="NUMBER_FEW"/> минути</translation> -<translation id="6040143037577758943">Затваряне</translation> -<translation id="1101671447232096497">преди <ph name="NUMBER_MANY"/> мин</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> Б/сек</translation> -<translation id="7649070708921625228">Помощ</translation> -<translation id="6699343763173986273">Мултимедия, следващият запис</translation> -<translation id="8226233771743600312">Не безпокойте за един ден</translation> -<translation id="7457942297256758195">Изчистване на всички</translation> -<translation id="822618367988303761">преди <ph name="NUMBER_TWO"/> дни</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> мин</translation> -<translation id="1963692530539281474">Остават <ph name="NUMBER_DEFAULT"/> дни</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> минути</translation> -<translation id="5906719743126878045">Остават <ph name="NUMBER_TWO"/> часа</translation> -<translation id="8959208747503200525">преди <ph name="NUMBER_TWO"/> часа</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> сек</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> сек</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> секунди</translation> -<translation id="3759876923365568382">Остават <ph name="NUMBER_FEW"/> дни</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> ПБ/сек</translation> -<translation id="2743387203779672305">Копиране в буферната памет</translation> -<translation id="8371695176452482769">Говорете сега</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Не безпокойте</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Намаляване</translation> -<translation id="6394627529324717982">Запетая</translation> -<translation id="3036649622769666520">Отваряне на файлове</translation> -<translation id="8328145009876646418">Ляв край</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> секунди</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_bn.xtb b/chromium/ui/base/strings/ui_strings_bn.xtb deleted file mode 100644 index 4930bff97b6..00000000000 --- a/chromium/ui/base/strings/ui_strings_bn.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="bn"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> সেকেন্ড বাকি</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> সেকেন্ড বাকি</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> মিনিট বাকি</translation> -<translation id="1801827354178857021">সময়কাল</translation> -<translation id="1190609913194133056">বিজ্ঞপ্তি কেন্দ্র</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> মিনিট বাকি</translation> -<translation id="5613020302032141669">Left Arrow</translation> -<translation id="4971687151119236543">মিডিয়া পূর্ববর্তী ট্র্যাক</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> ফাইল (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> সেকেন্ড</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> ঘন্টা বাকি</translation> -<translation id="8717309436826820190"><ph name="SOURCE_OF_NOTIFICATIONS"/> থেকে আরো <ph name="NUMBER_OF_NOTIFICATIONS"/>টি</translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">বাতিল</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Up Arrow</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> ঘন্টা</translation> -<translation id="3990502903496589789">ডান প্রান্ত</translation> -<translation id="9038489124413477075">নামবিহীন ফোল্ডার</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> মিনিট</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> দিন বাকি</translation> -<translation id="932327136139879170">হোম</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> মিনিট বাকি</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> দিন বাকি</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> সেকেন্ড বাকি</translation> -<translation id="3909791450649380159">ছেদ&ন</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> মিনিট বাকি</translation> -<translation id="688711909580084195">শিরোনামহীন ওয়েবপৃষ্ঠা</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">&প্রতিলেপন</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">আপলোড করার জন্য ফোল্ডার নির্বাচন করুন</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">Down Arrow</translation> -<translation id="3087734570205094154">নীচে</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> মিনিট বাকি</translation> -<translation id="1860796786778352021">বিজ্ঞপ্তি বন্ধ করা হয়েছে</translation> -<translation id="6364916375976753737">বাম দিকে স্ক্রোল করুন</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> hour ago</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> মিনিট</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> মিনিট আগে</translation> -<translation id="6945221475159498467">নির্বাচন</translation> -<translation id="6620110761915583480">ফাইল সংরক্ষণ করুন</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> সেকেন্ড</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> মিনিট বাকি</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> মিনিট</translation> -<translation id="8210608804940886430">পৃষ্ঠা উপরে</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> দিন</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> ঘন্টা বাকি</translation> -<translation id="5329858601952122676">&মুছুন</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> সেকেন্ড</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> মিনিট</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">গতকাল</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> মিনিট</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> মিনিট বাকি</translation> -<translation id="6659594942844771486">ট্যাব</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> দিন আগে</translation> -<translation id="8428213095426709021">সেটিংস</translation> -<translation id="2497284189126895209">সকল ফাইল</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> মিনিট বাকি</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> day ago</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> সেকেন্ড</translation> -<translation id="7814458197256864873">&copy</translation> -<translation id="3889424535448813030">Right Arrow</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> sec ago</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> সেকেন্ড বাকি</translation> -<translation id="6829324100069873704">বিজ্ঞপ্তিগুলিতে ফিরে যান</translation> -<translation id="6528179044667508675">বিরক্ত করবেন না</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> সেকেন্ড</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> মিনিট</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">নিম্নলিখিত থেকে বিজ্ঞপ্তিগুলি মঞ্জুরি করুন:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> ঘন্টা</translation> -<translation id="1398853756734560583">বড় করুন</translation> -<translation id="4250229828105606438">স্ক্রীনশট</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> ঘন্টা</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> মিনিট বাকি</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">&সকল নির্বাচন করুন</translation> -<translation id="2168039046890040389">পৃষ্ঠা নীচে</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> দিন</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> মিনিট</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> মিনিট</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">এখানে দেখার কিছু নেই , এগিয়ে যান৷</translation> -<translation id="2482878487686419369">বিজ্ঞপ্তিগুলি</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">এখান পর্যন্ত স্ক্রোল করুন</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> ঘন্টা</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">মিডিয়া প্লে করুন/বিরতি</translation> -<translation id="2148716181193084225">আজ</translation> -<translation id="7960078400008666149">এক ঘন্টার জন্য বিরক্ত করবেন না</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> দিন</translation> -<translation id="2190355936436201913">(খালি)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> ঘন্টা বাকি</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> সেকেন্ড বাকি</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">ডান দিকে স্ক্রোল করুন</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> ঘন্টা বাকি</translation> -<translation id="1413622004203049571"><ph name="NOTIFIER_NAME"/> এর থেকে বিজ্ঞপ্তিগুলি অক্ষম করুন</translation> -<translation id="2666092431469916601">শীর্ষ</translation> -<translation id="8331626408530291785">উপরে স্ক্রোল করুন</translation> -<translation id="7907591526440419938">খোলা ফাইল</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> ঘন্টা আগে</translation> -<translation id="815598010540052116">নীচে স্ক্রোল করুন</translation> -<translation id="6808150112686056157">মিডিয়া থামান</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">পুনরুদ্ধার করুন</translation> -<translation id="1243314992276662751">আপলোড</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> দিন বাকি</translation> -<translation id="8179976553408161302">প্রবেশ করুন</translation> -<translation id="945522503751344254">প্রতিক্রিয়া প্রেরণ করুন</translation> -<translation id="9170848237812810038">&পূর্বাবস্থায় ফিরুন</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">প্রত্যেক ব্যবহারকারীর জন্য নিম্নলিখিত থেকে বিজ্ঞপ্তি মঞ্জুর করুন:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> সেকেন্ড</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> মিনিট বাকি</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">সেটিংস...</translation> -<translation id="6845383723252244143">ফোল্ডার নির্বাচন করুন</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> সেকেন্ড</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> সেকেন্ড</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> দিন</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> ঘন্টা</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> min ago</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> দিন</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> সেকেন্ড আগে</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> সেকেন্ড বাকি</translation> -<translation id="4570886800634958009">বিজ্ঞপ্তি প্রসারিত করুন</translation> -<translation id="436869212180315161">টিপুন</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> মিনিট</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> মিনিট বাকি</translation> -<translation id="6040143037577758943">বন্ধ</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">সহায়তা</translation> -<translation id="6699343763173986273">মিডিয়া পরবর্তী ট্র্যাক</translation> -<translation id="8226233771743600312">এক দিনের জন্য বিরক্ত করবেন না</translation> -<translation id="7457942297256758195">সমস্ত সাফ করুন</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> মিনিট</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> দিন বাকি</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> মিনিট</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> ঘন্টা বাকি</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> সেকেন্ড</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> সেকেন্ড</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> সেকেন্ড</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> দিন বাকি</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">ক্লিপবোর্ডে অনুলিপি করুন</translation> -<translation id="8371695176452482769">এখনই বলুন</translation> -<translation id="6965382102122355670">ওকে</translation> -<translation id="7850320739366109486">বিরক্ত করবেন না</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">ছোট করুন</translation> -<translation id="6394627529324717982">কমা</translation> -<translation id="3036649622769666520">খোলা ফাইল</translation> -<translation id="8328145009876646418">বাম প্রান্ত</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> সেকেন্ড</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_ca.xtb b/chromium/ui/base/strings/ui_strings_ca.xtb deleted file mode 100644 index ca32ba15575..00000000000 --- a/chromium/ui/base/strings/ui_strings_ca.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ca"> -<translation id="4820616160060340806">Ordre+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Supr</translation> -<translation id="528468243742722775">Fi</translation> -<translation id="5341849548509163798">Fa <ph name="NUMBER_MANY"/> hores</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> segons restants</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> segons restants</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> minuts restants</translation> -<translation id="1801827354178857021">Punt</translation> -<translation id="1190609913194133056">Centre de notificacions</translation> -<translation id="7470933019269157899">Queden <ph name="NUMBER_DEFAULT"/> minuts</translation> -<translation id="5613020302032141669">Fletxa esquerra</translation> -<translation id="4971687151119236543">Fitxer multimèdia: pista anterior</translation> -<translation id="8602707065186045623">Fitxer <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> segons</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> hores restants</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> més de <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Cancel·la</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Fletxa amunt</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> hores</translation> -<translation id="3990502903496589789">Extrem dret</translation> -<translation id="9038489124413477075">Carpeta sense nom</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> minuts</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> dies restants</translation> -<translation id="932327136139879170">Inici</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> minuts restants</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> dies restants</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> segons restants</translation> -<translation id="3909791450649380159">Re&talla</translation> -<translation id="2560788951337264832">Queden <ph name="NUMBER_ZERO"/> minuts</translation> -<translation id="688711909580084195">Pàgina web sense títol</translation> -<translation id="3353284378027041011">Fa <ph name="NUMBER_FEW"/> dies</translation> -<translation id="5076340679995252485">Engan&xa</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Selecció d'una carpeta per penjar</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016">Fa <ph name="NUMBER_TWO"/> minuts</translation> -<translation id="3234408098842461169">Fletxa avall</translation> -<translation id="3087734570205094154">Part inferior</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> minut restant</translation> -<translation id="1860796786778352021">Tanca la notificació</translation> -<translation id="6364916375976753737">Desplaçament a l'esquerra</translation> -<translation id="2629089419211541119">Fa <ph name="NUMBER_ONE"/> hora</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minuts</translation> -<translation id="6982279413068714821">Fa <ph name="NUMBER_DEFAULT"/> minuts</translation> -<translation id="6945221475159498467">Selecciona</translation> -<translation id="6620110761915583480">Desa el fitxer</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> segons</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Queda <ph name="NUMBER_ONE"/> minut</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> minut</translation> -<translation id="8210608804940886430">Av Pàg</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> dies</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> hores restants</translation> -<translation id="5329858601952122676">&Suprimeix</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> segons</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minuts</translation> -<translation id="7275974018215686543">Fa <ph name="NUMBER_MANY"/> segons</translation> -<translation id="7781829728241885113">Ahir</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minuts</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> minuts restants</translation> -<translation id="6659594942844771486">Pestanya</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523">Fa <ph name="NUMBER_DEFAULT"/> dies</translation> -<translation id="8428213095426709021">Configuració</translation> -<translation id="2497284189126895209">Tots els fitxers</translation> -<translation id="7487278341251176613">Queden <ph name="NUMBER_TWO"/> minuts</translation> -<translation id="5110450810124758964">Fa <ph name="NUMBER_ONE"/> dia</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> segon</translation> -<translation id="7814458197256864873">&Copia</translation> -<translation id="3889424535448813030">Fletxa dreta</translation> -<translation id="4229495110203539533">Fa <ph name="NUMBER_ONE"/> segon</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> segons restants</translation> -<translation id="6829324100069873704">Torna a les notificacions</translation> -<translation id="6528179044667508675">No molesteu</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> segons</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> minuts</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Permet notificacions de les fonts següents:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> hores</translation> -<translation id="1398853756734560583">Maximitza</translation> -<translation id="4250229828105606438">Captura de pantalla</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> hores</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> minuts restants</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Selecciona-ho &tot</translation> -<translation id="2168039046890040389">Re Pàg</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> dies</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> minuts</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minut</translation> -<translation id="8448317557906454022">Fa <ph name="NUMBER_ZERO"/> segons</translation> -<translation id="4927753642311223124">No hi ha cap notificació, podeu continuar.</translation> -<translation id="2482878487686419369">Notificacions</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Desplaçament fins aquí</translation> -<translation id="4552416320897244156">Av Pàg</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> hores</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">Fitxer multimèdia: reprodueix/posa en pausa</translation> -<translation id="2148716181193084225">Avui</translation> -<translation id="7960078400008666149">No molesteu durant una hora</translation> -<translation id="4373894838514502496">Fa <ph name="NUMBER_FEW"/> minuts</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> dies</translation> -<translation id="2190355936436201913">(buit)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> hores restants</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> segon restant</translation> -<translation id="8447116497070723931">Re Pàg</translation> -<translation id="4588090240171750605">Desplaçament a la dreta</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> hores restants</translation> -<translation id="1413622004203049571">Desactiva les notificacions de <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Superior</translation> -<translation id="8331626408530291785">Desplaçament amunt</translation> -<translation id="7907591526440419938">Obre un fitxer</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">Fa <ph name="NUMBER_DEFAULT"/> hores</translation> -<translation id="815598010540052116">Desplaçament avall</translation> -<translation id="6808150112686056157">Fitxer multimèdia: atura</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Restaura</translation> -<translation id="1243314992276662751">Penja</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> dia restant</translation> -<translation id="8179976553408161302">Intro</translation> -<translation id="945522503751344254">Envia comentaris</translation> -<translation id="9170848237812810038">&Desfés</translation> -<translation id="1285266685456062655">Fa <ph name="NUMBER_FEW"/> hores</translation> -<translation id="6918245111648057970">Permet les notificacions de les opcions següents per a cada usuari:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> segon</translation> -<translation id="3994835489895548312">Queden <ph name="NUMBER_MANY"/> minuts</translation> -<translation id="6358975074282722691">Fa <ph name="NUMBER_TWO"/> segons</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Configuració...</translation> -<translation id="6845383723252244143">Selecció d'una carpeta</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> segons</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> segons</translation> -<translation id="5583640892426849032">Retrocés</translation> -<translation id="5263972071113911534">Fa <ph name="NUMBER_MANY"/> dies</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> dies</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> hora</translation> -<translation id="2679312662830811292">Fa <ph name="NUMBER_ONE"/> minut</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> dia</translation> -<translation id="9098468523912235228">Fa <ph name="NUMBER_DEFAULT"/> segons</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> segons restants</translation> -<translation id="4570886800634958009">Amplia la notificació</translation> -<translation id="436869212180315161">Prem</translation> -<translation id="4860787810836767172">Fa <ph name="NUMBER_FEW"/> segons</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minuts</translation> -<translation id="1858722859751911017">Queden <ph name="NUMBER_FEW"/> minuts</translation> -<translation id="6040143037577758943">Tanca</translation> -<translation id="1101671447232096497">Fa <ph name="NUMBER_MANY"/> minuts</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Ajuda</translation> -<translation id="6699343763173986273">Fitxer multimèdia: pista següent</translation> -<translation id="8226233771743600312">No molesteu durant un dia</translation> -<translation id="7457942297256758195">Esborra-ho tot</translation> -<translation id="822618367988303761">Fa <ph name="NUMBER_TWO"/> dies</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> minuts</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> dies restants</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minuts</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> hores restants</translation> -<translation id="8959208747503200525">Fa <ph name="NUMBER_TWO"/> hores</translation> -<translation id="8400147561352026160">Maj+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> segons</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> segons</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> segons</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> dies restants</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Copia al porta-retalls</translation> -<translation id="8371695176452482769">Parleu ara</translation> -<translation id="6965382102122355670">D'acord</translation> -<translation id="7850320739366109486">No molesteu</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimitza</translation> -<translation id="6394627529324717982">Coma</translation> -<translation id="3036649622769666520">Obre fitxers</translation> -<translation id="8328145009876646418">Extrem esquerre</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> segons</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_cs.xtb b/chromium/ui/base/strings/ui_strings_cs.xtb deleted file mode 100644 index 9ed94f89cb7..00000000000 --- a/chromium/ui/base/strings/ui_strings_cs.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="cs"> -<translation id="4820616160060340806">Příkaz + <ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Klávesa Ins</translation> -<translation id="6135826906199951471">Klávesa Del</translation> -<translation id="528468243742722775">Klávesa End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942">Zbývá: <ph name="NUMBER_FEW"/> s</translation> -<translation id="9213479837033539041">Zbývá: <ph name="NUMBER_MANY"/> s</translation> -<translation id="1209866192426315618">Zbývá: <ph name="NUMBER_DEFAULT"/> min</translation> -<translation id="1801827354178857021">Tečka</translation> -<translation id="1190609913194133056">Centrum oznámení</translation> -<translation id="7470933019269157899">Zbývá <ph name="NUMBER_DEFAULT"/> min</translation> -<translation id="5613020302032141669">Klávesa šipka vlevo</translation> -<translation id="4971687151119236543">Média – předchozí skladba</translation> -<translation id="8602707065186045623">Soubor <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> s</translation> -<translation id="7511635910912978956">Zbývá: <ph name="NUMBER_FEW"/> hod</translation> -<translation id="8717309436826820190">další oznámení služby <ph name="SOURCE_OF_NOTIFICATIONS"/> (<ph name="NUMBER_OF_NOTIFICATIONS"/>)</translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Zrušit</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Klávesa šipka nahoru</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> hod</translation> -<translation id="3990502903496589789">Pravý okraj</translation> -<translation id="9038489124413477075">Nepojmenovaná složka</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> minut</translation> -<translation id="3520476450377425184">Zbývá: <ph name="NUMBER_MANY"/> dnů</translation> -<translation id="932327136139879170">Domů</translation> -<translation id="5600907569873192868">Zbývá: <ph name="NUMBER_MANY"/> min</translation> -<translation id="8666066831007952346">Zbývá: <ph name="NUMBER_TWO"/> dny</translation> -<translation id="6390842777729054533">Zbývá: <ph name="NUMBER_ZERO"/> s</translation> -<translation id="3909791450649380159">Vyjmou&t</translation> -<translation id="2560788951337264832">Zbývá <ph name="NUMBER_ZERO"/> minut</translation> -<translation id="688711909580084195">Nepojmenovaná webová stránka</translation> -<translation id="3353284378027041011">Před <ph name="NUMBER_FEW"/> dny</translation> -<translation id="5076340679995252485">Vložit</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Vyberte složku pro nahrávání</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">Klávesa šipka dolů</translation> -<translation id="3087734570205094154">Až dolů</translation> -<translation id="5935630983280450497">Zbývá: <ph name="NUMBER_ONE"/> min</translation> -<translation id="1860796786778352021">Zavřít oznámení</translation> -<translation id="6364916375976753737">Posuv doleva</translation> -<translation id="2629089419211541119">Před <ph name="NUMBER_ONE"/> hodinou</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> min</translation> -<translation id="6982279413068714821">před <ph name="NUMBER_DEFAULT"/> minutami</translation> -<translation id="6945221475159498467">Vybrat</translation> -<translation id="6620110761915583480">Uložit soubor</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> s</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Zbývá <ph name="NUMBER_ONE"/> minuta</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> min</translation> -<translation id="8210608804940886430">Klávesa PageDown</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> dnů</translation> -<translation id="7163503212501929773">Zbývá: <ph name="NUMBER_MANY"/> hod</translation> -<translation id="5329858601952122676">&Smazat</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> s</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> min</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">Včera</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> min</translation> -<translation id="50960180632766478">Zbývá: <ph name="NUMBER_FEW"/> min</translation> -<translation id="6659594942844771486">Karta</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523">Před <ph name="NUMBER_DEFAULT"/> dny</translation> -<translation id="8428213095426709021">Nastavení</translation> -<translation id="2497284189126895209">Všechny soubory</translation> -<translation id="7487278341251176613">Zbývají <ph name="NUMBER_TWO"/> minuty</translation> -<translation id="5110450810124758964">Před <ph name="NUMBER_ONE"/> dnem</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> s</translation> -<translation id="7814458197256864873">&Kopírovat</translation> -<translation id="3889424535448813030">Klávesa šipka vpravo</translation> -<translation id="4229495110203539533">Před <ph name="NUMBER_ONE"/> sekundou</translation> -<translation id="2544782972264605588">Zbývá: <ph name="NUMBER_DEFAULT"/> s</translation> -<translation id="6829324100069873704">Přejít zpět k oznámením</translation> -<translation id="6528179044667508675">Nerušit</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> s</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> min</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Povolit oznámení z následujících zdrojů:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> hod</translation> -<translation id="1398853756734560583">Maximalizovat</translation> -<translation id="4250229828105606438">Snímek obrazovky</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> hod</translation> -<translation id="5260878308685146029">Zbývá: <ph name="NUMBER_TWO"/> min</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">&Vybrat vše</translation> -<translation id="2168039046890040389">Klávesa PageUp</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> dnů</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> min</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> min</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">Tady není nic k vidění, rozejděte se.</translation> -<translation id="2482878487686419369">Oznámení</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Posunout sem</translation> -<translation id="4552416320897244156">Klávesa PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> hod</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> kB/s</translation> -<translation id="8394908167088220973">Média – přehrát/pozastavit</translation> -<translation id="2148716181193084225">Dnes</translation> -<translation id="7960078400008666149">Nerušit jednu hodinu</translation> -<translation id="4373894838514502496">před <ph name="NUMBER_FEW"/> minutami</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> dnů</translation> -<translation id="2190355936436201913">(prázdné)</translation> -<translation id="1164369517022005061">Zbývá: <ph name="NUMBER_DEFAULT"/> hod</translation> -<translation id="152482086482215392">Zbývá: <ph name="NUMBER_ONE"/> s</translation> -<translation id="8447116497070723931">Klávesa PgUp</translation> -<translation id="4588090240171750605">Posuv doprava</translation> -<translation id="7414887922320653780">Zbývá: <ph name="NUMBER_ONE"/> hod</translation> -<translation id="1413622004203049571">Deaktivovat oznámení ze služby <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Nahoru</translation> -<translation id="8331626408530291785">Posuv nahoru</translation> -<translation id="7907591526440419938">Otevřít soubor</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Klávesa Esc</translation> -<translation id="2797524280730715045">Před <ph name="NUMBER_DEFAULT"/> hodinami</translation> -<translation id="815598010540052116">Posuv dolů</translation> -<translation id="6808150112686056157">Média – zastavit</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Obnovit</translation> -<translation id="1243314992276662751">Nahrát</translation> -<translation id="50030952220075532">Zbývá: <ph name="NUMBER_ONE"/> den</translation> -<translation id="8179976553408161302">Začít</translation> -<translation id="945522503751344254">Odeslat zpětnou vazbu</translation> -<translation id="9170848237812810038">Z&pět</translation> -<translation id="1285266685456062655">Před <ph name="NUMBER_FEW"/> hodinami</translation> -<translation id="6918245111648057970">Povolit oznámení z následujících zdrojů pro všechny uživatele:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> s</translation> -<translation id="3994835489895548312">Zbývá <ph name="NUMBER_MANY"/> minut</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Nastavení...</translation> -<translation id="6845383723252244143">Vybrat složku</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> s</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> s</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> dnů</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> hod</translation> -<translation id="2679312662830811292">Před <ph name="NUMBER_ONE"/> minutou</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> den</translation> -<translation id="9098468523912235228">Před <ph name="NUMBER_DEFAULT"/> sekundami</translation> -<translation id="494645311413743213">Zbývá: <ph name="NUMBER_TWO"/> s</translation> -<translation id="4570886800634958009">Rozbalit oznámení</translation> -<translation id="436869212180315161">Tisk</translation> -<translation id="4860787810836767172">Před <ph name="NUMBER_FEW"/> sekundami</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> min</translation> -<translation id="1858722859751911017">Zbývají <ph name="NUMBER_FEW"/> minuty</translation> -<translation id="6040143037577758943">Zavřít</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Nápověda</translation> -<translation id="6699343763173986273">Média – další skladba</translation> -<translation id="8226233771743600312">Nerušit jeden den</translation> -<translation id="7457942297256758195">Vymazat vše</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> min</translation> -<translation id="1963692530539281474">Zbývá: <ph name="NUMBER_DEFAULT"/> dnů</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> min</translation> -<translation id="5906719743126878045">Zbývá: <ph name="NUMBER_TWO"/> hod</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> s</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> s</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> s</translation> -<translation id="3759876923365568382">Zbývá: <ph name="NUMBER_FEW"/> dnů</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Zkopírovat do schránky</translation> -<translation id="8371695176452482769">Mluvte</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Nerušit</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimalizovat</translation> -<translation id="6394627529324717982">Čárka</translation> -<translation id="3036649622769666520">Otevřít soubory</translation> -<translation id="8328145009876646418">Levý okraj</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> s</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_da.xtb b/chromium/ui/base/strings/ui_strings_da.xtb deleted file mode 100644 index 75d444e5715..00000000000 --- a/chromium/ui/base/strings/ui_strings_da.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="da"> -<translation id="4820616160060340806">Kommando+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> timer siden</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> sek. tilbage</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> sek. tilbage</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> minutter tilbage</translation> -<translation id="1801827354178857021">Periode</translation> -<translation id="1190609913194133056">Underretningcenter</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> minutter tilbage</translation> -<translation id="5613020302032141669">Venstrepil</translation> -<translation id="4971687151119236543">Medie: Forrige nummer</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> Fil (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> sek.</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> timer tilbage</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> andre fra <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Annuller</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Pil opad</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/sek.</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> timer</translation> -<translation id="3990502903496589789">Højre kant</translation> -<translation id="9038489124413477075">Unavngiven mappe</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> minutter</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> dage tilbage</translation> -<translation id="932327136139879170">Start</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> minutter tilbage</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> dage tilbage</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> sek. tilbage</translation> -<translation id="3909791450649380159">Kli&p</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minutter tilbage</translation> -<translation id="688711909580084195">Ikke-navngivet webside</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> dage siden</translation> -<translation id="5076340679995252485">&Indsæt</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Vælg den mappe, der skal uploades</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> minutter siden</translation> -<translation id="3234408098842461169">Pil nedad</translation> -<translation id="3087734570205094154">Bund</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> minutter tilbage</translation> -<translation id="1860796786778352021">Luk underretning</translation> -<translation id="6364916375976753737">Scroll Left</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> time siden</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minutter</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> minutter siden</translation> -<translation id="6945221475159498467">Vælg</translation> -<translation id="6620110761915583480">Gem fil</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> sekunder</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> minut tilbage</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> min.</translation> -<translation id="8210608804940886430">Side ned</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> dage</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> timer tilbage</translation> -<translation id="5329858601952122676">&Slet</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> sek.</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutter</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> sekunder siden</translation> -<translation id="7781829728241885113">I går</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutter</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> minutter tilbage</translation> -<translation id="6659594942844771486">Fane</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> dage siden</translation> -<translation id="8428213095426709021">Indstillinger</translation> -<translation id="2497284189126895209">Alle filer</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minutter tilbage</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> dag siden</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> sek.</translation> -<translation id="7814458197256864873">&Kopier</translation> -<translation id="3889424535448813030">Højrepil</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> sekund siden</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> sek. tilbage</translation> -<translation id="6829324100069873704">Gå tilbage til underretninger</translation> -<translation id="6528179044667508675">Vil ikke forstyrres</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> sekunder</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> minutter</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Tillad underretninger fra følgende:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> timer</translation> -<translation id="1398853756734560583">Maksimer</translation> -<translation id="4250229828105606438">Skærmbillede</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> timer</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> minutter tilbage</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Vælg &alle</translation> -<translation id="2168039046890040389">Side op</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> dage</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> minutter</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minut</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> sekunder siden</translation> -<translation id="4927753642311223124">Der er intet at se her, så du kan bare gå videre.</translation> -<translation id="2482878487686419369">Meddelelser</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Scroll hertil</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> timer</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> kB/sek.</translation> -<translation id="8394908167088220973">Medie: Afspil/Pause</translation> -<translation id="2148716181193084225">I dag</translation> -<translation id="7960078400008666149">Vil ikke forstyrres i en time</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> minutter siden</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> dage</translation> -<translation id="2190355936436201913">(tom)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> timer tilbage</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> sek. tilbage</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Scroll til højre</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> timer tilbage</translation> -<translation id="1413622004203049571">Deaktiver underretninger fra <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Top</translation> -<translation id="8331626408530291785">Scroll Up</translation> -<translation id="7907591526440419938">Åbn fil</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> timer siden</translation> -<translation id="815598010540052116">Scroll Down</translation> -<translation id="6808150112686056157">Medie: Stop</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Gendan</translation> -<translation id="1243314992276662751">Upload</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> dage tilbage</translation> -<translation id="8179976553408161302">Start</translation> -<translation id="945522503751344254">Send feedback</translation> -<translation id="9170848237812810038">&Fortryd</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> timer siden</translation> -<translation id="6918245111648057970">Tillad underretninger fra følgende for hver bruger:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> sekund</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minutter tilbage</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> sekunder siden</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Indstillinger...</translation> -<translation id="6845383723252244143">Vælg mappe</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> sekunder</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> sek.</translation> -<translation id="5583640892426849032">Returtast</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> dage siden</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> dage</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> time</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> minut siden</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/sek.</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/>dag</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> sekunder siden</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> sek. tilbage</translation> -<translation id="4570886800634958009">Udvid underretning</translation> -<translation id="436869212180315161">Tryk</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> sekunder siden</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/sek.</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minutter</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> minutter tilbage</translation> -<translation id="6040143037577758943">Luk</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> minutter siden</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/sek.</translation> -<translation id="7649070708921625228">Hjælp</translation> -<translation id="6699343763173986273">Medie: Næste nummer</translation> -<translation id="8226233771743600312">Vil ikke forstyrres i et døgn</translation> -<translation id="7457942297256758195">Ryd alle</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> dage siden</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> minutter</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> dage tilbage</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minutter</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> timer tilbage</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> timer siden</translation> -<translation id="8400147561352026160">Skift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> sek.</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> sek.</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> sekunder</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> dage tilbage</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/sek.</translation> -<translation id="2743387203779672305">Kopiér til udklipsholderen</translation> -<translation id="8371695176452482769">Indtal nu</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Vil ikke forstyrres</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimer</translation> -<translation id="6394627529324717982">Komma</translation> -<translation id="3036649622769666520">Åbn filer</translation> -<translation id="8328145009876646418">Venstre kant</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> sekunder</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_de.xtb b/chromium/ui/base/strings/ui_strings_de.xtb deleted file mode 100644 index 87e45eafd50..00000000000 --- a/chromium/ui/base/strings/ui_strings_de.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="de"> -<translation id="4820616160060340806">Befehltaste+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Einfg</translation> -<translation id="6135826906199951471">Entf</translation> -<translation id="528468243742722775">Ende</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> Sekunden übrig</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> Sekunden übrig</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> Minuten übrig</translation> -<translation id="1801827354178857021">Punkt</translation> -<translation id="1190609913194133056">Benachrichtigungscenter</translation> -<translation id="7470933019269157899">Noch <ph name="NUMBER_DEFAULT"/> Minuten</translation> -<translation id="5613020302032141669">Linkspfeil</translation> -<translation id="4971687151119236543">Medien – vorheriger Titel</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/>-Datei (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> Sekunden</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> Stunden übrig</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> weitere von <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Abbrechen</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Aufwärtspfeil</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> Stunden</translation> -<translation id="3990502903496589789">Rechter Rand</translation> -<translation id="9038489124413477075">Unbenannter Ordner</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> Minuten</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> Tage übrig</translation> -<translation id="932327136139879170">Startseite</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> Minuten übrig</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> Tage übrig</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> Sekunden übrig</translation> -<translation id="3909791450649380159">&Ausschneiden</translation> -<translation id="2560788951337264832">Noch <ph name="NUMBER_ZERO"/> Minuten</translation> -<translation id="688711909580084195">Unbenannte Webseite</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">&Einfügen</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Ordner zum Hochladen auswählen</translation> -<translation id="4999762576397546063">Strg+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">Abwärtspfeil</translation> -<translation id="3087734570205094154">Unten</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> Minute übrig</translation> -<translation id="1860796786778352021">Benachrichtigung schließen</translation> -<translation id="6364916375976753737">Nach links blättern</translation> -<translation id="2629089419211541119">Vor <ph name="NUMBER_ONE"/> Stunde</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> Minuten</translation> -<translation id="6982279413068714821">Vor <ph name="NUMBER_DEFAULT"/> Minuten</translation> -<translation id="6945221475159498467">Auswählen</translation> -<translation id="6620110761915583480">Datei speichern</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> Sekunden</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Noch <ph name="NUMBER_ONE"/> Minute</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> Minute</translation> -<translation id="8210608804940886430">Nach unten</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> Tage</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> Stunden übrig</translation> -<translation id="5329858601952122676">&Löschen</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> Sekunden</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> Minuten</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">Gestern</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> Minuten</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> Minuten übrig</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523">Vor <ph name="NUMBER_DEFAULT"/> Tagen</translation> -<translation id="8428213095426709021">Einstellungen</translation> -<translation id="2497284189126895209">Alle Dateien</translation> -<translation id="7487278341251176613">Noch <ph name="NUMBER_TWO"/> Minuten</translation> -<translation id="5110450810124758964">Vor <ph name="NUMBER_ONE"/> Tag</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> Sekunde</translation> -<translation id="7814458197256864873">&Kopieren</translation> -<translation id="3889424535448813030">Rechtspfeil</translation> -<translation id="4229495110203539533">Vor <ph name="NUMBER_ONE"/> Sekunde</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> Sekunden übrig</translation> -<translation id="6829324100069873704">Zurück zu den Benachrichtigungen</translation> -<translation id="6528179044667508675">Nicht stören</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> Sekunden</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> Minuten</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Alle Benachrichtigungen zulassen von:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> Stunden</translation> -<translation id="1398853756734560583">Vergrößern</translation> -<translation id="4250229828105606438">Screenshot</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> Stunden</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> Minuten übrig</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">&Alles auswählen</translation> -<translation id="2168039046890040389">Nach oben</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> Tage</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> Minuten</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> Minute</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">Sie haben keine Benachrichtigungen.</translation> -<translation id="2482878487686419369">Benachrichtigungen</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Hierher blättern</translation> -<translation id="4552416320897244156">BildAb</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> Stunden</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">Medien – Wiedergabe/Pause</translation> -<translation id="2148716181193084225">Heute</translation> -<translation id="7960078400008666149">1 Stunde nicht stören</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> Tage</translation> -<translation id="2190355936436201913">(leer)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> Stunden übrig</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> Sekunde übrig</translation> -<translation id="8447116497070723931">BildAuf</translation> -<translation id="4588090240171750605">Nach rechts blättern</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> Stunde übrig</translation> -<translation id="1413622004203049571">Benachrichtigungen von <ph name="NOTIFIER_NAME"/> deaktivieren</translation> -<translation id="2666092431469916601">Oben</translation> -<translation id="8331626408530291785">Nach oben blättern</translation> -<translation id="7907591526440419938">Datei öffnen</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">Vor <ph name="NUMBER_DEFAULT"/> Stunden</translation> -<translation id="815598010540052116">Nach unten blättern</translation> -<translation id="6808150112686056157">Medien – Stopp</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Wiederherstellen</translation> -<translation id="1243314992276662751">Hochladen</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> Tag übrig</translation> -<translation id="8179976553408161302">Enter</translation> -<translation id="945522503751344254">Feedback geben</translation> -<translation id="9170848237812810038">&Rückgängig</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">Benachrichtigungen von Folgendem für jeden Nutzer zulassen:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> Sekunde</translation> -<translation id="3994835489895548312">Noch <ph name="NUMBER_MANY"/> Minuten</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Einstellungen...</translation> -<translation id="6845383723252244143">Ordner auswählen</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> Sekunden</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> Sekunden</translation> -<translation id="5583640892426849032">Rücktaste</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> Tage</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> Stunde</translation> -<translation id="2679312662830811292">Vor <ph name="NUMBER_ONE"/> Minute</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> Tag</translation> -<translation id="9098468523912235228">Vor <ph name="NUMBER_DEFAULT"/> Sekunden</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> Sekunden übrig</translation> -<translation id="4570886800634958009">Benachrichtigung anzeigen</translation> -<translation id="436869212180315161">Klicken</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> Minuten</translation> -<translation id="1858722859751911017">Noch <ph name="NUMBER_FEW"/> Minuten</translation> -<translation id="6040143037577758943">Schließen</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> Byte/s</translation> -<translation id="7649070708921625228">Hilfe</translation> -<translation id="6699343763173986273">Medien – nächster Titel</translation> -<translation id="8226233771743600312">1 Tag nicht stören</translation> -<translation id="7457942297256758195">Alle löschen</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> Minuten</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> Tage übrig</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> Minuten</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> Stunden übrig</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Umschalt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> Sekunden</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> Sekunden</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> Sekunden</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> Tage übrig</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">In Zwischenablage kopieren</translation> -<translation id="8371695176452482769">Jetzt sprechen</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Nicht stören</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Verkleinern</translation> -<translation id="6394627529324717982">Komma</translation> -<translation id="3036649622769666520">Dateien öffnen</translation> -<translation id="8328145009876646418">Linker Rand</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> Sekunden</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_el.xtb b/chromium/ui/base/strings/ui_strings_el.xtb deleted file mode 100644 index 20f6f77031a..00000000000 --- a/chromium/ui/base/strings/ui_strings_el.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="el"> -<translation id="4820616160060340806">Εντολή+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798">Πριν από <ph name="NUMBER_MANY"/> ώρες</translation> -<translation id="6310545596129886942">Υπολείπονται <ph name="NUMBER_FEW"/> δευτερόλεπτα</translation> -<translation id="9213479837033539041">Υπολείπονται <ph name="NUMBER_MANY"/> δευτερόλεπτα</translation> -<translation id="1209866192426315618">υπολείπονται <ph name="NUMBER_DEFAULT"/> λεπτά</translation> -<translation id="1801827354178857021">Τελεία</translation> -<translation id="1190609913194133056">Κέντρο ειδοποιήσεων</translation> -<translation id="7470933019269157899">Υπολείπονται <ph name="NUMBER_DEFAULT"/> λεπτά</translation> -<translation id="5613020302032141669">Αριστερό βέλος</translation> -<translation id="4971687151119236543">Προηγούμενο κομμάτι πολυμέσων</translation> -<translation id="8602707065186045623">Αρχείο <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> δευτερόλεπτα</translation> -<translation id="7511635910912978956">Υπολείπονται <ph name="NUMBER_FEW"/> ώρες</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> ακόμη από <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Ακύρωση</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> Β</translation> -<translation id="3660179305079774227">Πάνω βέλος</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> ώρες</translation> -<translation id="3990502903496589789">Δεξιά άκρη</translation> -<translation id="9038489124413477075">Φάκελος χωρίς όνομα</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> λεπτά</translation> -<translation id="3520476450377425184">Υπολείπονται <ph name="NUMBER_MANY"/> ημέρες</translation> -<translation id="932327136139879170">Αρχική σελίδα</translation> -<translation id="5600907569873192868">Υπολείπονται <ph name="NUMBER_MANY"/> λεπτά</translation> -<translation id="8666066831007952346">Υπολείπονται <ph name="NUMBER_TWO"/> ημέρες</translation> -<translation id="6390842777729054533">Υπολείπονται <ph name="NUMBER_ZERO"/> δευτερόλεπτα</translation> -<translation id="3909791450649380159">Απο&κοπή</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minutes left</translation> -<translation id="688711909580084195">Ιστοσελίδα χωρίς τίτλο</translation> -<translation id="3353284378027041011">Πριν από <ph name="NUMBER_FEW"/> ημέρες</translation> -<translation id="5076340679995252485">&Επικόλληση</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Επιλέξτε φάκελο για μεταφόρτωση</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016">Πριν από <ph name="NUMBER_TWO"/> λεπτά</translation> -<translation id="3234408098842461169">Κάτω βέλος</translation> -<translation id="3087734570205094154">Κάτω</translation> -<translation id="5935630983280450497">Υπολείπεται <ph name="NUMBER_ONE"/> λεπτό</translation> -<translation id="1860796786778352021">Κλείσιμο ειδοποίησης</translation> -<translation id="6364916375976753737">Κύλιση αριστερά</translation> -<translation id="2629089419211541119">Πριν από <ph name="NUMBER_ONE"/> ώρα</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> λεπτά</translation> -<translation id="6982279413068714821">Πριν από <ph name="NUMBER_DEFAULT"/> λεπτά</translation> -<translation id="6945221475159498467">Επιλογή</translation> -<translation id="6620110761915583480">Αποθήκευση Αρχείου</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> δευτερόλεπτα</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Υπολείπεται <ph name="NUMBER_ONE"/> λεπτό</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> λεπτό</translation> -<translation id="8210608804940886430">Επόμενη σελίδα</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> ημέρες</translation> -<translation id="7163503212501929773">Υπολείπονται <ph name="NUMBER_MANY"/> ώρες</translation> -<translation id="5329858601952122676">&Διαγραφή</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> δευτερόλεπτα</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> λεπτά</translation> -<translation id="7275974018215686543">Πριν από <ph name="NUMBER_MANY"/> δευτερόλεπτα</translation> -<translation id="7781829728241885113">Χθες</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> λεπτά</translation> -<translation id="50960180632766478">Υπολείπονται <ph name="NUMBER_FEW"/> λεπτά</translation> -<translation id="6659594942844771486">Καρτέλα</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523">Πριν από <ph name="NUMBER_DEFAULT"/> ημέρες</translation> -<translation id="8428213095426709021">Ρυθμίσεις</translation> -<translation id="2497284189126895209">Όλα τα αρχεία</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minutes left</translation> -<translation id="5110450810124758964">Πριν από <ph name="NUMBER_ONE"/> ημέρα</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> δευτερόλεπτο</translation> -<translation id="7814458197256864873">&Αντιγραφή</translation> -<translation id="3889424535448813030">Δεξιό βέλος</translation> -<translation id="4229495110203539533">Πριν από <ph name="NUMBER_ONE"/> δευτερόλεπτο</translation> -<translation id="2544782972264605588">Υπολείπονται <ph name="NUMBER_DEFAULT"/> δευτερόλεπτα</translation> -<translation id="6829324100069873704">Επιστροφή στις ειδοποιήσεις</translation> -<translation id="6528179044667508675">Μην ενοχλείτε</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> δευτερόλεπτα</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> λεπτά</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Να επιτρέπονται ειδοποιήσεις από:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> ώρες</translation> -<translation id="1398853756734560583">Μεγιστοποίηση</translation> -<translation id="4250229828105606438">Στιγμιότυπο οθόνης</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> ώρες</translation> -<translation id="5260878308685146029">Υπολείπονται <ph name="NUMBER_TWO"/> λεπτά</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Επιλογή όλ&ων</translation> -<translation id="2168039046890040389">Προηγούμενη σελίδα</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> ημέρες</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> λεπτά</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> λεπτό</translation> -<translation id="8448317557906454022">Πριν από <ph name="NUMBER_ZERO"/> δευτερόλεπτα</translation> -<translation id="4927753642311223124">Δεν υπάρχει τίποτα να δείτε εδώ, συνεχίστε με αυτό που κάνατε.</translation> -<translation id="2482878487686419369">Ειδοποιήσεις</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Κύλιση εδώ</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">Πλήκτρο F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> ώρες</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">Αναπαραγωγή/παύση πολυμέσων</translation> -<translation id="2148716181193084225">Σήμερα</translation> -<translation id="7960078400008666149">Μην ενοχλείτε για μία ώρα</translation> -<translation id="4373894838514502496">Πριν από <ph name="NUMBER_FEW"/> λεπτά</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> ημέρες</translation> -<translation id="2190355936436201913">(κενό)</translation> -<translation id="1164369517022005061">Υπολείπονται <ph name="NUMBER_DEFAULT"/> ώρες</translation> -<translation id="152482086482215392">Υπολείπεται <ph name="NUMBER_ONE"/> δευτερόλεπτο</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Κύλιση δεξιά</translation> -<translation id="7414887922320653780">Υπολείπεται <ph name="NUMBER_ONE"/> ώρα</translation> -<translation id="1413622004203049571">Απενεργοποίηση ειδοποιήσεων από <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Κορυφή</translation> -<translation id="8331626408530291785">Κύλιση επάνω</translation> -<translation id="7907591526440419938">Άνοιγμα Αρχείου</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">Πριν από <ph name="NUMBER_DEFAULT"/> ώρες</translation> -<translation id="815598010540052116">Κύλιση κάτω</translation> -<translation id="6808150112686056157">Διακοπή πολυμέσων</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Επαναφορά</translation> -<translation id="1243314992276662751">Μεταφόρτωση</translation> -<translation id="50030952220075532">Υπολείπεται <ph name="NUMBER_ONE"/> ημέρα</translation> -<translation id="8179976553408161302">Είσοδος</translation> -<translation id="945522503751344254">Αποστολή σχολίων</translation> -<translation id="9170848237812810038">Αναί&ρεση</translation> -<translation id="1285266685456062655">Πριν από <ph name="NUMBER_FEW"/> ώρες</translation> -<translation id="6918245111648057970">Να επιτρέπονται οι ειδοποιήσεις από τις παρακάτω πηγές για κάθε χρήστη:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> δευτερόλεπτο</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minutes left</translation> -<translation id="6358975074282722691">Πριν από <ph name="NUMBER_TWO"/> δευτερόλεπτα</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Ρυθμίσεις...</translation> -<translation id="6845383723252244143">Επιλογή Φακέλου</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> δευτερόλεπτα</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> δευτερόλεπτα</translation> -<translation id="5583640892426849032">Πλήκτρο Backspace</translation> -<translation id="5263972071113911534">Πριν από <ph name="NUMBER_MANY"/> ημέρες</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> ημέρες</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> ώρα</translation> -<translation id="2679312662830811292">Πριν από <ph name="NUMBER_ONE"/> λεπτό</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> ημέρα</translation> -<translation id="9098468523912235228">Πριν από <ph name="NUMBER_DEFAULT"/> δευτερόλεπτα</translation> -<translation id="494645311413743213">Υπολείπονται <ph name="NUMBER_TWO"/> δευτερόλεπτα</translation> -<translation id="4570886800634958009">Επέκταση ειδοποίησης</translation> -<translation id="436869212180315161">Πιέστε</translation> -<translation id="4860787810836767172">Πριν από <ph name="NUMBER_FEW"/> δευτερόλεπτα</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> λεπτά</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> minutes left</translation> -<translation id="6040143037577758943">Κλείσιμο</translation> -<translation id="1101671447232096497">Πριν από <ph name="NUMBER_MANY"/> λεπτά</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Βοήθεια</translation> -<translation id="6699343763173986273">Επόμενο κομμάτι πολυμέσων</translation> -<translation id="8226233771743600312">Μην ενοχλείτε για μία ημέρα</translation> -<translation id="7457942297256758195">Εκκαθάριση όλων</translation> -<translation id="822618367988303761">Πριν από <ph name="NUMBER_TWO"/> ημέρες</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> λεπτά</translation> -<translation id="1963692530539281474">Υπολείπονται <ph name="NUMBER_DEFAULT"/> ημέρες</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> λεπτά</translation> -<translation id="5906719743126878045">Υπολείπονται <ph name="NUMBER_TWO"/> ώρες</translation> -<translation id="8959208747503200525">Πριν από <ph name="NUMBER_TWO"/> ώρες</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> δευτερόλεπτα</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> δευτερόλεπτα</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> δευτερόλεπτα</translation> -<translation id="3759876923365568382">Υπολείπονται <ph name="NUMBER_FEW"/> ημέρες</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Αντιγραφή στο πρόχειρο</translation> -<translation id="8371695176452482769">Μιλήστε τώρα</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Μην ενοχλείτε</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Ελαχιστοποίηση</translation> -<translation id="6394627529324717982">Κόμμα</translation> -<translation id="3036649622769666520">Άνοιγμα Αρχείων</translation> -<translation id="8328145009876646418">Αριστερή άκρη</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> δευτερόλεπτα</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_en-GB.xtb b/chromium/ui/base/strings/ui_strings_en-GB.xtb deleted file mode 100644 index 51c81404419..00000000000 --- a/chromium/ui/base/strings/ui_strings_en-GB.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="en-GB"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> secs left</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> secs left</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> mins left</translation> -<translation id="1801827354178857021">Full Stop</translation> -<translation id="1190609913194133056">Notification Centre</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> minutes left</translation> -<translation id="5613020302032141669">Left Arrow</translation> -<translation id="4971687151119236543">Media Previous Track</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> File (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> secs</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> hours left</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> more from <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Cancel</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Up Arrow</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> hours</translation> -<translation id="3990502903496589789">Right Edge</translation> -<translation id="9038489124413477075">Unnamed Folder</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> mins</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> days left</translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> mins left</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> days left</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> secs left</translation> -<translation id="3909791450649380159">Cu&t</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minutes left</translation> -<translation id="688711909580084195">Untitled Web Page</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">&Paste</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Select Folder to Upload</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">Down Arrow</translation> -<translation id="3087734570205094154">Bottom</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> min left</translation> -<translation id="1860796786778352021">Notification close</translation> -<translation id="6364916375976753737">Scroll Left</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> hour ago</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minutes</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> mins ago</translation> -<translation id="6945221475159498467">Select</translation> -<translation id="6620110761915583480">Save File</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> seconds</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> minute left</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> min</translation> -<translation id="8210608804940886430">Page Down</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> days</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> hours left</translation> -<translation id="5329858601952122676">&Delete</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> secs</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">Yesterday</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutes</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> mins left</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> days ago</translation> -<translation id="8428213095426709021">Settings</translation> -<translation id="2497284189126895209">All Files</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minutes left</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> day ago</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> sec</translation> -<translation id="7814458197256864873">&Copy</translation> -<translation id="3889424535448813030">Right Arrow</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> sec ago</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> secs left</translation> -<translation id="6829324100069873704">Go back to notifications</translation> -<translation id="6528179044667508675">Do not disturb</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> seconds</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> mins</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Allow notifications from the following:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> hours</translation> -<translation id="1398853756734560583">Maximise</translation> -<translation id="4250229828105606438">Screenshot</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> hours</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> mins left</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Select &all</translation> -<translation id="2168039046890040389">Page Up</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> days</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> mins</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minute</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">Nothing to see here, move along.</translation> -<translation id="2482878487686419369">Notifications</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Scroll to Here</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> hours</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">Media Play/Pause</translation> -<translation id="2148716181193084225">Today</translation> -<translation id="7960078400008666149">Do not disturb for one hour</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> days</translation> -<translation id="2190355936436201913">(empty)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> hours left</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> sec left</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Scroll Right</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> hour left</translation> -<translation id="1413622004203049571">Disable notifications from <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Top</translation> -<translation id="8331626408530291785">Scroll Up</translation> -<translation id="7907591526440419938">Open File</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> hours ago</translation> -<translation id="815598010540052116">Scroll Down</translation> -<translation id="6808150112686056157">Media Stop</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Restore</translation> -<translation id="1243314992276662751">Upload</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> day left</translation> -<translation id="8179976553408161302">Enter</translation> -<translation id="945522503751344254">Send feedback</translation> -<translation id="9170848237812810038">&Undo</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">Allow notifications from the following for each user:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> second</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minutes left</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Settings...</translation> -<translation id="6845383723252244143">Select Folder</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> seconds</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> secs</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> days</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> hour</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> min ago</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> day</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> secs ago</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> secs left</translation> -<translation id="4570886800634958009">Notification expand</translation> -<translation id="436869212180315161">Press</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minutes</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> minutes left</translation> -<translation id="6040143037577758943">Close</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Help</translation> -<translation id="6699343763173986273">Media Next Track</translation> -<translation id="8226233771743600312">Do not disturb for one day</translation> -<translation id="7457942297256758195">Clear All</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> mins</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> days left</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minutes</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> hours left</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> secs</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> secs</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> seconds</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> days left</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Copy to clipboard</translation> -<translation id="8371695176452482769">Speak now</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Do Not Disturb</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimise</translation> -<translation id="6394627529324717982">Comma</translation> -<translation id="3036649622769666520">Open Files</translation> -<translation id="8328145009876646418">Left Edge</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> seconds</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_es-419.xtb b/chromium/ui/base/strings/ui_strings_es-419.xtb deleted file mode 100644 index 464c9670186..00000000000 --- a/chromium/ui/base/strings/ui_strings_es-419.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="es-419"> -<translation id="4820616160060340806">Comando+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Insert</translation> -<translation id="6135826906199951471">Supr</translation> -<translation id="528468243742722775">Fin</translation> -<translation id="5341849548509163798">Hace <ph name="NUMBER_MANY"/> horas</translation> -<translation id="6310545596129886942">Faltan <ph name="NUMBER_FEW"/> segundos</translation> -<translation id="9213479837033539041">Faltan <ph name="NUMBER_MANY"/> segundos</translation> -<translation id="1209866192426315618">Faltan <ph name="NUMBER_DEFAULT"/> minutos</translation> -<translation id="1801827354178857021">Punto</translation> -<translation id="1190609913194133056">Centro de notificaciones</translation> -<translation id="7470933019269157899">Faltan <ph name="NUMBER_DEFAULT"/> minutos.</translation> -<translation id="5613020302032141669">Flecha izquierda</translation> -<translation id="4971687151119236543">Pista multimedia anterior</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> Archivo (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> seg.</translation> -<translation id="7511635910912978956">Faltan <ph name="NUMBER_FEW"/> horas</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> notificaciones más de <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Cancelar</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Flecha arriba</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> de MB</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> horas</translation> -<translation id="3990502903496589789">Borde derecho</translation> -<translation id="9038489124413477075">Carpeta sin nombre</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> minutos</translation> -<translation id="3520476450377425184">Faltan <ph name="NUMBER_MANY"/> días</translation> -<translation id="932327136139879170">Inicio</translation> -<translation id="5600907569873192868">Faltan <ph name="NUMBER_MANY"/> minutos</translation> -<translation id="8666066831007952346">Faltan <ph name="NUMBER_TWO"/> días</translation> -<translation id="6390842777729054533">Faltan <ph name="NUMBER_ZERO"/> segundos</translation> -<translation id="3909791450649380159">Cor&tar</translation> -<translation id="2560788951337264832">Faltan <ph name="NUMBER_ZERO"/> minutos.</translation> -<translation id="688711909580084195">Página web sin título</translation> -<translation id="3353284378027041011">Hace <ph name="NUMBER_FEW"/> días</translation> -<translation id="5076340679995252485">&Pegar</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Seleccionar carpeta para cargar</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016">Hace <ph name="NUMBER_TWO"/> minutos</translation> -<translation id="3234408098842461169">Flecha abajo</translation> -<translation id="3087734570205094154">Inferior</translation> -<translation id="5935630983280450497">Falta <ph name="NUMBER_ONE"/> minuto</translation> -<translation id="1860796786778352021">Cerrar notificación</translation> -<translation id="6364916375976753737">Desplazar hacia la izquierda</translation> -<translation id="2629089419211541119">Hace <ph name="NUMBER_ONE"/> hora</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minutos</translation> -<translation id="6982279413068714821">Hace <ph name="NUMBER_DEFAULT"/> minutos</translation> -<translation id="6945221475159498467">Seleccionar</translation> -<translation id="6620110761915583480">Guardar archivo</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> seconds</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Falta <ph name="NUMBER_ONE"/> minuto.</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> min</translation> -<translation id="8210608804940886430">Avanzar página</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> días</translation> -<translation id="7163503212501929773">Faltan <ph name="NUMBER_MANY"/> horas</translation> -<translation id="5329858601952122676">&Suprimir</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> seg.</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7275974018215686543">Hace <ph name="NUMBER_MANY"/> segundos</translation> -<translation id="7781829728241885113">Ayer</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutes</translation> -<translation id="50960180632766478">Faltan <ph name="NUMBER_FEW"/> minutos</translation> -<translation id="6659594942844771486">Pestaña</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523">Hace <ph name="NUMBER_DEFAULT"/> días</translation> -<translation id="8428213095426709021">Configuración</translation> -<translation id="2497284189126895209">Todos los archivos</translation> -<translation id="7487278341251176613">Faltan <ph name="NUMBER_TWO"/> minutos.</translation> -<translation id="5110450810124758964">Hace <ph name="NUMBER_ONE"/> día</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> segundo</translation> -<translation id="7814458197256864873">&Copiar</translation> -<translation id="3889424535448813030">Flecha derecha</translation> -<translation id="4229495110203539533">Hace <ph name="NUMBER_ONE"/> segundo</translation> -<translation id="2544782972264605588">Faltan <ph name="NUMBER_DEFAULT"/> segundos</translation> -<translation id="6829324100069873704">Volver a las notificaciones</translation> -<translation id="6528179044667508675">No molestar</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> segundos</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> minutos</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Permitir notificaciones de:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> horas</translation> -<translation id="1398853756734560583">Maximizar</translation> -<translation id="4250229828105606438">Captura de pantalla</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> horas</translation> -<translation id="5260878308685146029">Faltan <ph name="NUMBER_TWO"/> minutos</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Seleccionar &todo</translation> -<translation id="2168039046890040389">Retroceder página</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> días</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> minutos</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minuto</translation> -<translation id="8448317557906454022">Hace <ph name="NUMBER_ZERO"/> segundos</translation> -<translation id="4927753642311223124">No hay ningún elemento que mostrar.</translation> -<translation id="2482878487686419369">Notificaciones</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Desplazarse hasta aquí</translation> -<translation id="4552416320897244156">AvPág</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> horas</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">Reproducir o pausar contenido multimedia</translation> -<translation id="2148716181193084225">Hoy</translation> -<translation id="7960078400008666149">No molestar durante una hora</translation> -<translation id="4373894838514502496">Hace <ph name="NUMBER_FEW"/> minutos</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> días</translation> -<translation id="2190355936436201913">(vacío)</translation> -<translation id="1164369517022005061">Faltan <ph name="NUMBER_DEFAULT"/> horas</translation> -<translation id="152482086482215392">Falta <ph name="NUMBER_ONE"/> segundo</translation> -<translation id="8447116497070723931">RePág</translation> -<translation id="4588090240171750605">Desplazar a la derecha</translation> -<translation id="7414887922320653780">Falta <ph name="NUMBER_ONE"/> hora</translation> -<translation id="1413622004203049571">Inhabilitar notificaciones de <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Superior</translation> -<translation id="8331626408530291785">Desplazar hacia arriba</translation> -<translation id="7907591526440419938">Abrir archivo</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">Hace <ph name="NUMBER_DEFAULT"/> horas</translation> -<translation id="815598010540052116">Desplazar hacia abajo</translation> -<translation id="6808150112686056157">Detener contenido multimedia</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Restaurar</translation> -<translation id="1243314992276662751">Cargar</translation> -<translation id="50030952220075532">Falta <ph name="NUMBER_ONE"/> día</translation> -<translation id="8179976553408161302">Entrar</translation> -<translation id="945522503751344254">Enviar comentarios</translation> -<translation id="9170848237812810038">&Deshacer</translation> -<translation id="1285266685456062655">Hace <ph name="NUMBER_FEW"/> horas</translation> -<translation id="6918245111648057970">Permitir notificaciones para cada usuario de lo siguiente:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> segundo</translation> -<translation id="3994835489895548312">Faltan <ph name="NUMBER_MANY"/> minutos.</translation> -<translation id="6358975074282722691">Hace <ph name="NUMBER_TWO"/> segundos</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Configuración...</translation> -<translation id="6845383723252244143">Seleccionar carpeta</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> seconds</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> seg.</translation> -<translation id="5583640892426849032">Tecla de retroceso</translation> -<translation id="5263972071113911534">Hace <ph name="NUMBER_MANY"/> días</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> días</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> hora</translation> -<translation id="2679312662830811292">Hace <ph name="NUMBER_ONE"/> minuto</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> día</translation> -<translation id="9098468523912235228">Hace <ph name="NUMBER_DEFAULT"/> segundos</translation> -<translation id="494645311413743213">Faltan <ph name="NUMBER_TWO"/> segundos</translation> -<translation id="4570886800634958009">Ampliar notificación</translation> -<translation id="436869212180315161">Hacer clic</translation> -<translation id="4860787810836767172">Hace <ph name="NUMBER_FEW"/> segundos</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minutes</translation> -<translation id="1858722859751911017">Faltan <ph name="NUMBER_FEW"/> minutos.</translation> -<translation id="6040143037577758943">Cerrar</translation> -<translation id="1101671447232096497">Hace <ph name="NUMBER_MANY"/> minutos</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Ayuda</translation> -<translation id="6699343763173986273">Pista multimedia siguiente</translation> -<translation id="8226233771743600312">No molestar durante un día</translation> -<translation id="7457942297256758195">Borrar todo</translation> -<translation id="822618367988303761">Hace <ph name="NUMBER_TWO"/> días</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> minutos</translation> -<translation id="1963692530539281474">Faltan <ph name="NUMBER_DEFAULT"/> días</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minutes</translation> -<translation id="5906719743126878045">Faltan <ph name="NUMBER_TWO"/> horas</translation> -<translation id="8959208747503200525">Hace <ph name="NUMBER_TWO"/> horas</translation> -<translation id="8400147561352026160">Mayús+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> seg.</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> seg.</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> seconds</translation> -<translation id="3759876923365568382">Faltan <ph name="NUMBER_FEW"/> días</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Copiar al portapapeles</translation> -<translation id="8371695176452482769">Hablar ahora</translation> -<translation id="6965382102122355670">Aceptar</translation> -<translation id="7850320739366109486">No molestar</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimizar</translation> -<translation id="6394627529324717982">Coma</translation> -<translation id="3036649622769666520">Abrir archivos</translation> -<translation id="8328145009876646418">Borde izquierdo</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> seconds</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_es.xtb b/chromium/ui/base/strings/ui_strings_es.xtb deleted file mode 100644 index ce6ba133ade..00000000000 --- a/chromium/ui/base/strings/ui_strings_es.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="es"> -<translation id="4820616160060340806">Comando+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Insert</translation> -<translation id="6135826906199951471">Supr</translation> -<translation id="528468243742722775">Fin</translation> -<translation id="5341849548509163798">hace <ph name="NUMBER_MANY"/> horas</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> segundos restantes</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> segundos restantes</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> minutos restantes</translation> -<translation id="1801827354178857021">Punto</translation> -<translation id="1190609913194133056">Centro de notificaciones</translation> -<translation id="7470933019269157899">Quedan <ph name="NUMBER_DEFAULT"/> minutos</translation> -<translation id="5613020302032141669">Flecha izquierda</translation> -<translation id="4971687151119236543">Pista anterior multimedia</translation> -<translation id="8602707065186045623">Archivo <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> seg.</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> horas restantes</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> notificaciones más de <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Cancelar</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Flecha arriba</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> horas</translation> -<translation id="3990502903496589789">Borde derecho</translation> -<translation id="9038489124413477075">Carpeta sin nombre</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> minutos</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> días restantes</translation> -<translation id="932327136139879170">Inicio</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> minutos restantes</translation> -<translation id="8666066831007952346">Faltan <ph name="NUMBER_TWO"/> días</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> segundos restantes</translation> -<translation id="3909791450649380159">Cor&tar</translation> -<translation id="2560788951337264832">Quedan <ph name="NUMBER_ZERO"/> minutos</translation> -<translation id="688711909580084195">Página web sin título</translation> -<translation id="3353284378027041011">hace <ph name="NUMBER_FEW"/> días</translation> -<translation id="5076340679995252485">&Pegar</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Seleccionar una carpeta para subirla</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016">hace <ph name="NUMBER_TWO"/> minutos</translation> -<translation id="3234408098842461169">Flecha abajo</translation> -<translation id="3087734570205094154">Inferior</translation> -<translation id="5935630983280450497">Falta <ph name="NUMBER_ONE"/> minuto</translation> -<translation id="1860796786778352021">Cerrar notificación</translation> -<translation id="6364916375976753737">Desplazar hacia la izquierda</translation> -<translation id="2629089419211541119">hace <ph name="NUMBER_ONE"/> hora</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minutos</translation> -<translation id="6982279413068714821">hace <ph name="NUMBER_DEFAULT"/> minutos</translation> -<translation id="6945221475159498467">Seleccionar</translation> -<translation id="6620110761915583480">Guardar archivo</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> segundos</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Queda <ph name="NUMBER_ONE"/> minuto</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> min</translation> -<translation id="8210608804940886430">Avanzar página</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> días</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> horas restantes</translation> -<translation id="5329858601952122676">&Suprimir</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> seg.</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutos</translation> -<translation id="7275974018215686543">hace <ph name="NUMBER_MANY"/> segundos</translation> -<translation id="7781829728241885113">Ayer</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutos</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> minutos restantes</translation> -<translation id="6659594942844771486">Pestaña</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523">hace <ph name="NUMBER_DEFAULT"/> días</translation> -<translation id="8428213095426709021">Configuración</translation> -<translation id="2497284189126895209">Todos los archivos</translation> -<translation id="7487278341251176613">Quedan <ph name="NUMBER_TWO"/> minutos</translation> -<translation id="5110450810124758964">hace <ph name="NUMBER_ONE"/> día</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> segundo</translation> -<translation id="7814458197256864873">&Copiar</translation> -<translation id="3889424535448813030">Flecha derecha</translation> -<translation id="4229495110203539533">hace <ph name="NUMBER_ONE"/> segundo</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> segundos restantes</translation> -<translation id="6829324100069873704">Volver a las notificaciones</translation> -<translation id="6528179044667508675">No molestar</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> segundos</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> minutos</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Permitir notificaciones de:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> horas</translation> -<translation id="1398853756734560583">Maximizar</translation> -<translation id="4250229828105606438">Captura de pantalla</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> horas</translation> -<translation id="5260878308685146029">Faltan <ph name="NUMBER_TWO"/> minutos</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Seleccionar &todo</translation> -<translation id="2168039046890040389">Retroceder página</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> días</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> minutos</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minuto</translation> -<translation id="8448317557906454022">hace <ph name="NUMBER_ZERO"/> segundos</translation> -<translation id="4927753642311223124">Aquí no hay nada que ver, circulen...</translation> -<translation id="2482878487686419369">Notificaciones</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Desplazarse hasta aquí</translation> -<translation id="4552416320897244156">AvPág</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> horas</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">Pausar/Reproducir contenido multimedia</translation> -<translation id="2148716181193084225">Hoy</translation> -<translation id="7960078400008666149">No molestar durante una hora</translation> -<translation id="4373894838514502496">hace <ph name="NUMBER_FEW"/> minutos</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> días</translation> -<translation id="2190355936436201913">(vacío)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> horas restantes</translation> -<translation id="152482086482215392">Falta <ph name="NUMBER_ONE"/> segundo</translation> -<translation id="8447116497070723931">RePág</translation> -<translation id="4588090240171750605">Desplazar a la derecha</translation> -<translation id="7414887922320653780">Falta <ph name="NUMBER_ONE"/> hora</translation> -<translation id="1413622004203049571">Inhabilitar notificaciones de <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Superior</translation> -<translation id="8331626408530291785">Desplazar hacia arriba</translation> -<translation id="7907591526440419938">Abrir archivo</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">hace <ph name="NUMBER_DEFAULT"/> horas</translation> -<translation id="815598010540052116">Desplazar hacia abajo</translation> -<translation id="6808150112686056157">Detener contenido multimedia</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Restaurar</translation> -<translation id="1243314992276662751">Subir</translation> -<translation id="50030952220075532">Falta <ph name="NUMBER_ONE"/> día</translation> -<translation id="8179976553408161302">Entrar</translation> -<translation id="945522503751344254">Danos tu opinión</translation> -<translation id="9170848237812810038">&Deshacer</translation> -<translation id="1285266685456062655">hace <ph name="NUMBER_FEW"/> horas</translation> -<translation id="6918245111648057970">Permitir que cada usuario reciba notificaciones de:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> segundo</translation> -<translation id="3994835489895548312">Quedan <ph name="NUMBER_MANY"/> minutos</translation> -<translation id="6358975074282722691">hace <ph name="NUMBER_TWO"/> segundos</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Configuración...</translation> -<translation id="6845383723252244143">Seleccionar carpeta</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> segundos</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> seg.</translation> -<translation id="5583640892426849032">Tecla de retroceso</translation> -<translation id="5263972071113911534">hace <ph name="NUMBER_MANY"/> días</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> días</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> hora</translation> -<translation id="2679312662830811292">hace <ph name="NUMBER_ONE"/> minuto</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> día</translation> -<translation id="9098468523912235228">hace <ph name="NUMBER_DEFAULT"/> segundos</translation> -<translation id="494645311413743213">Faltan <ph name="NUMBER_TWO"/> segundos</translation> -<translation id="4570886800634958009">Ampliar notificación</translation> -<translation id="436869212180315161">Pulsar</translation> -<translation id="4860787810836767172">hace <ph name="NUMBER_FEW"/> segundos</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minutos</translation> -<translation id="1858722859751911017">Quedan <ph name="NUMBER_FEW"/> minutos</translation> -<translation id="6040143037577758943">Cerrar</translation> -<translation id="1101671447232096497">hace <ph name="NUMBER_MANY"/> minutos</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Ayuda</translation> -<translation id="6699343763173986273">Siguiente pista multimedia</translation> -<translation id="8226233771743600312">No molestar durante un día</translation> -<translation id="7457942297256758195">Borrar todo</translation> -<translation id="822618367988303761">hace <ph name="NUMBER_TWO"/> días</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> minutos</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> días restantes</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minutos</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> horas restantes</translation> -<translation id="8959208747503200525">hace <ph name="NUMBER_TWO"/> horas</translation> -<translation id="8400147561352026160">Mayús+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> seg.</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> seg.</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> segundos</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> días restantes</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Copiar al portapapeles</translation> -<translation id="8371695176452482769">Habla ahora</translation> -<translation id="6965382102122355670">Aceptar</translation> -<translation id="7850320739366109486">No molestar</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimizar</translation> -<translation id="6394627529324717982">Coma</translation> -<translation id="3036649622769666520">Abrir archivos</translation> -<translation id="8328145009876646418">Borde izquierdo</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> segundos</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_et.xtb b/chromium/ui/base/strings/ui_strings_et.xtb deleted file mode 100644 index 844f22bdc29..00000000000 --- a/chromium/ui/base/strings/ui_strings_et.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="et"> -<translation id="4820616160060340806">Käsk + <ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> tundi tagasi</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> sekundit jäänud</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> sekundit jäänud</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> minutit jäänud</translation> -<translation id="1801827354178857021">Periood</translation> -<translation id="1190609913194133056">Märguannete keskus</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> minutit on jäänud</translation> -<translation id="5613020302032141669">Vasaknool</translation> -<translation id="4971687151119236543">Meediumi eelmine lugu</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> Fail (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> sekundit</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> tundi jäänud</translation> -<translation id="8717309436826820190">Veel <ph name="NUMBER_OF_NOTIFICATIONS"/> allikast <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Tühista</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Ülesnool</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> tundi</translation> -<translation id="3990502903496589789">Parem serv</translation> -<translation id="9038489124413477075">Nimeta kaust</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> minutit</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/>päeva jäänud</translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> minutit jäänud</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> päeva jäänud</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> sekundit jäänud</translation> -<translation id="3909791450649380159">Lõ&ika</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minutit on jäänud</translation> -<translation id="688711909580084195">Nimeta veebileht</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> päeva tagasi</translation> -<translation id="5076340679995252485">&Kleebi</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Kausta valimine üleslaadimiseks</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> minutit tagasi</translation> -<translation id="3234408098842461169">Allanool</translation> -<translation id="3087734570205094154">Alaserv</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> minutit jäänud</translation> -<translation id="1860796786778352021">Märguande sulgemine</translation> -<translation id="6364916375976753737">Keri vasakule</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> tund tagasi</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minutit</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> minutit tagasi</translation> -<translation id="6945221475159498467">Vali</translation> -<translation id="6620110761915583480">Faili salvestamine</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> seconds</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> minut on jäänud</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> minut</translation> -<translation id="8210608804940886430">Lehekülje lõppu</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> päeva</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> tundi jäänud</translation> -<translation id="5329858601952122676">&Kustuta</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> sekundit</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> sekundit tagasi</translation> -<translation id="7781829728241885113">Eile</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutes</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> minutit jäänud</translation> -<translation id="6659594942844771486">Vaheleht</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> päeva tagasi</translation> -<translation id="8428213095426709021">Seaded</translation> -<translation id="2497284189126895209">Kõik failid</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minutit on jäänud</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> päev tagasi</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> sekundit</translation> -<translation id="7814458197256864873">&Kopeeri</translation> -<translation id="3889424535448813030">Paremnool</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> sekund tagasi</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> sekundit jäänud</translation> -<translation id="6829324100069873704">Tagasi märguannete juurde</translation> -<translation id="6528179044667508675">Mitte segada</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> sekundit</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> minutit</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Luba märguanded järgmistest kohtadest:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> tundi</translation> -<translation id="1398853756734560583">Maksimeeri</translation> -<translation id="4250229828105606438">Ekraanipilt</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> tundi</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> minutit jäänud</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Vali &kõik</translation> -<translation id="2168039046890040389">Lehekülje üles</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> päeva</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> minutit</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minut</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> sekundit tagasi</translation> -<translation id="4927753642311223124">Siin pole ühtegi märguannet, liikuge edasi.</translation> -<translation id="2482878487686419369">Teatised</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Keri siia</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> tundi</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> kB/s</translation> -<translation id="8394908167088220973">Meediumi esitamine/peatamine</translation> -<translation id="2148716181193084225">Täna</translation> -<translation id="7960078400008666149">Mitte segada üks tund</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> minutit tagasi</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> päeva</translation> -<translation id="2190355936436201913">(tühi)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> tundi jäänud</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> sekundit jäänud</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Keri paremale</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> tundi jäänud</translation> -<translation id="1413622004203049571">Keela märguanded: <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Üles</translation> -<translation id="8331626408530291785">Keri üles</translation> -<translation id="7907591526440419938">Faili avamine</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> tundi tagasi</translation> -<translation id="815598010540052116">Keri alla</translation> -<translation id="6808150112686056157">Meediumi peatamine</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Taasta</translation> -<translation id="1243314992276662751">Laadi üles</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> päev jäänud</translation> -<translation id="8179976553408161302">Sisestusklahv</translation> -<translation id="945522503751344254">Saada tagasisidet</translation> -<translation id="9170848237812810038">&Võta tagasi</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> tundi tagasi</translation> -<translation id="6918245111648057970">Luba järgmised märguanded iga kasutaja puhul:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> sekund</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minutit on jäänud</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> sekundit tagasi</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Seaded...</translation> -<translation id="6845383723252244143">Kausta valimine</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> seconds</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> sekundit</translation> -<translation id="5583640892426849032">Tagasilükkeklahv</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> päeva tagasi</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> päeva</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> tund</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> minut tagasi</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> päev</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> sekundit tagasi</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> sekundit jäänud</translation> -<translation id="4570886800634958009">Märguande laiendamine</translation> -<translation id="436869212180315161">Vajuta</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> sekundit tagasi</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minutes</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> minutit on jäänud</translation> -<translation id="6040143037577758943">Sule</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> minutit tagasi</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Abi</translation> -<translation id="6699343763173986273">Meediumi järgmine lugu</translation> -<translation id="8226233771743600312">Mitte segada üks päev</translation> -<translation id="7457942297256758195">Kustuta kõik</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> päeva tagasi</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> minutit</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> päeva jäänud</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minutes</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> tundi jäänud</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> tundi tagasi</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> sekundit</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> sekundit</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> seconds</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> päeva jäänud</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Kopeeri lõikelauale</translation> -<translation id="8371695176452482769">Alustage rääkimist</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Mitte segada</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimeeri</translation> -<translation id="6394627529324717982">Koma</translation> -<translation id="3036649622769666520">Failide avamine</translation> -<translation id="8328145009876646418">Vasak serv</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> seconds</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_fa.xtb b/chromium/ui/base/strings/ui_strings_fa.xtb deleted file mode 100644 index a141a6263b9..00000000000 --- a/chromium/ui/base/strings/ui_strings_fa.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="fa"> -<translation id="4820616160060340806">فرمان+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">حذف</translation> -<translation id="528468243742722775">پایان</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> secs left</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> secs left</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> دقیقه مانده</translation> -<translation id="1801827354178857021">دوره</translation> -<translation id="1190609913194133056">مرکز اعلان</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> دقیقه باقیمانده</translation> -<translation id="5613020302032141669">پیکان چپ</translation> -<translation id="4971687151119236543">آهنگ قبلی رسانه</translation> -<translation id="8602707065186045623">فایل <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> secs</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> hours left</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> مورد بیشتر از <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">لغو</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> بایت</translation> -<translation id="3660179305079774227">پیکان بالا</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> مگابایت/ثانیه</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> ساعت</translation> -<translation id="3990502903496589789">حاشیه راست</translation> -<translation id="9038489124413477075">پوشه بدون نام</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> دقیقه</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> days left</translation> -<translation id="932327136139879170">صفحهٔ اصلی</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> mins left</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> days left</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> secs left</translation> -<translation id="3909791450649380159">&برش</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> دقیقه باقیمانده</translation> -<translation id="688711909580084195">صفحهٔ وب بدون عنوان</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">&جاگذاری</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> ترابایت</translation> -<translation id="364720409959344976">انتخاب پوشه برای آپلود</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">پیکان پایین</translation> -<translation id="3087734570205094154">پایین</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> دقیقه مانده</translation> -<translation id="1860796786778352021">بستن اعلان</translation> -<translation id="6364916375976753737">پیمایش به چپ</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> ساعت قبل</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> دقیقه</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> دقیقه قبل</translation> -<translation id="6945221475159498467">انتخاب</translation> -<translation id="6620110761915583480">ذخیره کردن فایل</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> ثانیه</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> دقیقه باقیمانده</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> دقیقه</translation> -<translation id="8210608804940886430">Page Down</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> days</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> hours left</translation> -<translation id="5329858601952122676">&حذف</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> secs</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> کیلوبایت</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> دقیقه</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">دیروز</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> دقیقه</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> mins left</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> مگابایت</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> روز قبل</translation> -<translation id="8428213095426709021">تنظیمات</translation> -<translation id="2497284189126895209">همه فایلها</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> دقیقه باقیمانده</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> روز قبل</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> ثانیه</translation> -<translation id="7814458197256864873">&کپی</translation> -<translation id="3889424535448813030">پیکان راست</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> ثانیه قبل</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> ثانیه مانده</translation> -<translation id="6829324100069873704">بازگشت به اعلانها</translation> -<translation id="6528179044667508675">مزاحم نشوید</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> ثانیه</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> mins</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">اعلان موارد زیر مجاز باشد:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> hours</translation> -<translation id="1398853756734560583">بزرگ کردن</translation> -<translation id="4250229828105606438">عکس از صفحه نمایش</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> hours</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> mins left</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> گیگابایت</translation> -<translation id="1901303067676059328">انتخاب &همه</translation> -<translation id="2168039046890040389">صفحه بالا</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> روز</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> mins</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> دقیقه</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">اینجا خبری نیست، برگردید.</translation> -<translation id="2482878487686419369">اعلام ها</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">پیمایش به اینجا</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> hours</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> کیلوبایت/ثانیه</translation> -<translation id="8394908167088220973">پخش/توقف موقت رسانه</translation> -<translation id="2148716181193084225">امروز</translation> -<translation id="7960078400008666149">یک ساعت مزاحم نشوید</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> days</translation> -<translation id="2190355936436201913">(خالی)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> ساعت مانده</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> ثانیه مانده</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">پیمایش به راست</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> ساعت مانده</translation> -<translation id="1413622004203049571">غیرفعال کردن اعلانها از <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">بالا</translation> -<translation id="8331626408530291785">پیمایش به بالا</translation> -<translation id="7907591526440419938">باز کردن فایل</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> ساعت قبل</translation> -<translation id="815598010540052116">پیمایش به پایین</translation> -<translation id="6808150112686056157">توقف رسانه</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">بازیابی</translation> -<translation id="1243314992276662751">آپلود</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> روز مانده</translation> -<translation id="8179976553408161302">ورود</translation> -<translation id="945522503751344254">ارسال بازخورد</translation> -<translation id="9170848237812810038">&واگرد</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">دریافت اعلان از موارد زیر برای هر کاربر مجاز است:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> ثانیه</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> دقیقه باقیمانده</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> پتابایت</translation> -<translation id="2983818520079887040">تنظیمات...</translation> -<translation id="6845383723252244143">انتخاب پوشه</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> ثانیه</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> secs</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> days</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> ساعت</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> min ago</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> گیگابایت/ثانیه</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> روز</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> ثانیه قبل</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> secs left</translation> -<translation id="4570886800634958009">باز کردن اعلان</translation> -<translation id="436869212180315161">فشار دادن</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> ترابایت/ثانیه</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> دقیقه</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> دقیقه باقیمانده</translation> -<translation id="6040143037577758943">بستن</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> بایت/ثانیه</translation> -<translation id="7649070708921625228">راهنما</translation> -<translation id="6699343763173986273">آهنگ بعدی رسانه</translation> -<translation id="8226233771743600312">یک روز مزاحم نشوید</translation> -<translation id="7457942297256758195">پاک کردن همه</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> mins</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> روز مانده</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> دقیقه</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> hours left</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> ثانیه</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> secs</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> ثانیه</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> days left</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> پتابایت/ثانیه</translation> -<translation id="2743387203779672305">کپی در کلیپبورد</translation> -<translation id="8371695176452482769">اکنون صحبت کنید</translation> -<translation id="6965382102122355670">تأیید</translation> -<translation id="7850320739366109486">مزاحم نشوید</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">کوچک کردن</translation> -<translation id="6394627529324717982">کاما</translation> -<translation id="3036649622769666520">باز کردن فایلها</translation> -<translation id="8328145009876646418">حاشیه چپ</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> ثانیه</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_fi.xtb b/chromium/ui/base/strings/ui_strings_fi.xtb deleted file mode 100644 index febe7c38c5b..00000000000 --- a/chromium/ui/base/strings/ui_strings_fi.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="fi"> -<translation id="4820616160060340806">Command + <ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> sekuntia jäljellä</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> sekuntia jäljellä</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> minuuttia jäljellä</translation> -<translation id="1801827354178857021">Piste</translation> -<translation id="1190609913194133056">Ilmoituskeskus</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> minuuttia jäljellä</translation> -<translation id="5613020302032141669">Nuoli vas.</translation> -<translation id="4971687151119236543">Media: edellinen kappale</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/>-tiedosto (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> sekuntia</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> tuntia jäljellä</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> lisää lähteestä <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Peruuta</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> t</translation> -<translation id="3660179305079774227">Nuoli yl.</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> Mt/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> tuntia</translation> -<translation id="3990502903496589789">Oikea reuna</translation> -<translation id="9038489124413477075">Nimetön kansio</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> minuuttia</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> päivää jäljellä</translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> minuuttia jäljellä</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> päivää jäljellä</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> sekuntia jäljellä</translation> -<translation id="3909791450649380159">L&eikkaa</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minutes left</translation> -<translation id="688711909580084195">Nimetön verkkosivu</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">&Liitä</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> Tt</translation> -<translation id="364720409959344976">Valitse lähetettävä kansio</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">Nuoli al.</translation> -<translation id="3087734570205094154">Alaosa</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> minuuttia jäljellä</translation> -<translation id="1860796786778352021">Ilmoitus sulje</translation> -<translation id="6364916375976753737">Vieritä vasemmalle</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> tunti sitten</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minuuttia</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> minuuttia sitten</translation> -<translation id="6945221475159498467">Valitse</translation> -<translation id="6620110761915583480">Tallenna tiedosto</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> sekuntia</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> minuutti jäljellä</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> minuuttia</translation> -<translation id="8210608804940886430">Sivu alas</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> päivää</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> tuntia jäljellä</translation> -<translation id="5329858601952122676">&Poista</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> sekuntia</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> kt</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">Eilen</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutes</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> minuuttia jäljellä</translation> -<translation id="6659594942844771486">Välilehti</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> Mt</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> päivää sitten</translation> -<translation id="8428213095426709021">Asetukset</translation> -<translation id="2497284189126895209">Kaikki tiedostot</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minutes left</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> päivä sitten</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> sekuntia</translation> -<translation id="7814458197256864873">K&opioi</translation> -<translation id="3889424535448813030">Nuoli oik.</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> sekunti sitten</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> sekuntia jäljellä</translation> -<translation id="6829324100069873704">Palaa ilmoituksiin</translation> -<translation id="6528179044667508675">Älä häiritse</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> sekuntia</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> minuuttia</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Salli ilmoitukset seuraavista:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> tuntia</translation> -<translation id="1398853756734560583">Suurenna</translation> -<translation id="4250229828105606438">Kuvakaappaus</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> tuntia</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> minuuttia jäljellä</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> Gt</translation> -<translation id="1901303067676059328">Valitse &kaikki</translation> -<translation id="2168039046890040389">Sivu ylös</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> päivää</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> minuuttia</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minuutti</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">Täällä ei ole mitään nähtävää.</translation> -<translation id="2482878487686419369">Ilmoitukset</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Vieritä tähän</translation> -<translation id="4552416320897244156">Sivu alas</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> tuntia</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> kt/s</translation> -<translation id="8394908167088220973">Media: toista/keskeytä</translation> -<translation id="2148716181193084225">Tänään</translation> -<translation id="7960078400008666149">Älä häiritse tuntiin</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> päivää</translation> -<translation id="2190355936436201913">(tyhjä)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> tuntia jäljellä</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> sekuntia jäljellä</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Vieritä oikealle</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> tuntia jäljellä</translation> -<translation id="1413622004203049571">Poista ilmoitukset käytöstä sovellukselta <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Yleisin</translation> -<translation id="8331626408530291785">Vieritä ylös</translation> -<translation id="7907591526440419938">Avaa tiedosto</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> tuntia sitten</translation> -<translation id="815598010540052116">Vieritä alas</translation> -<translation id="6808150112686056157">Media: pysäytä</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Palauta</translation> -<translation id="1243314992276662751">Lähetä</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> päivää jäljellä</translation> -<translation id="8179976553408161302">Sisään</translation> -<translation id="945522503751344254">Lähetä palautetta</translation> -<translation id="9170848237812810038">K&umoa</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">Salli seuraavat ilmoitukset kaikilta käyttäjiltä:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> sekunti</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minutes left</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> Pt</translation> -<translation id="2983818520079887040">Asetukset...</translation> -<translation id="6845383723252244143">Valitse kansio</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> seconds</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> sekuntia</translation> -<translation id="5583640892426849032">Askelpalautin</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> päivää</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> tuntia</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> minuutti sitten</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> Gt/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> päivää</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> sekuntia sitten</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> sekuntia jäljellä</translation> -<translation id="4570886800634958009">Ilmoitus laajenna</translation> -<translation id="436869212180315161">Paina</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> Tt/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minuuttia</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> minutes left</translation> -<translation id="6040143037577758943">Sulje</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> t/s</translation> -<translation id="7649070708921625228">Ohje</translation> -<translation id="6699343763173986273">Media: seuraava kappale</translation> -<translation id="8226233771743600312">Älä häiritse päivään</translation> -<translation id="7457942297256758195">Tyhjennä kaikki</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> minuuttia</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> päivää jäljellä</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minutes</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> tuntia jäljellä</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> sekuntia</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> sekuntia</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> seconds</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> päivää jäljellä</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> Pt/s</translation> -<translation id="2743387203779672305">Kopioi leikepöydälle</translation> -<translation id="8371695176452482769">Puhu nyt</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Älä häiritse</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Pienennä</translation> -<translation id="6394627529324717982">Pilkku</translation> -<translation id="3036649622769666520">Avaa tiedostot</translation> -<translation id="8328145009876646418">Vasen reuna</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> seconds</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_fil.xtb b/chromium/ui/base/strings/ui_strings_fil.xtb deleted file mode 100644 index c4a4d4b6cd5..00000000000 --- a/chromium/ui/base/strings/ui_strings_fil.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="fil"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">Wakas na</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> mga oras ang nakalipas</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/>nalalabing seg</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> mga natitirang segundo</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> nalalabing mga minuto</translation> -<translation id="1801827354178857021">Tuldok</translation> -<translation id="1190609913194133056">Notification Center</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> (na) minuto ang natitira</translation> -<translation id="5613020302032141669">KAliwang Arrow</translation> -<translation id="4971687151119236543">Nakaraang Track ng Media</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> File (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> segundo</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> natitirang oras</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> pa mula sa <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Kanselahin</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> (na) B</translation> -<translation id="3660179305079774227">Up Arrow</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> (na) MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> mga oras</translation> -<translation id="3990502903496589789">Tamang Lamang</translation> -<translation id="9038489124413477075">Walang Pangalan na Folder</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> mga minuto</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> mga nalalabing araw</translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> natitirang minuto</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> natitirang mga araw</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> mga natitirang segundo</translation> -<translation id="3909791450649380159">Al&isin</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minutes left</translation> -<translation id="688711909580084195">Walang Pamagat na Webpage</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> araw ang nakalipas</translation> -<translation id="5076340679995252485">&Ilagay</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> (na) TB</translation> -<translation id="364720409959344976">Pumili ng Folder na I-a-upload</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> minuto ang nakalipas</translation> -<translation id="3234408098842461169">Down Arrow</translation> -<translation id="3087734570205094154">Sa ilalim</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> natitirang minuto</translation> -<translation id="1860796786778352021">Isara ang notification</translation> -<translation id="6364916375976753737">Mag-scroll Pakaliwa</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> oras ang nakalipas</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> (na) minuto</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> minuto ang nakalipas</translation> -<translation id="6945221475159498467">Pumili</translation> -<translation id="6620110761915583480">I-save ang File</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> na segundo</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> minuto ang natitira</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> minuto</translation> -<translation id="8210608804940886430">Page Down</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> mga araw</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> mga oras na nalalabi</translation> -<translation id="5329858601952122676">&Tanggalin</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> seg</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> (na) minuto</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> segundo ang nakalipas</translation> -<translation id="7781829728241885113">Kahapon</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minuto</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> natitirang minuto</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> (na) MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> araw ang nakalipas</translation> -<translation id="8428213095426709021">Mga Setting</translation> -<translation id="2497284189126895209">Lahat ng Mga File</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minutes left</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> araw ang nakalipas</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> segundo</translation> -<translation id="7814458197256864873">&Kopyahin</translation> -<translation id="3889424535448813030">Right Arrow</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> segundo ang nakalipas</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> mga natitirang segundo</translation> -<translation id="6829324100069873704">Bumalik sa mga notification</translation> -<translation id="6528179044667508675">Huwag istorbohin</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> (na) segundo</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> minuto</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Payagan ang mga notification mula sa sumusunod:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/>mga oras</translation> -<translation id="1398853756734560583">Maximize</translation> -<translation id="4250229828105606438">Screenshot</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> mga oras</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> natitirang minuto</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> (na) GB</translation> -<translation id="1901303067676059328">Piliin ang &lahat</translation> -<translation id="2168039046890040389">Pataas</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> mga araw</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> mga minuto</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minuto</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> segundo ang nakalipas</translation> -<translation id="4927753642311223124">Walang makikita rito, magpatuloy.</translation> -<translation id="2482878487686419369">Mga Abiso</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Mag-scroll dito</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> mga oras</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">I-Play/I-Pause ang Media</translation> -<translation id="2148716181193084225">Ngayon</translation> -<translation id="7960078400008666149">Huwag istorbohin sa loob ng isang oras</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> minuto ang nakalipas</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> mga araw</translation> -<translation id="2190355936436201913">(walang laman)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> mga natitirang oras</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> natitirang segundo</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Mag-scroll Pakanan</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> natitirang oras</translation> -<translation id="1413622004203049571">I-disable ang mga notification mula sa <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Tuktok</translation> -<translation id="8331626408530291785">Mag-scroll Pataas</translation> -<translation id="7907591526440419938">Buksan ang File</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> na oras ang nakalipas</translation> -<translation id="815598010540052116">Mag-scroll Pababa</translation> -<translation id="6808150112686056157">Media Ihinto</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Ipanumbalik</translation> -<translation id="1243314992276662751">I-upload</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> natitirang araw</translation> -<translation id="8179976553408161302">Pumasok</translation> -<translation id="945522503751344254">Magpadala ng feedback...</translation> -<translation id="9170848237812810038">&I-undo</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> (na) oras ang nakalipas</translation> -<translation id="6918245111648057970">Payagan ang mga notification mula sa sumusunod para sa bawat user:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> segundo</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minutes left</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> segundo ang nakalipas</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> (na) PB</translation> -<translation id="2983818520079887040">Mga Setting...</translation> -<translation id="6845383723252244143">Piliin ang Folder</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> (na) segundo</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> seg</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> araw ang nakalipas</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> mga araw</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> oras</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> minuto ang nakalipas</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> (na) GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> araw</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> segundo ang nakalipas</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> mga natitirang segundo</translation> -<translation id="4570886800634958009">Palawakin ang notification</translation> -<translation id="436869212180315161">Pindutin</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> segundo ang nakalipas</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> (na) TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> na minuto</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> minutes left</translation> -<translation id="6040143037577758943">Isara</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> minuto ang nakalipas</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> (na) B/s</translation> -<translation id="7649070708921625228">Tulong</translation> -<translation id="6699343763173986273">Susunod na Track ng Media</translation> -<translation id="8226233771743600312">Huwag istorbohin sa loob ng isang araw</translation> -<translation id="7457942297256758195">I-clear Lahat</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> araw ang nakalipas</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> mga minuto</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> mga natitirang araw</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> (na) minuto</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> mga oras na nalalabi</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> oras ang nakalipas</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> seg</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> seg</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> (na) segundo</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> mga natitirang araw</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> (na) PB/s</translation> -<translation id="2743387203779672305">Kopyahin sa clipboard</translation> -<translation id="8371695176452482769">Magsalita ngayon</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Huwag Istorbohin</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimize</translation> -<translation id="6394627529324717982">Kuwit</translation> -<translation id="3036649622769666520">Buksan ang Mga File</translation> -<translation id="8328145009876646418">Kalwang Edge</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> segundo</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_fr.xtb b/chromium/ui/base/strings/ui_strings_fr.xtb deleted file mode 100644 index 221f0268d9a..00000000000 --- a/chromium/ui/base/strings/ui_strings_fr.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="fr"> -<translation id="4820616160060340806">Commande + <ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Insér.</translation> -<translation id="6135826906199951471">Suppr</translation> -<translation id="528468243742722775">Fin</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> secondes restantes</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> secondes restantes</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> minutes restantes</translation> -<translation id="1801827354178857021">Point</translation> -<translation id="1190609913194133056">Centre de notification</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> minutes restantes</translation> -<translation id="5613020302032141669">Gauche</translation> -<translation id="4971687151119236543">Contenu multimédia : titre précédent</translation> -<translation id="8602707065186045623">Fichier <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> secondes</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> heures restantes</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> autres notifications de <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Annuler</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> o</translation> -<translation id="3660179305079774227">Haut</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> Mo/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> heures</translation> -<translation id="3990502903496589789">Côté droit</translation> -<translation id="9038489124413477075">Dossier sans nom</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> minutes</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> jours restants</translation> -<translation id="932327136139879170">Début</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> minutes restantes</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> jours restants</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> secondes restantes</translation> -<translation id="3909791450649380159">Cou&per</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minutes left</translation> -<translation id="688711909580084195">Page Web sans titre</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">C&oller</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> To</translation> -<translation id="364720409959344976">Sélectionner le dossier d'importation</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016">il y a <ph name="NUMBER_TWO"/> minutes</translation> -<translation id="3234408098842461169">Bas</translation> -<translation id="3087734570205094154">Bas</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> minute restante</translation> -<translation id="1860796786778352021">Fermer la notification</translation> -<translation id="6364916375976753737">Défilement vers la gauche</translation> -<translation id="2629089419211541119">il y a <ph name="NUMBER_ONE"/> heure</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minutes</translation> -<translation id="6982279413068714821">il y a <ph name="NUMBER_DEFAULT"/> minutes</translation> -<translation id="6945221475159498467">Sélectionner</translation> -<translation id="6620110761915583480">Enregistrer le fichier</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> seconds</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> minute restante</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> minute</translation> -<translation id="8210608804940886430">Page suivante</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> jours</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> heures restantes</translation> -<translation id="5329858601952122676">&Supprimer</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> secondes</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> Ko</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">Hier</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutes</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> minutes restantes</translation> -<translation id="6659594942844771486">Onglet</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> Mo</translation> -<translation id="4988273303304146523">il y a <ph name="NUMBER_DEFAULT"/> jours</translation> -<translation id="8428213095426709021">Paramètres</translation> -<translation id="2497284189126895209">Tous les fichiers</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minutes left</translation> -<translation id="5110450810124758964">il y a <ph name="NUMBER_ONE"/> jour</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> seconde</translation> -<translation id="7814458197256864873">&Copier</translation> -<translation id="3889424535448813030">Droite</translation> -<translation id="4229495110203539533">il y a <ph name="NUMBER_ONE"/> seconde</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> secondes restantes</translation> -<translation id="6829324100069873704">Revenir aux notifications</translation> -<translation id="6528179044667508675">Ne pas déranger</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> secondes</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> minutes</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Autoriser les notifications des éléments suivants :</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> heures</translation> -<translation id="1398853756734560583">Agrandir</translation> -<translation id="4250229828105606438">Capture d'écran</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> heures</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> minutes restantes</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> Go</translation> -<translation id="1901303067676059328">&Tout sélectionner</translation> -<translation id="2168039046890040389">Page précédente</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> jours</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minute</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">Aucune notification</translation> -<translation id="2482878487686419369">Notifications</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Défilement jusqu'ici</translation> -<translation id="4552416320897244156">PgSuiv</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> heures</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> Ko/s</translation> -<translation id="8394908167088220973">Contenu multimédia : lecture/pause</translation> -<translation id="2148716181193084225">Aujourd'hui</translation> -<translation id="7960078400008666149">Ne pas déranger pendant une heure</translation> -<translation id="4373894838514502496">il y a <ph name="NUMBER_FEW"/> minutes</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> jours</translation> -<translation id="2190355936436201913">(vide)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> heures restantes</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> seconde restante</translation> -<translation id="8447116497070723931">PgPréc</translation> -<translation id="4588090240171750605">Défilement vers la droite</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> heure restante</translation> -<translation id="1413622004203049571">Désactiver les notifications <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">En haut</translation> -<translation id="8331626408530291785">Défilement vers le haut</translation> -<translation id="7907591526440419938">Ouvrir le fichier</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Échap</translation> -<translation id="2797524280730715045">il y a <ph name="NUMBER_DEFAULT"/> heures</translation> -<translation id="815598010540052116">Défilement vers le bas</translation> -<translation id="6808150112686056157">Contenu multimédia : arrêt</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Restaurer</translation> -<translation id="1243314992276662751">Importer</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> jour restant</translation> -<translation id="8179976553408161302">Entrer</translation> -<translation id="945522503751344254">Envoyer le commentaire</translation> -<translation id="9170848237812810038">Ann&uler</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">Autoriser les notifications issues des éléments suivants pour chaque utilisateur :</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> seconde</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minutes left</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> Po</translation> -<translation id="2983818520079887040">Paramètres...</translation> -<translation id="6845383723252244143">Sélectionner un dossier</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> seconds</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> secondes</translation> -<translation id="5583640892426849032">Retour</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> jours</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> heure</translation> -<translation id="2679312662830811292">il y a <ph name="NUMBER_ONE"/> minute</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> Go/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> jour</translation> -<translation id="9098468523912235228">il y a <ph name="NUMBER_DEFAULT"/> secondes</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> secondes restantes</translation> -<translation id="4570886800634958009">Développer la notification</translation> -<translation id="436869212180315161">Cliquer</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> To/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minutes</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> minutes left</translation> -<translation id="6040143037577758943">Fermer</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> o/s</translation> -<translation id="7649070708921625228">Aide</translation> -<translation id="6699343763173986273">Contenu multimédia : titre suivant</translation> -<translation id="8226233771743600312">Ne pas déranger pendant un jour</translation> -<translation id="7457942297256758195">Tout effacer</translation> -<translation id="822618367988303761">il y a <ph name="NUMBER_TWO"/> jours</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> minutes</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> jours restants</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minutes</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> heures restantes</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Maj+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> secondes</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> secondes</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> seconds</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> jours restants</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> Po/s</translation> -<translation id="2743387203779672305">Copier dans le Presse-papier</translation> -<translation id="8371695176452482769">Parlez maintenant</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Ne pas déranger</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Réduire</translation> -<translation id="6394627529324717982">Virgule</translation> -<translation id="3036649622769666520">Ouvrir les fichiers</translation> -<translation id="8328145009876646418">Côté gauche</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> seconds</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_gu.xtb b/chromium/ui/base/strings/ui_strings_gu.xtb deleted file mode 100644 index 933abfeb3a5..00000000000 --- a/chromium/ui/base/strings/ui_strings_gu.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="gu"> -<translation id="4820616160060340806">કમાન્ડ+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">સમાપ્ત</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> સેકંડ બાકી</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> સેકન્ડ બાકી</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> મિનિટ બાકી</translation> -<translation id="1801827354178857021">અવધિ</translation> -<translation id="1190609913194133056">સૂચના કેન્દ્ર</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> મિનિટ બાકી</translation> -<translation id="5613020302032141669">ડાબો એરો</translation> -<translation id="4971687151119236543">મીડિયા પહેલાંનું ટ્રૅક</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> ફાઇલ (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> મિનિટ પહેલા</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> સેકંડ</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> કલાક બાકી</translation> -<translation id="8717309436826820190"><ph name="SOURCE_OF_NOTIFICATIONS"/> માંથી <ph name="NUMBER_OF_NOTIFICATIONS"/> વધુ</translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">રદ કરો</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> અબજ</translation> -<translation id="3660179305079774227">ઉપર એરો</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> કલાક</translation> -<translation id="3990502903496589789">જમણી કિનારી</translation> -<translation id="9038489124413477075">અનામાંકિત ફોલ્ડર</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> મિનિટ</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> દિવસ બાકી</translation> -<translation id="932327136139879170">હોમ</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> મિનિટ બાકી</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> દિવસ બાકી</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> સેકન્ડ બાકી</translation> -<translation id="3909791450649380159">કા&પો</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> મિનિટ બાકી</translation> -<translation id="688711909580084195">શીર્ષક વિનાનું વેબપૃષ્ઠ </translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">પેસ્ટ કરો</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">અપલોડ કરવા માટે ફોલ્ડર પસંદ કરો</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">નીચલો એરો</translation> -<translation id="3087734570205094154">તળિયું</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> મિનિટ બાકી</translation> -<translation id="1860796786778352021">સૂચના બંધ છે</translation> -<translation id="6364916375976753737">ડાબે સ્ક્રોલ કરો</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> hour ago</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> મિનિટ</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> mins ago</translation> -<translation id="6945221475159498467">પસંદ કરો</translation> -<translation id="6620110761915583480">ફાઇલ સાચવો</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> સેકંડ</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> કલાક</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> મિનિટ બાકી</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> મિનિટ</translation> -<translation id="8210608804940886430">પૃષ્ઠ નીચે</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> દિવસ</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> કલાક બાકી</translation> -<translation id="5329858601952122676">&કાઢી નાખો</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> સેકંડ</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> મિનિટ</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">ગઈ કાલે</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> મિનિટ</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> મિનિટ બાકી</translation> -<translation id="6659594942844771486">ટૅબ</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/>MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> days ago</translation> -<translation id="8428213095426709021">સેટિંગ્સ</translation> -<translation id="2497284189126895209">બધી ફાઇલો</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> મિનિટ બાકી</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> day ago</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> સેકન્ડ</translation> -<translation id="7814458197256864873">&કૉપિ કરો</translation> -<translation id="3889424535448813030">જમણો એરો</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> sec ago</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> સેકંડ બાકી</translation> -<translation id="6829324100069873704">સૂચનાઓ પર પાછા જાઓ</translation> -<translation id="6528179044667508675">ખલેલ પાડશો નહીં</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> સેકંડ</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> મિનિટ</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> કલાક બાકી</translation> -<translation id="7135556860107312402">નીચેના પરથી સૂચનાઓને મંજૂરી આપો:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> કલાક</translation> -<translation id="1398853756734560583">મોટું કરો</translation> -<translation id="4250229828105606438">સ્ક્રીનશૉટ</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> કલાક</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> મિનિટ બાકી</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">&બધા પસંદ કરો</translation> -<translation id="2168039046890040389">પૃષ્ઠ ઉપર</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> મિનિટ</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> દિવસ</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> મિનિટ્સ</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> મિનિટ</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">અહીં જોવા માટે કંઈ નથી, આગળ વધો.</translation> -<translation id="2482878487686419369">સૂચનાઓ</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> દિવસ</translation> -<translation id="3183922693828471536">અહીં સુધી સ્ક્રોલ કરો</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> કલાક</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">મીડિયા ચલાવો/થોભાવો</translation> -<translation id="2148716181193084225">આજે</translation> -<translation id="7960078400008666149">એક કલાક માટે ખલેલ પાડશો નહીં</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> દિવસ</translation> -<translation id="2190355936436201913">(ખાલી)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> કલાક બાકી</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> સેકન્ડ બાકી</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">જમણે સ્ક્રોલ કરો</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> કલાક બાકી</translation> -<translation id="1413622004203049571"><ph name="NOTIFIER_NAME"/> તરફથી સૂચનાઓ અક્ષમ કરો</translation> -<translation id="2666092431469916601">ઉપર</translation> -<translation id="8331626408530291785">ઉપર સ્ક્રોલ કરો</translation> -<translation id="7907591526440419938">ફાઇલ ખોલો</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> દિવસ બાકી</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> hours ago</translation> -<translation id="815598010540052116">નીચે સ્ક્રોલ કરો</translation> -<translation id="6808150112686056157">મીડિયા સ્ટોપ</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> મિનિટ બાકી</translation> -<translation id="3157931365184549694">પુનઃસ્થાપિત કરો</translation> -<translation id="1243314992276662751">અપલોડ કરો</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> દિવસ બાકી</translation> -<translation id="8179976553408161302">દાખલ કરો</translation> -<translation id="945522503751344254">પ્રતિસાદ મોકલો</translation> -<translation id="9170848237812810038">&પૂર્વવત્ કરો</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">દરેક વપરાશકર્તા માટે નીચેનામાંથી સૂચનાઓની પરવાનગી આપો:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> સેકંડ</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> મિનિટ બાકી</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">સેટિંગ્સ...</translation> -<translation id="6845383723252244143">ફોલ્ડર પસંદ કરો</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> સેકંડ</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> સેકંડ</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> દિવસ</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> કલાક</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> min ago</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> કલાક પહેલા</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> દિવસ</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> secs ago</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> સેકન્ડ બાકી</translation> -<translation id="4570886800634958009">સૂચના વિસ્તૃત છે</translation> -<translation id="436869212180315161">દબાવો</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> મિનિટ</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> મિનિટ બાકી</translation> -<translation id="6040143037577758943">બંધ કરો</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">સહાય</translation> -<translation id="6699343763173986273">મીડિયા આગલો ટ્રૅક</translation> -<translation id="8226233771743600312">એક દિવસ માટે ખલેલ પાડશો નહીં</translation> -<translation id="7457942297256758195">બધું સાફ કરો</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> મિનિટ</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> દિવસ બાકી</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> મિનિટ</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> કલાક બાકી</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> સેકંડ</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> સેકંડ</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> સેકંડ</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> દિવસ બાકી</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">ક્લિપબોર્ડ પર કૉપિ કરો</translation> -<translation id="8371695176452482769">હવે બોલો</translation> -<translation id="6965382102122355670">ઓકે</translation> -<translation id="7850320739366109486">ખલેલ પાડશો નહીં</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> દિવસ પહેલા</translation> -<translation id="5941711191222866238">નાનું કરો</translation> -<translation id="6394627529324717982">અલ્પવિરામ</translation> -<translation id="3036649622769666520">ફાઇલો ખોલો</translation> -<translation id="8328145009876646418">ડાબી કિનારી</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> સેકંડ</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_hi.xtb b/chromium/ui/base/strings/ui_strings_hi.xtb deleted file mode 100644 index b4da3a7514b..00000000000 --- a/chromium/ui/base/strings/ui_strings_hi.xtb +++ /dev/null @@ -1,194 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="hi"> -<translation id="4820616160060340806">आदेश+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">समाप्त</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> घंटे पहले</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> secs left</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> secs left</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> mins left</translation> -<translation id="1801827354178857021">अवधि</translation> -<translation id="1190609913194133056">सूचना केंद्र</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> मिनट शेष</translation> -<translation id="5613020302032141669">बायां तीर</translation> -<translation id="4971687151119236543">मीडिया पिछला ट्रैक</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> फ़ाइल (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> सेकंड</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> hours left</translation> -<translation id="8717309436826820190"><ph name="SOURCE_OF_NOTIFICATIONS"/> से <ph name="NUMBER_OF_NOTIFICATIONS"/> और हैं</translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">रद्द करें</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> बाइट</translation> -<translation id="3660179305079774227">ऊपर तीर</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> घंटे</translation> -<translation id="3990502903496589789">दायां सिरा</translation> -<translation id="9038489124413477075">अनाम फ़ोल्डर</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> मिनट</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> days left</translation> -<translation id="932327136139879170">मुख्यपृष्ठ</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> mins left</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> days left</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> secs left</translation> -<translation id="3909791450649380159">&काटें</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> मिनट शेष</translation> -<translation id="688711909580084195">शीर्षक-रहित वेबपृष्ठ</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> दिन पहले</translation> -<translation id="5076340679995252485">&चिपकाएं</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">अपलोड करने के लिए फ़ोल्डर चुनें</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">नीचे तीर</translation> -<translation id="3087734570205094154">नीचे</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> मिनट शेष</translation> -<translation id="1860796786778352021">सूचना बंद करें</translation> -<translation id="6364916375976753737">बाएं स्क्रॉल करें</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> घंटे पहले</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> मिनट</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> mins ago</translation> -<translation id="6945221475159498467">चुनें</translation> -<translation id="6620110761915583480">फ़ाइल सहेजें</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> सेकंड</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> घंटे</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> मिनट शेष</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> मिनट</translation> -<translation id="8210608804940886430">Page Down</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> दिन</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> hours left</translation> -<translation id="5329858601952122676">&हटाएं</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> सेकंड</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> मिनट</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> सेकंड पहले</translation> -<translation id="7781829728241885113">बीता कल</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> मिनट</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> mins left</translation> -<translation id="6659594942844771486">टैब</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> दिन पहले</translation> -<translation id="8428213095426709021">सेटिंग</translation> -<translation id="2497284189126895209">सभी फ़ाइलें</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> मिनट शेष</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> दिन पहले</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> सेकंड</translation> -<translation id="7814458197256864873">&प्रतिलिपि बनाएं</translation> -<translation id="3889424535448813030">दायां तीर</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> सेकंड पहले -</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> सेकंड शेष</translation> -<translation id="6829324100069873704">सूचनाओं पर वापस जाएं</translation> -<translation id="6528179044667508675">परेशान न करें</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> सेकंड</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> मिनट</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">निम्न से आने वाली सूचनाओं की अनुमति दें:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> घंटे</translation> -<translation id="1398853756734560583">बड़ा करें</translation> -<translation id="4250229828105606438">स्क्रीनशॉट</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> घंटे</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> mins left</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">&सभी को चुनें</translation> -<translation id="2168039046890040389">पृष्ठ ऊपर</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> मिनट</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> दिन</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> मिनट</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> मिनट</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">यहां देखने के लिए कुछ भी नहीं है, आगे चलें.</translation> -<translation id="2482878487686419369">अधिसूचनाएं</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> दिन</translation> -<translation id="3183922693828471536">यहां तक स्क्रॉल करें</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> घंटे</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">मीडिया चलाएं/रोकें</translation> -<translation id="2148716181193084225">आज</translation> -<translation id="7960078400008666149">एक घंटे तक परेशान न करें</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> दिन</translation> -<translation id="2190355936436201913">(खाली)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> hours left</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> सेकंड शेष</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">दाएं स्क्रॉल करें</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> घंटे शेष</translation> -<translation id="1413622004203049571"><ph name="NOTIFIER_NAME"/> से सूचनाएं अक्षम करें</translation> -<translation id="2666092431469916601">शीर्ष</translation> -<translation id="8331626408530291785">ऊपर स्क्रॉल करें</translation> -<translation id="7907591526440419938">फ़ाइल खोलें</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> घंटे पहले</translation> -<translation id="815598010540052116">नीचे स्क्रॉल करें</translation> -<translation id="6808150112686056157">मीडिया रोकें</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">पुनर्स्थापित करें</translation> -<translation id="1243314992276662751">अपलोड करें</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> दिन शेष</translation> -<translation id="8179976553408161302">प्रविष्ट करें</translation> -<translation id="945522503751344254">सुझाव भेजें</translation> -<translation id="9170848237812810038">&पूर्ववत् करें</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> घंटे पहले</translation> -<translation id="6918245111648057970">प्रत्येक उपयोगकर्ता के लिए निम्न में से सूचनाओं की अनुमति दें:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> सेकंड</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> मिनट शेष</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">सेटिंग...</translation> -<translation id="6845383723252244143">फ़ोल्डर को चुनें</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> सेकंड</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> सेकंड</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> दिन पहले</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> दिन</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/>घंटा</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> मिनट पहले -</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> घंटे पहले</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> दिन</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> सेकंड पहले</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> secs left</translation> -<translation id="4570886800634958009">सूचना विस्तार</translation> -<translation id="436869212180315161">दबाएं</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> मिनट</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> मिनट शेष</translation> -<translation id="6040143037577758943">बंद करें</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">सहायता</translation> -<translation id="6699343763173986273">मीडिया अगला ट्रैक</translation> -<translation id="8226233771743600312">एक दिन तक परेशान न करें</translation> -<translation id="7457942297256758195">सभी साफ़ करें</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> दिन पहले</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> मिनट</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> days left</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> मिनट</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> hours left</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> घंटे पहले</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> सेकंड</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> सेकंड</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> सेकंड</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> days left</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">क्लिपबोर्ड पर प्रतिलिपि बनाएं</translation> -<translation id="8371695176452482769">अब बोलें</translation> -<translation id="6965382102122355670">ठीक</translation> -<translation id="7850320739366109486">परेशान न करें</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> दिन पहले</translation> -<translation id="5941711191222866238">छोटा करें</translation> -<translation id="6394627529324717982">अल्पविराम</translation> -<translation id="3036649622769666520">फ़ाइलें खोलें</translation> -<translation id="8328145009876646418">बायां सिरा</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> सेकंड</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_hr.xtb b/chromium/ui/base/strings/ui_strings_hr.xtb deleted file mode 100644 index 9902a0c77a4..00000000000 --- a/chromium/ui/base/strings/ui_strings_hr.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="hr"> -<translation id="4820616160060340806">Naredba + <ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942">Preostalo sekundi: <ph name="NUMBER_FEW"/></translation> -<translation id="9213479837033539041">Preostalo sekundi: <ph name="NUMBER_MANY"/></translation> -<translation id="1209866192426315618">Preostalo minuta: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="1801827354178857021">Točka</translation> -<translation id="1190609913194133056">Centar za obavijesti</translation> -<translation id="7470933019269157899">Preostalo minuta: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="5613020302032141669">Strelica lijevo</translation> -<translation id="4971687151119236543">Prethodni zapis Medija</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> Datoteka (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252">Broj sekundi: <ph name="NUMBER_TWO"/></translation> -<translation id="7511635910912978956">Preostali sati: <ph name="NUMBER_FEW"/></translation> -<translation id="8717309436826820190">Još ovoliko obavijesti: <ph name="NUMBER_OF_NOTIFICATIONS"/> s usluge <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Odustani</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Strelica prema gore</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928">Broj sati: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="3990502903496589789">Desni rub</translation> -<translation id="9038489124413477075">Neimenovana mapa</translation> -<translation id="8507996248087185956">Broj minuta: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="3520476450377425184">Preostalo dana: <ph name="NUMBER_MANY"/></translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868">Preostalo minuta: <ph name="NUMBER_MANY"/></translation> -<translation id="8666066831007952346">Preostalo dana: <ph name="NUMBER_TWO"/></translation> -<translation id="6390842777729054533">Preostalo sekundi: <ph name="NUMBER_ZERO"/></translation> -<translation id="3909791450649380159">Iz&reži</translation> -<translation id="2560788951337264832">Preostalo minuta: <ph name="NUMBER_ZERO"/></translation> -<translation id="688711909580084195">Web-stranica bez naslova</translation> -<translation id="3353284378027041011">Prije <ph name="NUMBER_FEW"/> dana</translation> -<translation id="5076340679995252485">&Zalijepi</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Odabir mape za prijenos</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016">Prije <ph name="NUMBER_TWO"/> minute</translation> -<translation id="3234408098842461169">Strelica dolje</translation> -<translation id="3087734570205094154">Donji</translation> -<translation id="5935630983280450497">Preostalo minuta: <ph name="NUMBER_ONE"/></translation> -<translation id="1860796786778352021">Zatvaranje obavijesti</translation> -<translation id="6364916375976753737">Pomakni se lijevo</translation> -<translation id="2629089419211541119">Prije <ph name="NUMBER_ONE"/> sat</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minuta</translation> -<translation id="6982279413068714821">Prije <ph name="NUMBER_DEFAULT"/> minuta</translation> -<translation id="6945221475159498467">Odaberi</translation> -<translation id="6620110761915583480">Spremi datoteku</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> seconds</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Preostalo minuta: <ph name="NUMBER_ONE"/></translation> -<translation id="2953767478223974804">Broj minuta: <ph name="NUMBER_ONE"/></translation> -<translation id="8210608804940886430">Stranica prema dolje</translation> -<translation id="1572103024875503863">Broj dana: <ph name="NUMBER_MANY"/></translation> -<translation id="7163503212501929773">Preostalo sati: <ph name="NUMBER_MANY"/></translation> -<translation id="5329858601952122676">&Obriši</translation> -<translation id="8088823334188264070">Sekundi: <ph name="NUMBER_MANY"/></translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">Danas</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutes</translation> -<translation id="50960180632766478">Preostalo minuta: <ph name="NUMBER_FEW"/></translation> -<translation id="6659594942844771486">Kartica</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523">Prije <ph name="NUMBER_DEFAULT"/> dana</translation> -<translation id="8428213095426709021">Postavke</translation> -<translation id="2497284189126895209">Sve datoteke</translation> -<translation id="7487278341251176613">Preostalo minuta: <ph name="NUMBER_TWO"/></translation> -<translation id="5110450810124758964">Prije <ph name="NUMBER_ONE"/> dan</translation> -<translation id="2820806154655529776">Broj sekundi: <ph name="NUMBER_ONE"/></translation> -<translation id="7814458197256864873">&Kopiraj</translation> -<translation id="3889424535448813030">Strelica desno</translation> -<translation id="4229495110203539533">Prije <ph name="NUMBER_ONE"/> sekundu</translation> -<translation id="2544782972264605588">Preostalo sekundi: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="6829324100069873704">Natrag na obavijesti</translation> -<translation id="6528179044667508675">Ne ometaj</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> sekundi</translation> -<translation id="290555789621781773">Broj minuta: <ph name="NUMBER_TWO"/></translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Omogućite obavijesti iz sljedećih izvora:</translation> -<translation id="8112886015144590373">Broj sati: <ph name="NUMBER_FEW"/></translation> -<translation id="1398853756734560583">Maksimiziraj</translation> -<translation id="4250229828105606438">Snimka zaslona</translation> -<translation id="6690744523875189208">Broj sati: <ph name="NUMBER_TWO"/></translation> -<translation id="5260878308685146029">Preostalo minuta: <ph name="NUMBER_TWO"/></translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Odaberi &sve</translation> -<translation id="2168039046890040389">Stranica prema gore</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581">Broj dana: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="6463061331681402734">Broj minuta: <ph name="NUMBER_MANY"/></translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minuta</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">Nema nikakvih obavijesti.</translation> -<translation id="2482878487686419369">Obavijesti</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Pomakni ovdje</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401">Sati: <ph name="NUMBER_MANY"/></translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">Reproduciraj/pauziraj Medije</translation> -<translation id="2148716181193084225">Danas</translation> -<translation id="7960078400008666149">Ne ometaj jedan sat</translation> -<translation id="4373894838514502496">Prije <ph name="NUMBER_FEW"/> min</translation> -<translation id="4115153316875436289">Dana: <ph name="NUMBER_TWO"/></translation> -<translation id="2190355936436201913">(prazno)</translation> -<translation id="1164369517022005061">Preostalo sati: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="152482086482215392">Preostalo sekundi: <ph name="NUMBER_ONE"/></translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Pomakni se desno</translation> -<translation id="7414887922320653780">Preostalo sati: <ph name="NUMBER_ONE"/></translation> -<translation id="1413622004203049571">Onemogući obavijesti pošiljatelja <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Gornji</translation> -<translation id="8331626408530291785">Pomakni se gore</translation> -<translation id="7907591526440419938">Otvori datoteku</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">Prije <ph name="NUMBER_DEFAULT"/> sati</translation> -<translation id="815598010540052116">Pomakni se dolje</translation> -<translation id="6808150112686056157">Zaustavi Medije</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Vrati</translation> -<translation id="1243314992276662751">Prenesi</translation> -<translation id="50030952220075532">Preostalo dana: <ph name="NUMBER_ONE"/></translation> -<translation id="8179976553408161302">Pridružite se</translation> -<translation id="945522503751344254">Slanje povratnih informacija</translation> -<translation id="9170848237812810038">&Poništi</translation> -<translation id="1285266685456062655">Prije <ph name="NUMBER_FEW"/> sata</translation> -<translation id="6918245111648057970">Za svakog korisnika dozvoli obavijesti sljedećih usluga:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> sekunda</translation> -<translation id="3994835489895548312">Preostalo minuta: <ph name="NUMBER_MANY"/></translation> -<translation id="6358975074282722691">Prije <ph name="NUMBER_TWO"/> sekunde</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Postavke...</translation> -<translation id="6845383723252244143">Odabir mape</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> sekunde</translation> -<translation id="1095623615273566396">Broj sekundi: <ph name="NUMBER_FEW"/></translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920">Broj dana: <ph name="NUMBER_FEW"/></translation> -<translation id="5116333507878097773">Broj sati: <ph name="NUMBER_ONE"/></translation> -<translation id="2679312662830811292">Prije <ph name="NUMBER_ONE"/> minutu</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/>dan</translation> -<translation id="9098468523912235228">Prije <ph name="NUMBER_DEFAULT"/> sekundi</translation> -<translation id="494645311413743213">Preostalo sekundi <ph name="NUMBER_TWO"/></translation> -<translation id="4570886800634958009">Proširivanje obavijesti</translation> -<translation id="436869212180315161">Pritisnite</translation> -<translation id="4860787810836767172">Prije <ph name="NUMBER_FEW"/> sek</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minutes</translation> -<translation id="1858722859751911017">Preostalo minuta: <ph name="NUMBER_FEW"/></translation> -<translation id="6040143037577758943">Zatvori</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Pomoć</translation> -<translation id="6699343763173986273">Sljedeći zapis Medija</translation> -<translation id="8226233771743600312">Ne ometaj jedan dan</translation> -<translation id="7457942297256758195">Očisti sve</translation> -<translation id="822618367988303761">Prije <ph name="NUMBER_TWO"/> dana</translation> -<translation id="4745438305783437565">Broj minuta: <ph name="NUMBER_FEW"/></translation> -<translation id="1963692530539281474">Preostalo dana: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minute</translation> -<translation id="5906719743126878045">Preostalo sati: <ph name="NUMBER_TWO"/></translation> -<translation id="8959208747503200525">Prije <ph name="NUMBER_TWO"/> sata</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940">Sekundi: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="4197700912384709145">Sekundi: <ph name="NUMBER_ZERO"/></translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> seconds</translation> -<translation id="3759876923365568382">Preostalo dana: <ph name="NUMBER_FEW"/></translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Kopiraj u međuspremnik</translation> -<translation id="8371695176452482769">Govorite sad</translation> -<translation id="6965382102122355670">U redu</translation> -<translation id="7850320739366109486">Ne ometaj</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimiziraj</translation> -<translation id="6394627529324717982">Zarez</translation> -<translation id="3036649622769666520">Otvori datoteke</translation> -<translation id="8328145009876646418">Lijevi rub</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> seconds</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_hu.xtb b/chromium/ui/base/strings/ui_strings_hu.xtb deleted file mode 100644 index 3728e235a54..00000000000 --- a/chromium/ui/base/strings/ui_strings_hu.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="hu"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">Befejezés</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> másodperc van hátra</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> másodperc van hátra</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> perc van hátra</translation> -<translation id="1801827354178857021">Pont</translation> -<translation id="1190609913194133056">Értesítési központ</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> perc van hátra</translation> -<translation id="5613020302032141669">Bal nyíl</translation> -<translation id="4971687151119236543">Előző szám</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> fájl (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> másodperc</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> óra van hátra</translation> -<translation id="8717309436826820190">Még <ph name="NUMBER_OF_NOTIFICATIONS"/> a következőtől: <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Mégse</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> bájt</translation> -<translation id="3660179305079774227">Felfelé nyíl</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> óra</translation> -<translation id="3990502903496589789">Jobb sarok</translation> -<translation id="9038489124413477075">Név nélküli mappa</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> perc</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> nap van hátra</translation> -<translation id="932327136139879170">Főoldal</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> perc van hátra</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> nap van hátra</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> másodperc van hátra</translation> -<translation id="3909791450649380159">Ki&vágás</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> perc van hátra</translation> -<translation id="688711909580084195">Névtelen weboldal</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">&Beillesztés</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Mappa kiválasztása a feltöltéshez</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">Lefelé nyíl</translation> -<translation id="3087734570205094154">Alja</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> perc van hátra</translation> -<translation id="1860796786778352021">Értesítés bezárása</translation> -<translation id="6364916375976753737">Görgetés balra</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> órája</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> perc</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> perce</translation> -<translation id="6945221475159498467">Kiválasztás</translation> -<translation id="6620110761915583480">Fájl mentése</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> másodperc</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> perc van hátra</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> perc</translation> -<translation id="8210608804940886430">Page Down</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> nap</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> óra van hátra</translation> -<translation id="5329858601952122676">&Törlés</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> másodperc</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> perc</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">Tegnap</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> perc</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> perc van hátra</translation> -<translation id="6659594942844771486">Lap</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> napja</translation> -<translation id="8428213095426709021">Beállítások</translation> -<translation id="2497284189126895209">Minden fájl</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> perc van hátra</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> napja</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> másodperc</translation> -<translation id="7814458197256864873">&Másolás</translation> -<translation id="3889424535448813030">Jobb nyíl</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> másodperce</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> másodperc van hátra</translation> -<translation id="6829324100069873704">Vissza az értesítésekhez</translation> -<translation id="6528179044667508675">Ne zavarj</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> másodperc</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> perc</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Értesítések engedélyezése a következőtől:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> óra</translation> -<translation id="1398853756734560583">Teljes méret</translation> -<translation id="4250229828105606438">Képernyőkép</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> óra</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> perc van hátra</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Össz&es kiválasztása</translation> -<translation id="2168039046890040389">Oldal fel</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> nap</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> perc</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> perc</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">Itt nincs semmi, továbbmehet.</translation> -<translation id="2482878487686419369">Értesítések</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Görgessen ide</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> óra</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> kB/s</translation> -<translation id="8394908167088220973">Lejátszás/szüneteltetés</translation> -<translation id="2148716181193084225">Ma</translation> -<translation id="7960078400008666149">Ne zavarj egy óráig</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> nap</translation> -<translation id="2190355936436201913">(üres)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> óra van hátra</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> másodperc van hátra</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Görgetés jobbra</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> óra van hátra</translation> -<translation id="1413622004203049571">A(z) <ph name="NOTIFIER_NAME"/> értesítéseinek kikapcsolása</translation> -<translation id="2666092431469916601">Felülre</translation> -<translation id="8331626408530291785">Görgetés felfelé</translation> -<translation id="7907591526440419938">Fájl megnyitása</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> órája</translation> -<translation id="815598010540052116">Görgetés lefelé</translation> -<translation id="6808150112686056157">Leállítás</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Visszaállítás</translation> -<translation id="1243314992276662751">Feltöltés</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> nap van hátra</translation> -<translation id="8179976553408161302">Belépés</translation> -<translation id="945522503751344254">Visszajelzés küldése</translation> -<translation id="9170848237812810038">&Visszavonás</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">Értesítések engedélyezése mindegyik felhasználónak a következőtől:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> másodperc</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> perc van hátra</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Beállítások...</translation> -<translation id="6845383723252244143">Mappa választása</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> másodperc</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> másodperc</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> nap</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> óra</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> perce</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> nap</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> másodperce</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> másodperc van hátra.</translation> -<translation id="4570886800634958009">Értesítés kibontása</translation> -<translation id="436869212180315161">Sajtó</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> perc</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> perc van hátra</translation> -<translation id="6040143037577758943">Bezárás</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Súgó</translation> -<translation id="6699343763173986273">Következő szám</translation> -<translation id="8226233771743600312">Ne zavarj egy napig</translation> -<translation id="7457942297256758195">Összes törlése</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> perc</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> nap van hátra</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> perc</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> óra van hátra</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> másodperc</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> másodperc</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> másodperc</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> nap van hátra</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Másolás a vágólapra</translation> -<translation id="8371695176452482769">Most beszéljen</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Ne zavarj</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Kicsinyítés</translation> -<translation id="6394627529324717982">Vessző</translation> -<translation id="3036649622769666520">Fájlok megnyitása</translation> -<translation id="8328145009876646418">Bal sarok</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> másodperc</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_id.xtb b/chromium/ui/base/strings/ui_strings_id.xtb deleted file mode 100644 index 3b382e49c6e..00000000000 --- a/chromium/ui/base/strings/ui_strings_id.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="id"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">Berakhir</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> jam yang lalu</translation> -<translation id="6310545596129886942">Tersisa <ph name="NUMBER_FEW"/> detik</translation> -<translation id="9213479837033539041">Tersisa <ph name="NUMBER_MANY"/> detik</translation> -<translation id="1209866192426315618">Tersisa <ph name="NUMBER_DEFAULT"/> menit</translation> -<translation id="1801827354178857021">Titik</translation> -<translation id="1190609913194133056">Pusat Pemberitahuan</translation> -<translation id="7470933019269157899">Tersisa <ph name="NUMBER_DEFAULT"/> menit</translation> -<translation id="5613020302032141669">Panah Kiri</translation> -<translation id="4971687151119236543">Lacak Media Sebelumnya</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> File (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> detik</translation> -<translation id="7511635910912978956">Tersisa <ph name="NUMBER_FEW"/> jam</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> lainnya dari <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Batal</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Panah Atas</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/dtk</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> jam</translation> -<translation id="3990502903496589789">Tepi Kanan</translation> -<translation id="9038489124413477075">Folder Tanpa Nama</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> menit</translation> -<translation id="3520476450377425184">Tersisa <ph name="NUMBER_MANY"/> hari</translation> -<translation id="932327136139879170">Beranda</translation> -<translation id="5600907569873192868">Tersisa <ph name="NUMBER_MANY"/> menit</translation> -<translation id="8666066831007952346">Tersisa <ph name="NUMBER_TWO"/> hari</translation> -<translation id="6390842777729054533">Tersisa <ph name="NUMBER_ZERO"/> detik</translation> -<translation id="3909791450649380159">Po&tong</translation> -<translation id="2560788951337264832">Tersisa <ph name="NUMBER_ZERO"/> menit</translation> -<translation id="688711909580084195">Laman Web Tanpa Judul</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> hari yang lalu</translation> -<translation id="5076340679995252485">Tem&pel</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Pilih Folder untuk Diunggah</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mnt. yang lalu</translation> -<translation id="3234408098842461169">Panah Bawah</translation> -<translation id="3087734570205094154">Bawah</translation> -<translation id="5935630983280450497">Tersisa <ph name="NUMBER_ONE"/> menit</translation> -<translation id="1860796786778352021">Tutup pemberitahuan</translation> -<translation id="6364916375976753737">Gulir ke Kiri</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> jam yang lalu</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> menit</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> mnt. yang lalu</translation> -<translation id="6945221475159498467">Pilih</translation> -<translation id="6620110761915583480">Simpan File</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> detik</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Tersisa <ph name="NUMBER_ONE"/> menit</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> menit</translation> -<translation id="8210608804940886430">Page Down</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> hari</translation> -<translation id="7163503212501929773">Tersisa <ph name="NUMBER_MANY"/> jam</translation> -<translation id="5329858601952122676">&Hapus</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> detik</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> menit</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> dtk. yang lalu</translation> -<translation id="7781829728241885113">Kemarin</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> menit</translation> -<translation id="50960180632766478">Tersisa <ph name="NUMBER_FEW"/> menit</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> hari yang lalu</translation> -<translation id="8428213095426709021">Setelan</translation> -<translation id="2497284189126895209">Semua Jenis File</translation> -<translation id="7487278341251176613">Tersisa <ph name="NUMBER_TWO"/> menit</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> hari yang lalu</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> detik</translation> -<translation id="7814458197256864873">&Salin</translation> -<translation id="3889424535448813030">Panah Kanan</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> dtk. yang lalu</translation> -<translation id="2544782972264605588">Tersisa <ph name="NUMBER_DEFAULT"/> detik</translation> -<translation id="6829324100069873704">Kembali ke pemberitahuan</translation> -<translation id="6528179044667508675">Jangan ganggu</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> detik</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> menit</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Izinkan pemberitahuan dari yang berikut:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> jam</translation> -<translation id="1398853756734560583">Perbesar</translation> -<translation id="4250229828105606438">Tangkapan layar</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> jam</translation> -<translation id="5260878308685146029">Tersisa <ph name="NUMBER_TWO"/> menit</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Pilih semu&a</translation> -<translation id="2168039046890040389">Page Up</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> hari</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> menit</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> menit</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> dtk. yang lalu</translation> -<translation id="4927753642311223124">Tidak ada apa-apa di sini, lihat yang lain saja.</translation> -<translation id="2482878487686419369">Pemberitahuan</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Gulir ke Sini</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> jam</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/dtk</translation> -<translation id="8394908167088220973">Putar/Jeda Media</translation> -<translation id="2148716181193084225">Hari ini</translation> -<translation id="7960078400008666149">Jangan ganggu selama satu jam</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mnt. yang lalu</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> hari</translation> -<translation id="2190355936436201913">(kosong)</translation> -<translation id="1164369517022005061">Tersisa <ph name="NUMBER_DEFAULT"/> jam</translation> -<translation id="152482086482215392">Tersisa <ph name="NUMBER_ONE"/> detik</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Gulir ke Kanan</translation> -<translation id="7414887922320653780">Tersisa <ph name="NUMBER_ONE"/> jam</translation> -<translation id="1413622004203049571">Nonaktifkan pemberitahuan dari <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Atas</translation> -<translation id="8331626408530291785">Gulir ke Atas</translation> -<translation id="7907591526440419938">Buka File</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> jam yang lalu</translation> -<translation id="815598010540052116">Gulir ke Bawah</translation> -<translation id="6808150112686056157">Hentikan Media</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Pulihkan</translation> -<translation id="1243314992276662751">Unggah</translation> -<translation id="50030952220075532">Tersisa <ph name="NUMBER_ONE"/> hari</translation> -<translation id="8179976553408161302">Masuk</translation> -<translation id="945522503751344254">Kirim masukan</translation> -<translation id="9170848237812810038">&Urung</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> jam yang lalu</translation> -<translation id="6918245111648057970">Mengizinkan pemberitahuan dari yang berikut untuk tiap pengguna:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> detik</translation> -<translation id="3994835489895548312">Tersisa <ph name="NUMBER_MANY"/> menit</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> dtk. yang lalu</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Setelan...</translation> -<translation id="6845383723252244143">Pilih Folder</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> detik</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> detik</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> hari yang lalu</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> hari</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> jam</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> mnt. yang lalu</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/dtk</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> hari</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> dtk. yang lalu</translation> -<translation id="494645311413743213">Tersisa <ph name="NUMBER_TWO"/> detik</translation> -<translation id="4570886800634958009">Luaskan pemberitahuan</translation> -<translation id="436869212180315161">Tekan</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> dtk. yang lalu</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/dtk</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> menit</translation> -<translation id="1858722859751911017">Tersisa <ph name="NUMBER_FEW"/> menit</translation> -<translation id="6040143037577758943">Tutup</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mnt. yang lalu</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/dtk</translation> -<translation id="7649070708921625228">Bantuan</translation> -<translation id="6699343763173986273">Lacak Media Berikutnya</translation> -<translation id="8226233771743600312">Jangan ganggu selama satu hari</translation> -<translation id="7457942297256758195">Hapus Semua</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> hari yang lalu</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> menit</translation> -<translation id="1963692530539281474">Tersisa <ph name="NUMBER_DEFAULT"/> hari</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> menit</translation> -<translation id="5906719743126878045">Tersisa <ph name="NUMBER_TWO"/> jam</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> jam yang lalu</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> detik</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> detik</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> detik</translation> -<translation id="3759876923365568382">Tersisa <ph name="NUMBER_FEW"/> hari</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/dtk</translation> -<translation id="2743387203779672305">Salin ke papan klip</translation> -<translation id="8371695176452482769">Bicaralah sekarang</translation> -<translation id="6965382102122355670">Oke</translation> -<translation id="7850320739366109486">Jangan Ganggu</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Perkecil</translation> -<translation id="6394627529324717982">Koma</translation> -<translation id="3036649622769666520">Buka File</translation> -<translation id="8328145009876646418">Tepi Kiri</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> detik</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_it.xtb b/chromium/ui/base/strings/ui_strings_it.xtb deleted file mode 100644 index 94ca0e0dd7e..00000000000 --- a/chromium/ui/base/strings/ui_strings_it.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="it"> -<translation id="4820616160060340806">Comando+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Canc</translation> -<translation id="528468243742722775">Fine</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> ore fa</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> sec. rimanenti</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> sec. rimanenti</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> min. rimanenti</translation> -<translation id="1801827354178857021">Punto</translation> -<translation id="1190609913194133056">Centro notifiche</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> minuti rimanenti</translation> -<translation id="5613020302032141669">Freccia sinistra</translation> -<translation id="4971687151119236543">Traccia precedente contenuti multimediali</translation> -<translation id="8602707065186045623">File <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> sec.</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> ore rimanenti</translation> -<translation id="8717309436826820190">Altre <ph name="NUMBER_OF_NOTIFICATIONS"/> da <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Annulla</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Freccia SU</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> ore</translation> -<translation id="3990502903496589789">Margine destro</translation> -<translation id="9038489124413477075">Cartella senza nome</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> min.</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> giorni rimanenti</translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> min. rimanenti</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> giorni rimanenti</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> sec. rimanenti</translation> -<translation id="3909791450649380159">T&aglia</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minutes left</translation> -<translation id="688711909580084195">Pagina web senza titolo</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> giorni fa</translation> -<translation id="5076340679995252485">&Incolla</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Seleziona la cartella da caricare</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> minuti fa</translation> -<translation id="3234408098842461169">Freccia GIÙ</translation> -<translation id="3087734570205094154">In basso</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> min. rimanente</translation> -<translation id="1860796786778352021">Chiusura notifica</translation> -<translation id="6364916375976753737">Scorri a sinistra</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> ora fa</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minuti</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> minuti fa</translation> -<translation id="6945221475159498467">Seleziona</translation> -<translation id="6620110761915583480">Salva file</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> secondi</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> minuto rimanente</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> min.</translation> -<translation id="8210608804940886430">Pagina giù</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> giorni</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> ore rimanenti</translation> -<translation id="5329858601952122676">&Elimina</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> sec.</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secondi fa</translation> -<translation id="7781829728241885113">Ieri</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutes</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> min. rimanenti</translation> -<translation id="6659594942844771486">TAB</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> giorni fa</translation> -<translation id="8428213095426709021">Impostazioni</translation> -<translation id="2497284189126895209">Tutti i file</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minutes left</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> giorno fa</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> sec.</translation> -<translation id="7814458197256864873">&Copia</translation> -<translation id="3889424535448813030">Freccia destra</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> secondo fa</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> sec. rimanenti</translation> -<translation id="6829324100069873704">Torna alle notifiche</translation> -<translation id="6528179044667508675">Non disturbare</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> secondi</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> min.</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Consenti notifiche da:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> ore</translation> -<translation id="1398853756734560583">Ingrandisci</translation> -<translation id="4250229828105606438">Screenshot</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> ore</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> min. rimanenti</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Seleziona &tutto</translation> -<translation id="2168039046890040389">Pagina su</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> giorni</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> min.</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minuto</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secondi fa</translation> -<translation id="4927753642311223124">Nessuna notifica.</translation> -<translation id="2482878487686419369">Notifiche</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Scorri fino a qui</translation> -<translation id="4552416320897244156">PGGIÙ</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> ore</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> kB/s</translation> -<translation id="8394908167088220973">Play/Pausa contenuti multimediali</translation> -<translation id="2148716181193084225">Oggi</translation> -<translation id="7960078400008666149">Non disturbare per un'ora</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> minuti fa</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> giorni</translation> -<translation id="2190355936436201913">(vuoto)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> ore rimanenti</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> sec. rimanente</translation> -<translation id="8447116497070723931">PGSU</translation> -<translation id="4588090240171750605">Scorri a destra</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> ora rimanente</translation> -<translation id="1413622004203049571">Disabilita notifiche da <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">In alto</translation> -<translation id="8331626408530291785">Scorri verso l'alto</translation> -<translation id="7907591526440419938">Apri file</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> ore fa</translation> -<translation id="815598010540052116">Scorri verso il basso</translation> -<translation id="6808150112686056157">Interrompi contenuti multimediali</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Ripristina</translation> -<translation id="1243314992276662751">Carica</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> giorno rimanente</translation> -<translation id="8179976553408161302">Invia</translation> -<translation id="945522503751344254">Invia feedback</translation> -<translation id="9170848237812810038">&Annulla</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> ore fa</translation> -<translation id="6918245111648057970">Consenti a ogni utente di ricevere le notifiche di:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> secondo</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minutes left</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secondi fa</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Impostazioni...</translation> -<translation id="6845383723252244143">Seleziona cartella</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> seconds</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> sec.</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> giorni fa</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> giorni</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> ora</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> minuto fa</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> giorno</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> secondi fa</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> sec. rimanenti</translation> -<translation id="4570886800634958009">Espansione notifica</translation> -<translation id="436869212180315161">Premi</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secondi fa</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minutes</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> minutes left</translation> -<translation id="6040143037577758943">Chiudi</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> minuti fa</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Guida</translation> -<translation id="6699343763173986273">Traccia successiva contenuti multimediali</translation> -<translation id="8226233771743600312">Non disturbare per un giorno</translation> -<translation id="7457942297256758195">Cancella tutto</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> giorni fa</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> min.</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> giorni rimanenti</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minutes</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> ore rimanenti</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> ore fa</translation> -<translation id="8400147561352026160">Maiusc+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> sec.</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> sec.</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> seconds</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> giorni rimanenti</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Copia negli appunti</translation> -<translation id="8371695176452482769">Parla adesso</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Non disturbare</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Riduci a icona</translation> -<translation id="6394627529324717982">Virgola</translation> -<translation id="3036649622769666520">Apri file</translation> -<translation id="8328145009876646418">Margine sinistro</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> seconds</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_iw.xtb b/chromium/ui/base/strings/ui_strings_iw.xtb deleted file mode 100644 index 6923c75f045..00000000000 --- a/chromium/ui/base/strings/ui_strings_iw.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="iw"> -<translation id="4820616160060340806">פקודה+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798">לפני <ph name="NUMBER_MANY"/> שעות</translation> -<translation id="6310545596129886942">נותרו <ph name="NUMBER_FEW"/> שניות</translation> -<translation id="9213479837033539041">נותרו <ph name="NUMBER_MANY"/> שניות</translation> -<translation id="1209866192426315618">נותרו <ph name="NUMBER_DEFAULT"/> דקות</translation> -<translation id="1801827354178857021">נקודה</translation> -<translation id="1190609913194133056">מרכז התראות</translation> -<translation id="7470933019269157899">נותרו <ph name="NUMBER_DEFAULT"/> דקות</translation> -<translation id="5613020302032141669">חץ לשמאל</translation> -<translation id="4971687151119236543">רצועה קודמת במדיה</translation> -<translation id="8602707065186045623">קובץ <ph name="SAVEAS_EXTENSION_TYPE"/> (<ph name="SAVEAS_EXTENSION_NAME"/>.)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> שניות</translation> -<translation id="7511635910912978956">נותרו <ph name="NUMBER_FEW"/> שעות</translation> -<translation id="8717309436826820190">עוד <ph name="NUMBER_OF_NOTIFICATIONS"/> מ-<ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">ביטול</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">חץ למעלה</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> שעות</translation> -<translation id="3990502903496589789">קצה ימני</translation> -<translation id="9038489124413477075">תיקייה ללא שם</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> דקות</translation> -<translation id="3520476450377425184">נותרו <ph name="NUMBER_MANY"/> ימים</translation> -<translation id="932327136139879170">בית</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> דקות נותרו</translation> -<translation id="8666066831007952346">נותרו <ph name="NUMBER_TWO"/> ימים</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> שניות נותרו</translation> -<translation id="3909791450649380159">גז&ור</translation> -<translation id="2560788951337264832">נותרו <ph name="NUMBER_ZERO"/> דקות</translation> -<translation id="688711909580084195">דף אינטרנט ללא כותרת</translation> -<translation id="3353284378027041011">לפני <ph name="NUMBER_FEW"/> ימים</translation> -<translation id="5076340679995252485">&הדבק</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">בחירת תיקיה להעלאה</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016">לפני <ph name="NUMBER_TWO"/> דקות</translation> -<translation id="3234408098842461169">חץ למטה</translation> -<translation id="3087734570205094154">תחתית</translation> -<translation id="5935630983280450497">נותרה <ph name="NUMBER_ONE"/> דקה</translation> -<translation id="1860796786778352021">סגירת הודעה</translation> -<translation id="6364916375976753737">גלול שמאלה</translation> -<translation id="2629089419211541119">לפני <ph name="NUMBER_ONE"/> שעה</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> דקות</translation> -<translation id="6982279413068714821">לפני <ph name="NUMBER_DEFAULT"/> דקות</translation> -<translation id="6945221475159498467">בחר</translation> -<translation id="6620110761915583480">שמור קובץ</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> שניות</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">נותרה דקה <ph name="NUMBER_ONE"/></translation> -<translation id="2953767478223974804">דקה <ph name="NUMBER_ONE"/></translation> -<translation id="8210608804940886430">דף למטה</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> ימים</translation> -<translation id="7163503212501929773">נותרו <ph name="NUMBER_MANY"/> שעות</translation> -<translation id="5329858601952122676">&מחק</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> שניות</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> דקות</translation> -<translation id="7275974018215686543">לפני <ph name="NUMBER_MANY"/> שניות</translation> -<translation id="7781829728241885113">אתמול</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> דקות</translation> -<translation id="50960180632766478">נותרו <ph name="NUMBER_FEW"/> דקות</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523">לפני <ph name="NUMBER_DEFAULT"/> ימים</translation> -<translation id="8428213095426709021">הגדרות</translation> -<translation id="2497284189126895209">כל הקבצים</translation> -<translation id="7487278341251176613">נותרו <ph name="NUMBER_TWO"/> דקות</translation> -<translation id="5110450810124758964">לפני <ph name="NUMBER_ONE"/> ימים</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> שניה</translation> -<translation id="7814458197256864873">&העתק</translation> -<translation id="3889424535448813030">חץ לימין</translation> -<translation id="4229495110203539533">לפני <ph name="NUMBER_ONE"/> שניות</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> שניות נותרו</translation> -<translation id="6829324100069873704">חזור להודעות</translation> -<translation id="6528179044667508675">נא לא להפריע</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> שניות</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> דקות</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">אפשר התראות ממקורות אלה:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> שעות</translation> -<translation id="1398853756734560583">הגדל</translation> -<translation id="4250229828105606438">צילום מסך</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> שעות</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> דקות נותרו</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">בחר &הכל</translation> -<translation id="2168039046890040389">דף למעלה</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> ימים</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> דקות</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> דקה</translation> -<translation id="8448317557906454022">לפני <ph name="NUMBER_ZERO"/> שניות</translation> -<translation id="4927753642311223124">אין התראות להצגה, המשך הלאה.</translation> -<translation id="2482878487686419369">התראות</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">גלול ל'כאן'</translation> -<translation id="4552416320897244156">דף למטה</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> שעות</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">הפעלה/השהיה של המדיה</translation> -<translation id="2148716181193084225">היום</translation> -<translation id="7960078400008666149">נא לא להפריע למשך שעה</translation> -<translation id="4373894838514502496">לפני <ph name="NUMBER_FEW"/> דקות</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> ימים</translation> -<translation id="2190355936436201913">(ריק)</translation> -<translation id="1164369517022005061">נותרו <ph name="NUMBER_DEFAULT"/> שעות</translation> -<translation id="152482086482215392">נותרה שנייה <ph name="NUMBER_ONE"/></translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">גלול ימינה</translation> -<translation id="7414887922320653780">נותרו <ph name="NUMBER_ONE"/> שעות</translation> -<translation id="1413622004203049571">השבת הודעות מאת <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">למעלה</translation> -<translation id="8331626408530291785">גלול למעלה</translation> -<translation id="7907591526440419938">פתח קובץ</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">לפני <ph name="NUMBER_DEFAULT"/> שעות</translation> -<translation id="815598010540052116">גלול למטה</translation> -<translation id="6808150112686056157">עצור מדיה</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">שחזר</translation> -<translation id="1243314992276662751">העלה</translation> -<translation id="50030952220075532">נותר יום <ph name="NUMBER_ONE"/></translation> -<translation id="8179976553408161302">היכנס</translation> -<translation id="945522503751344254">שלח משוב</translation> -<translation id="9170848237812810038">&ביטול</translation> -<translation id="1285266685456062655">לפני <ph name="NUMBER_FEW"/> שעות</translation> -<translation id="6918245111648057970">אפשר קבלת הודעות מהגורמים הבאים עבור כל משתמש:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> שנייה</translation> -<translation id="3994835489895548312">נותרו <ph name="NUMBER_MANY"/> דקות</translation> -<translation id="6358975074282722691">לפני <ph name="NUMBER_TWO"/> שניות</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">הגדרות...</translation> -<translation id="6845383723252244143">בחר תיקייה</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> שניות</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> שניות</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534">לפני <ph name="NUMBER_MANY"/> ימים</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> ימים</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> שעה</translation> -<translation id="2679312662830811292">לפני <ph name="NUMBER_ONE"/> דקות</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405">יום <ph name="NUMBER_ONE"/></translation> -<translation id="9098468523912235228">לפני <ph name="NUMBER_DEFAULT"/> שניות</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> שניות נותרו</translation> -<translation id="4570886800634958009">הרחבת הודעה</translation> -<translation id="436869212180315161">לחץ</translation> -<translation id="4860787810836767172">לפני <ph name="NUMBER_FEW"/> שניות</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> דקות</translation> -<translation id="1858722859751911017">נותרו <ph name="NUMBER_FEW"/> דקות</translation> -<translation id="6040143037577758943">סגור</translation> -<translation id="1101671447232096497">לפני <ph name="NUMBER_MANY"/> דקות</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">עזרה</translation> -<translation id="6699343763173986273">הרצועה הבאה במדיה</translation> -<translation id="8226233771743600312">נא לא להפריע ליום אחד</translation> -<translation id="7457942297256758195">נקה הכל</translation> -<translation id="822618367988303761">לפני <ph name="NUMBER_TWO"/> ימים</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> דקות</translation> -<translation id="1963692530539281474">נותרו <ph name="NUMBER_DEFAULT"/> ימים</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> דקות</translation> -<translation id="5906719743126878045">נותרו <ph name="NUMBER_TWO"/> שעות</translation> -<translation id="8959208747503200525">לפני <ph name="NUMBER_TWO"/> שעות</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> שניות</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> שניות</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> שניות</translation> -<translation id="3759876923365568382">נותרו <ph name="NUMBER_FEW"/> ימים</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">העתק ללוח</translation> -<translation id="8371695176452482769">דבר עכשיו</translation> -<translation id="6965382102122355670">אישור</translation> -<translation id="7850320739366109486">נא לא להפריע</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">מזער</translation> -<translation id="6394627529324717982">פסיק</translation> -<translation id="3036649622769666520">פתח קבצים</translation> -<translation id="8328145009876646418">קצה שמאלי</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> שניות</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_ja.xtb b/chromium/ui/base/strings/ui_strings_ja.xtb deleted file mode 100644 index db1f39e0ebb..00000000000 --- a/chromium/ui/base/strings/ui_strings_ja.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ja"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Insert</translation> -<translation id="6135826906199951471">Delete</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> 時間前</translation> -<translation id="6310545596129886942">残り <ph name="NUMBER_FEW"/> 秒</translation> -<translation id="9213479837033539041">残り <ph name="NUMBER_MANY"/> 秒</translation> -<translation id="1209866192426315618">残り <ph name="NUMBER_DEFAULT"/> 分</translation> -<translation id="1801827354178857021">ピリオド</translation> -<translation id="1190609913194133056">通知センター</translation> -<translation id="7470933019269157899">残り <ph name="NUMBER_DEFAULT"/> 分</translation> -<translation id="5613020302032141669">左矢印キー</translation> -<translation id="4971687151119236543">メディアの前のトラック</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> ファイル (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> 秒</translation> -<translation id="7511635910912978956">残り <ph name="NUMBER_FEW"/> 時間</translation> -<translation id="8717309436826820190"><ph name="SOURCE_OF_NOTIFICATIONS"/> から他 <ph name="NUMBER_OF_NOTIFICATIONS"/> 件</translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">キャンセル</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">上矢印キー</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/秒</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> 時間</translation> -<translation id="3990502903496589789">右端</translation> -<translation id="9038489124413477075">名前のないフォルダ</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> 分</translation> -<translation id="3520476450377425184">残り <ph name="NUMBER_MANY"/> 日</translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868">残り <ph name="NUMBER_MANY"/> 分</translation> -<translation id="8666066831007952346">残り <ph name="NUMBER_TWO"/> 日</translation> -<translation id="6390842777729054533">残り <ph name="NUMBER_ZERO"/> 秒</translation> -<translation id="3909791450649380159">切り取り(&T)</translation> -<translation id="2560788951337264832">残り <ph name="NUMBER_ZERO"/> 分</translation> -<translation id="688711909580084195">無題のウェブページ</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> 日前</translation> -<translation id="5076340679995252485">貼り付け(&P)</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">アップロードするフォルダを選択</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> 分前</translation> -<translation id="3234408098842461169">下矢印キー</translation> -<translation id="3087734570205094154">下</translation> -<translation id="5935630983280450497">残り <ph name="NUMBER_ONE"/> 分</translation> -<translation id="1860796786778352021">通知を閉じる</translation> -<translation id="6364916375976753737">左にスクロール</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> 時間前</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> 分</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> 分前</translation> -<translation id="6945221475159498467">選択</translation> -<translation id="6620110761915583480">ファイルを保存</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> 秒</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">残り <ph name="NUMBER_ONE"/> 分</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> 分</translation> -<translation id="8210608804940886430">次のページへ</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> 日</translation> -<translation id="7163503212501929773">残り <ph name="NUMBER_MANY"/> 時間</translation> -<translation id="5329858601952122676">削除(&D)</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> 秒</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> 分</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> 秒前</translation> -<translation id="7781829728241885113">昨日</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> 分</translation> -<translation id="50960180632766478">残り <ph name="NUMBER_FEW"/> 分</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> 日前</translation> -<translation id="8428213095426709021">設定</translation> -<translation id="2497284189126895209">すべてのファイル</translation> -<translation id="7487278341251176613">残り <ph name="NUMBER_TWO"/> 分</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> 日前</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> 秒</translation> -<translation id="7814458197256864873">コピー(&C)</translation> -<translation id="3889424535448813030">右矢印キー</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> 秒前</translation> -<translation id="2544782972264605588">残り <ph name="NUMBER_DEFAULT"/> 秒</translation> -<translation id="6829324100069873704">通知に戻る</translation> -<translation id="6528179044667508675">通知を一時的にミュート</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> 秒</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> 分</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">次の通知を許可:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> 時間</translation> -<translation id="1398853756734560583">最大化</translation> -<translation id="4250229828105606438">スクリーンショット</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> 時間</translation> -<translation id="5260878308685146029">残り <ph name="NUMBER_TWO"/> 分</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">すべて選択(&A)</translation> -<translation id="2168039046890040389">前のページへ</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> 日</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> 分</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> 分</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> 秒前</translation> -<translation id="4927753642311223124">表示する通知はありません。続行してください。</translation> -<translation id="2482878487686419369">通知</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">ここまでスクロール</translation> -<translation id="4552416320897244156">PageDown</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> 時間</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/秒</translation> -<translation id="8394908167088220973">メディアの再生/一時停止</translation> -<translation id="2148716181193084225">今日</translation> -<translation id="7960078400008666149">通知を 1 時間ミュート</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> 分前</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> 日</translation> -<translation id="2190355936436201913">(なし)</translation> -<translation id="1164369517022005061">残り <ph name="NUMBER_DEFAULT"/> 時間</translation> -<translation id="152482086482215392">残り <ph name="NUMBER_ONE"/> 秒</translation> -<translation id="8447116497070723931">PageUp</translation> -<translation id="4588090240171750605">右にスクロール</translation> -<translation id="7414887922320653780">残り <ph name="NUMBER_ONE"/> 時間</translation> -<translation id="1413622004203049571"><ph name="NOTIFIER_NAME"/> からの通知を無効にする</translation> -<translation id="2666092431469916601">一番上</translation> -<translation id="8331626408530291785">上にスクロール</translation> -<translation id="7907591526440419938">ファイルを開く</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> 時間前</translation> -<translation id="815598010540052116">下にスクロール</translation> -<translation id="6808150112686056157">メディアの停止</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">復元</translation> -<translation id="1243314992276662751">アップロード</translation> -<translation id="50030952220075532">残り <ph name="NUMBER_ONE"/> 日</translation> -<translation id="8179976553408161302">Enter</translation> -<translation id="945522503751344254">フィードバックを送信</translation> -<translation id="9170848237812810038">取消(&U)</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> 時間前</translation> -<translation id="6918245111648057970">ユーザーごとに次の通知を許可:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> 秒</translation> -<translation id="3994835489895548312">残り <ph name="NUMBER_MANY"/> 分</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> 秒前</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">設定...</translation> -<translation id="6845383723252244143">フォルダを選択</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> 秒</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> 秒</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> 日前</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> 日</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> 時間</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> 分前</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/秒</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> 日</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> 秒前</translation> -<translation id="494645311413743213">残り <ph name="NUMBER_TWO"/> 秒</translation> -<translation id="4570886800634958009">通知を展開</translation> -<translation id="436869212180315161">押す</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> 秒前</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/秒</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> 分</translation> -<translation id="1858722859751911017">残り <ph name="NUMBER_FEW"/> 分</translation> -<translation id="6040143037577758943">閉じる</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> 分前</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/秒</translation> -<translation id="7649070708921625228">ヘルプ</translation> -<translation id="6699343763173986273">メディアの次のトラック</translation> -<translation id="8226233771743600312">通知を 1 日間ミュート</translation> -<translation id="7457942297256758195">すべて消去</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> 日前</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> 分</translation> -<translation id="1963692530539281474">残り <ph name="NUMBER_DEFAULT"/> 日</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> 分</translation> -<translation id="5906719743126878045">残り <ph name="NUMBER_TWO"/> 時間</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> 時間前</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> 秒</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> 秒</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> 秒</translation> -<translation id="3759876923365568382">残り <ph name="NUMBER_FEW"/> 日</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/秒</translation> -<translation id="2743387203779672305">クリップボードにコピー</translation> -<translation id="8371695176452482769">お話しください</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">通知を一時的にミュート</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">最小化</translation> -<translation id="6394627529324717982">カンマ</translation> -<translation id="3036649622769666520">ファイルを開く</translation> -<translation id="8328145009876646418">左端</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> 秒</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_kn.xtb b/chromium/ui/base/strings/ui_strings_kn.xtb deleted file mode 100644 index 5e0b1a92522..00000000000 --- a/chromium/ui/base/strings/ui_strings_kn.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="kn"> -<translation id="4820616160060340806">ಕಮಾಂಡ್+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">ಅಂತ್ಯ</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> ಸೆಕೆಂಡುಗಳು ಉಳಿದಿದೆ</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> ಸೆಕೆಂಡುಗಳು ಉಳಿದಿದೆ</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> ನಿಮಿಷಗಳು ಉಳಿದಿವೆ</translation> -<translation id="1801827354178857021">ಅವಧಿ</translation> -<translation id="1190609913194133056">ಅಧಿಸೂಚನೆಯ ಕೇಂದ್ರ</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> ನಿಮಿಷಗಳು ಉಳಿದಿವೆ</translation> -<translation id="5613020302032141669">ಎಡ ಬಾಣದ ಗುರುತು</translation> -<translation id="4971687151119236543">ಮೀಡಿಯಾದ ಹಿಂದಿನ ಟ್ರ್ಯಾಕ್</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> ಫೈಲ್ (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> ಸೆಕೆಂಡುಗಳು</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> ಗಂಟೆಗಳು ಉಳಿದಿವೆ</translation> -<translation id="8717309436826820190"><ph name="SOURCE_OF_NOTIFICATIONS"/> ನಿಂದ ಹೆಚ್ಚಿನ <ph name="NUMBER_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">ರದ್ದುಮಾಡು</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">ಮೇಲಿನ ಬಾಣದ ಗುರುತು</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> ಗಂಟೆಗಳು</translation> -<translation id="3990502903496589789">ಬಲ ತುದಿ</translation> -<translation id="9038489124413477075">ಹೆಸರಿಸದ ಫೋಲ್ಡರ್</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> ನಿಮಿಷಗಳು</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> ದಿನಗಳು ಉಳಿದಿವೆ</translation> -<translation id="932327136139879170">ಮುಖಪುಟ</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> ನಿಮಿಷಗಳು ಉಳಿದಿದೆ</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> ದಿನಗಳು ಉಳಿದಿವೆ</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> ಸೆಕೆಂಡುಗಳು ಉಳಿದಿದೆ</translation> -<translation id="3909791450649380159">ಕತ್ತರಿ&ಸು</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> ನಿಮಿಷಗಳು ಉಳಿದಿವೆ</translation> -<translation id="688711909580084195">ಶೀರ್ಷಿಕೆರಹಿತ ವೆಬ್ಪುಟ</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">&ಅಂಟಿಸಿ</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">ಅಪ್ಲೋಡ್ ಮಾಡಲು ಫೋಲ್ಡರ್ ಆಯ್ಕೆಮಾಡಿ</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">ಕೆಳಗಿನ ಬಾಣದ ಗುರುತು</translation> -<translation id="3087734570205094154">ಕೆಳಗೆ</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> ನಿಮಿಷಗಳು ಉಳಿದಿದೆ</translation> -<translation id="1860796786778352021">ಅಧಿಸೂಚನೆ ಮುಚ್ಚು</translation> -<translation id="6364916375976753737">ಎಡಕ್ಕೆ ಸ್ಕ್ರೋಲ್ ಮಾಡಿ</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> hour ago</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> ನಿಮಿಷಗಳು</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> mins ago</translation> -<translation id="6945221475159498467">ಆಯ್ಕೆಮಾಡಿ</translation> -<translation id="6620110761915583480">ಫೈಲ್ ಉಳಿಸು</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> ಸೆಕೆಂಡುಗಳು</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> ನಿಮಿಷ ಉಳಿದಿದೆ</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> ನಿಮಿಷ</translation> -<translation id="8210608804940886430">ಪುಟ ಕೆಳಗೆ</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> ದಿನಗಳು</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> ಗಂಟೆಗಳು ಉಳಿದಿದೆ</translation> -<translation id="5329858601952122676">&ಅಳಿಸು</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> ಸೆಕೆಂಡುಗಳು</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> ನಿಮಿಷಗಳು</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">ನಿನ್ನೆ</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> ನಿಮಿಷಗಳು</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> ನಿಮಿಷಗಳು ಉಳಿದಿದೆ</translation> -<translation id="6659594942844771486">ಟ್ಯಾಬ್</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> days ago</translation> -<translation id="8428213095426709021">ಸೆಟ್ಟಿಂಗ್ಗಳು</translation> -<translation id="2497284189126895209">ಎಲ್ಲ ಫೈಲ್ಗಳು</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> ನಿಮಿಷಗಳು ಉಳಿದಿವೆ</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> day ago</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> ಸೆಕೆಂಡು</translation> -<translation id="7814458197256864873">&ನಕಲಿಸಿ</translation> -<translation id="3889424535448813030">ಬಲ ಬಾಣದ ಗುರುತು</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> sec ago</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> ಸೆಕೆಂಡುಗಳು ಉಳಿದಿದೆ</translation> -<translation id="6829324100069873704">ಅಧಿಸೂಚನೆಗಳಿಗೆ ಹಿಂತಿರುಗಿ</translation> -<translation id="6528179044667508675">ಅಡಚಣೆ ಮಾಡಬೇಡಿ</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> ಸೆಕೆಂಡುಗಳು</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> ನಿಮಿಷಗಳು</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">ಕೆಳಗಿನವುಗಳಿಂದ ಅಧಿಸೂಚನೆಗಳನ್ನು ಅನುಮತಿಸಿ:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> ಗಂಟೆಗಳು</translation> -<translation id="1398853756734560583">ಗರಿಷ್ಠಗೊಳಿಸು</translation> -<translation id="4250229828105606438">ಸ್ಕ್ರೀನ್ಶಾಟ್</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> ಗಂಟೆಗಳು</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> ನಿಮಿಷಗಳು ಉಳಿದಿವೆ</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">&ಎಲ್ಲ ಆಯ್ಕೆ ಮಾಡಿ</translation> -<translation id="2168039046890040389">ಪುಟ ಮೇಲೆ</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> ದಿನಗಳು</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> ನಿಮಿಷಗಳು</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> ನಿಮಿಷ</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">ಇಲ್ಲಿ ನೋಡಲು ಏನೂ ಇಲ್ಲ, ಮುಂದೆ ಸಾಗಿ.</translation> -<translation id="2482878487686419369">ಸೂಚನೆಗಳು</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">ಇಲ್ಲಿಗೆ ಸ್ಕ್ರೋಲ್ ಮಾಡಿ</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> ಗಂಟೆಗಳು</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s </translation> -<translation id="8394908167088220973">ಮೀಡಿಯಾ ಪ್ಲೇ/ವಿರಾಮ</translation> -<translation id="2148716181193084225">ಇಂದು</translation> -<translation id="7960078400008666149">ಒಂದು ಗಂಟೆಯ ಕಾಲ ಅಡಚಣೆ ಮಾಡಬೇಡಿ</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> ದಿನಗಳು</translation> -<translation id="2190355936436201913">(ಖಾಲಿ)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> ಗಂಟೆಗಳು ಉಳಿದಿದೆ</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> ಸೆಕೆಂಡುಗಳು ಉಳಿದಿದೆ</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">ಬಲಕ್ಕೆ ಸ್ಕ್ರೋಲ್ ಮಾಡಿ</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> ಗಂಟೆಗಳು ಉಳಿದಿದೆ</translation> -<translation id="1413622004203049571"><ph name="NOTIFIER_NAME"/> ಅವರ ಅಧಿಸೂಚನೆಗಳನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿ</translation> -<translation id="2666092431469916601">ಮೇಲೆ</translation> -<translation id="8331626408530291785">ಮೇಲೆ ಸ್ಕ್ರೋಲ್ ಮಾಡು</translation> -<translation id="7907591526440419938">ಫೈಲ್ ತೆರೆಯಿರಿ</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> hours ago</translation> -<translation id="815598010540052116">ಕೆಳಗೆ ಸ್ಕ್ರೋಲ್ ಮಾಡು</translation> -<translation id="6808150112686056157">ಮೀಡಿಯಾ ನಿಲುಗಡೆ</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">ಪುನಃಸ್ಥಾಪನೆ</translation> -<translation id="1243314992276662751">ಅಪ್ಲೋಡ್</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> ದಿನಗಳು ಉಳಿದಿವೆ</translation> -<translation id="8179976553408161302">ನಮೂದಿಸಿ</translation> -<translation id="945522503751344254">ಪ್ರತಿಕ್ರಿಯೆಯನ್ನು ಕಳುಹಿಸಿ</translation> -<translation id="9170848237812810038">&ರದ್ದುಮಾಡು</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">ಪ್ರತಿ ಬಳಕೆದಾರರಿಗಾಗಿ ಈ ಕೆಳಗಿನವುಗಳಿಂದ ಅಧಿಸೂಚನೆಗಳನ್ನು ಅನುಮತಿಸಿ:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> ಸೆಕೆಂಡ್</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> ನಿಮಿಷಗಳು ಉಳಿದಿವೆ</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">ಸೆಟ್ಟಿಂಗ್ಗಳು...</translation> -<translation id="6845383723252244143">ಫೋಲ್ಡರ್ ಆಯ್ಕೆಮಾಡಿ</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> ಸೆಕೆಂಡುಗಳು</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> ಸೆಕೆಂಡುಗಳು</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> ದಿನಗಳು</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> ಗಂಟೆ</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> min ago</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> ದಿನ</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> secs ago</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> ಸೆಕೆಂಡುಗಳು ಉಳಿದಿದೆ</translation> -<translation id="4570886800634958009">ಅಧಿಸೂಚನೆ ವಿಸ್ತರಿಸು</translation> -<translation id="436869212180315161">ಒತ್ತಿರಿ</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> ನಿಮಿಷಗಳು</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> ನಿಮಿಷಗಳು ಉಳಿದಿವೆ</translation> -<translation id="6040143037577758943">ಮುಚ್ಚು</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">ಸಹಾಯ</translation> -<translation id="6699343763173986273">ಮೀಡಿಯಾದ ಮುಂದಿನ ಟ್ರ್ಯಾಕ್</translation> -<translation id="8226233771743600312">ಒಂದು ದಿನದವರೆಗೆ ಅಡಚಣೆ ಮಾಡಬೇಡಿ</translation> -<translation id="7457942297256758195">ಎಲ್ಲವನ್ನೂ ತೆರವುಗೊಳಿಸಿ</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> ನಿಮಿಷಗಳು</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> ದಿನಗಳು ಉಳಿದಿವೆ</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> ನಿಮಿಷಗಳು</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> ಗಂಟೆಗಳು ಉಳಿದಿದೆ</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> ಸೆಕೆಂಡುಗಳು</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> ಸೆಕೆಂಡುಗಳು</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> ಸೆಕೆಂಡುಗಳು</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> ದಿನಗಳು ಉಳಿದಿವೆ</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">ಕ್ಲಿಪ್ಬೋರ್ಡ್ಗೆ ನಕಲಿಸಿ</translation> -<translation id="8371695176452482769">ಈಗ ಮಾತನಾಡಿ</translation> -<translation id="6965382102122355670">ಸರಿ</translation> -<translation id="7850320739366109486">ಅಡಚಣೆ ಮಾಡಬೇಡಿ</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">ಕುಗ್ಗಿಸು</translation> -<translation id="6394627529324717982">ಅರ್ಧವಿರಾಮ</translation> -<translation id="3036649622769666520">ಫೈಲ್ಗಳನ್ನು ತೆರೆಯಿರಿ</translation> -<translation id="8328145009876646418">ಎಡ ಬದಿ</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> ಸೆಕೆಂಡುಗಳು</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_ko.xtb b/chromium/ui/base/strings/ui_strings_ko.xtb deleted file mode 100644 index def4d0ce6be..00000000000 --- a/chromium/ui/base/strings/ui_strings_ko.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ko"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Insert</translation> -<translation id="6135826906199951471">삭제</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/>시간 전</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/>초 남음</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/>초 남음</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/>분 남음</translation> -<translation id="1801827354178857021">마침표</translation> -<translation id="1190609913194133056">알림 센터</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/>분 남음</translation> -<translation id="5613020302032141669">왼쪽 화살표</translation> -<translation id="4971687151119236543">미디어 이전 트랙</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> 파일(.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/>초</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/>시간 남음</translation> -<translation id="8717309436826820190">외 <ph name="SOURCE_OF_NOTIFICATIONS"/> 알림 <ph name="NUMBER_OF_NOTIFICATIONS"/>개</translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">취소</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/>B</translation> -<translation id="3660179305079774227">위쪽 화살표</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/>MB/초</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/>시간</translation> -<translation id="3990502903496589789">오른쪽 모서리</translation> -<translation id="9038489124413477075">이름이 없는 폴더</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/>분</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/>일 남음</translation> -<translation id="932327136139879170">홈</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/>분</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/>일 남음</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/>초 남음</translation> -<translation id="3909791450649380159">잘라내기(&T)</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minutes left</translation> -<translation id="688711909580084195">제목 없는 웹페이지</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/>일 전</translation> -<translation id="5076340679995252485">붙여넣기(&P)</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/>TB</translation> -<translation id="364720409959344976">업로드할 폴더 선택</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/>분 전</translation> -<translation id="3234408098842461169">아래 화살표</translation> -<translation id="3087734570205094154">맨 아래</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/>분 남음</translation> -<translation id="1860796786778352021">알림 닫기</translation> -<translation id="6364916375976753737">왼쪽으로 스크롤</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/>시간 전</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/>분</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/>분 전</translation> -<translation id="6945221475159498467">선택</translation> -<translation id="6620110761915583480">파일 저장</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/>초</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> minute left</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/>분</translation> -<translation id="8210608804940886430">페이지 아래로</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/>일</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/>시간 남음</translation> -<translation id="5329858601952122676">삭제(&D)</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/>초</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/>KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/>분</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/>초 전</translation> -<translation id="7781829728241885113">어제</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/>분</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/>분 남음</translation> -<translation id="6659594942844771486">탭</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/>MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/>일 전</translation> -<translation id="8428213095426709021">설정</translation> -<translation id="2497284189126895209">모든 파일</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minutes left</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/>일 전</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/>초</translation> -<translation id="7814458197256864873">복사(&C)</translation> -<translation id="3889424535448813030">오른쪽 화살표</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/>초 전</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/>초 남음</translation> -<translation id="6829324100069873704">알림으로 돌아가기</translation> -<translation id="6528179044667508675">알림 일시중지</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/>초</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/>분</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">다음 항목에 알림 허용:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/>시간</translation> -<translation id="1398853756734560583">최대화</translation> -<translation id="4250229828105606438">캡처화면</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/>시간</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/>분 남음</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/>GB</translation> -<translation id="1901303067676059328">전체 선택(&A)</translation> -<translation id="2168039046890040389">페이지 위로</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/>일</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/>분</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/>분</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/>초 전</translation> -<translation id="4927753642311223124">표시할 내용이 없습니다.</translation> -<translation id="2482878487686419369">알림</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">여기로 스크롤</translation> -<translation id="4552416320897244156">PageDown</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/>시간</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/>KB/초</translation> -<translation id="8394908167088220973">미디어 재생/일시중지</translation> -<translation id="2148716181193084225">오늘</translation> -<translation id="7960078400008666149">1시간 동안 알림 일시중지</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/>분 전</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/>일</translation> -<translation id="2190355936436201913">(비어있음)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/>시간 남음</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/>초 남음</translation> -<translation id="8447116497070723931">PageUp</translation> -<translation id="4588090240171750605">오른쪽 스크롤</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/>시간 남음</translation> -<translation id="1413622004203049571"><ph name="NOTIFIER_NAME"/>의 알림 사용 중지</translation> -<translation id="2666092431469916601">맨 위</translation> -<translation id="8331626408530291785">위로 스크롤</translation> -<translation id="7907591526440419938">파일 열기</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/>시간 전</translation> -<translation id="815598010540052116">아래로 스크롤</translation> -<translation id="6808150112686056157">미디어 중지</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">복구</translation> -<translation id="1243314992276662751">업로드</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/>일 남음</translation> -<translation id="8179976553408161302">Enter</translation> -<translation id="945522503751344254">의견 보내기</translation> -<translation id="9170848237812810038">실행 취소(&U)</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/>시간 전</translation> -<translation id="6918245111648057970">사용자별로 다음 알림 허용:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/>초</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minutes left</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/>초 전</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/>PB</translation> -<translation id="2983818520079887040">설정...</translation> -<translation id="6845383723252244143">폴더 선택</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/>초</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/>초</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/>일 전</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/>일</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/>시간</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/>분 전</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/>GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/>일</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/>초 전</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/>초 남음</translation> -<translation id="4570886800634958009">알림 펼치기</translation> -<translation id="436869212180315161">누르기</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/>초 전</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/>TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/>분</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> minutes left</translation> -<translation id="6040143037577758943">닫기</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/>분 전</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/>B/s</translation> -<translation id="7649070708921625228">도움말</translation> -<translation id="6699343763173986273">미디어 다음 트랙</translation> -<translation id="8226233771743600312">하루 동안 알림 일시중지</translation> -<translation id="7457942297256758195">모두 지우기</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/>일 전</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/>분</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/>일 남음</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/>분</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/>시간 남음</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/>시간 전</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/>초</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/>초</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/>초</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/>일 남음</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/>PB/s</translation> -<translation id="2743387203779672305">클립보드로 복사</translation> -<translation id="8371695176452482769">지금 말하기</translation> -<translation id="6965382102122355670">확인</translation> -<translation id="7850320739366109486">알림 일시중지</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">최소화</translation> -<translation id="6394627529324717982">콤마</translation> -<translation id="3036649622769666520">파일 열기</translation> -<translation id="8328145009876646418">왼쪽 모서리</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/>초</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_lt.xtb b/chromium/ui/base/strings/ui_strings_lt.xtb deleted file mode 100644 index ccd630af6f7..00000000000 --- a/chromium/ui/base/strings/ui_strings_lt.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="lt"> -<translation id="4820616160060340806">„Command“ + „<ph name="KEY_COMBO_NAME"/>“</translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">Pabaiga</translation> -<translation id="5341849548509163798">Prieš <ph name="NUMBER_MANY"/> val.</translation> -<translation id="6310545596129886942">liko <ph name="NUMBER_FEW"/> sek.</translation> -<translation id="9213479837033539041">liko <ph name="NUMBER_MANY"/> sek.</translation> -<translation id="1209866192426315618">liko <ph name="NUMBER_DEFAULT"/> min.</translation> -<translation id="1801827354178857021">Taškas</translation> -<translation id="1190609913194133056">Pranešimų centras</translation> -<translation id="7470933019269157899">Liko <ph name="NUMBER_DEFAULT"/> min.</translation> -<translation id="5613020302032141669">Rodyklė į kairę</translation> -<translation id="4971687151119236543">Ankstesnis medijos takelis</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> failas (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> sek.</translation> -<translation id="7511635910912978956">liko <ph name="NUMBER_FEW"/> valandos (-ų)</translation> -<translation id="8717309436826820190">Dar <ph name="NUMBER_OF_NOTIFICATIONS"/> iš „<ph name="SOURCE_OF_NOTIFICATIONS"/>“</translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Atšaukti</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Rodyklė „Aukštyn“</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> val.</translation> -<translation id="3990502903496589789">Dešinysis kraštas</translation> -<translation id="9038489124413477075">Aplankas be pavadinimo</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> min.</translation> -<translation id="3520476450377425184">liko <ph name="NUMBER_MANY"/> dienos (-ų)</translation> -<translation id="932327136139879170">Pradžia</translation> -<translation id="5600907569873192868">liko <ph name="NUMBER_MANY"/> min.</translation> -<translation id="8666066831007952346">liko <ph name="NUMBER_TWO"/> dienos (-ų)</translation> -<translation id="6390842777729054533">liko <ph name="NUMBER_ZERO"/> sek.</translation> -<translation id="3909791450649380159">Iškir&pti</translation> -<translation id="2560788951337264832">Liko <ph name="NUMBER_ZERO"/> min.</translation> -<translation id="688711909580084195">Tinklalapis be pavadinimo</translation> -<translation id="3353284378027041011">Prieš <ph name="NUMBER_FEW"/> dienas (-ų)</translation> -<translation id="5076340679995252485">&Įklijuoti</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Pasirinkite norimą įkelti aplanką</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016">Prieš <ph name="NUMBER_TWO"/> min.</translation> -<translation id="3234408098842461169">Rodyklė „Žemyn“</translation> -<translation id="3087734570205094154">Apačia</translation> -<translation id="5935630983280450497">liko <ph name="NUMBER_ONE"/> min.</translation> -<translation id="1860796786778352021">Uždaryti pranešimus</translation> -<translation id="6364916375976753737">Slinkti į kairę</translation> -<translation id="2629089419211541119">Prieš <ph name="NUMBER_ONE"/> val.</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> min.</translation> -<translation id="6982279413068714821">Prieš <ph name="NUMBER_DEFAULT"/> min.</translation> -<translation id="6945221475159498467">Pasirinkti</translation> -<translation id="6620110761915583480">Išsaugoti failą</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> sek.</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Liko <ph name="NUMBER_ONE"/> min.</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> min.</translation> -<translation id="8210608804940886430">Puslapį žemyn</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> dienos</translation> -<translation id="7163503212501929773">liko <ph name="NUMBER_MANY"/> valandos (-ų)</translation> -<translation id="5329858601952122676">&Pašalinti</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> sek.</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> min.</translation> -<translation id="7275974018215686543">Prieš <ph name="NUMBER_MANY"/> sek.</translation> -<translation id="7781829728241885113">Vakar</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> min.</translation> -<translation id="50960180632766478">liko <ph name="NUMBER_FEW"/> min.</translation> -<translation id="6659594942844771486">Skirtukas</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523">Prieš <ph name="NUMBER_DEFAULT"/> dienas (-ų)</translation> -<translation id="8428213095426709021">Nustatymai</translation> -<translation id="2497284189126895209">Visi failai</translation> -<translation id="7487278341251176613">Liko <ph name="NUMBER_TWO"/> min.</translation> -<translation id="5110450810124758964">Prieš <ph name="NUMBER_ONE"/> dieną</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> sek.</translation> -<translation id="7814458197256864873">&Kopijuoti</translation> -<translation id="3889424535448813030">Rodyklė į dešinę</translation> -<translation id="4229495110203539533">Prieš <ph name="NUMBER_ONE"/> sek.</translation> -<translation id="2544782972264605588">liko <ph name="NUMBER_DEFAULT"/> sek.</translation> -<translation id="6829324100069873704">Atgal į pranešimus</translation> -<translation id="6528179044667508675">Netrukdyti</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> sek.</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> min.</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Leisti pranešimus iš šių plėtinių:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> valandos (-ų)</translation> -<translation id="1398853756734560583">Išskleisti</translation> -<translation id="4250229828105606438">Ekrano kopija</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> valandos (-ų)</translation> -<translation id="5260878308685146029">liko <ph name="NUMBER_TWO"/> min.</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Pasirinkti &viską</translation> -<translation id="2168039046890040389">Puslapį į viršų</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> dienos</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> min.</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> min.</translation> -<translation id="8448317557906454022">Prieš <ph name="NUMBER_ZERO"/> sek.</translation> -<translation id="4927753642311223124">Čia nieko nėra, slinkite toliau.</translation> -<translation id="2482878487686419369">Pranešimai</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Slinkti iki čia</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> valandos (-ų)</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB per sek.</translation> -<translation id="8394908167088220973">Leisti / pristabdyti mediją</translation> -<translation id="2148716181193084225">Šiandien</translation> -<translation id="7960078400008666149">Netrukdyti vieną valandą</translation> -<translation id="4373894838514502496">Prieš <ph name="NUMBER_FEW"/> min.</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> dienos</translation> -<translation id="2190355936436201913">(tuščias)</translation> -<translation id="1164369517022005061">liko <ph name="NUMBER_DEFAULT"/> valandos (-ų)</translation> -<translation id="152482086482215392">liko <ph name="NUMBER_ONE"/> sek.</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Slinkti į dešinę</translation> -<translation id="7414887922320653780">liko <ph name="NUMBER_ONE"/> val.</translation> -<translation id="1413622004203049571">Išjungti pranešimus nuo <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Į viršų</translation> -<translation id="8331626408530291785">Slinkti į viršų</translation> -<translation id="7907591526440419938">Atidaryti failą</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">Prieš <ph name="NUMBER_DEFAULT"/> val.</translation> -<translation id="815598010540052116">Slinkti žemyn</translation> -<translation id="6808150112686056157">Sustabdyti mediją</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Atkurti</translation> -<translation id="1243314992276662751">Įkelti</translation> -<translation id="50030952220075532">liko <ph name="NUMBER_ONE"/> diena</translation> -<translation id="8179976553408161302">Įvesti</translation> -<translation id="945522503751344254">Siųsti atsiliepimą</translation> -<translation id="9170848237812810038">&Atšaukti</translation> -<translation id="1285266685456062655">Prieš <ph name="NUMBER_FEW"/> val.</translation> -<translation id="6918245111648057970">Kiekvienam naudotojui leisti pranešimus iš nurodyto:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> sek.</translation> -<translation id="3994835489895548312">Liko <ph name="NUMBER_MANY"/> min.</translation> -<translation id="6358975074282722691">Prieš <ph name="NUMBER_TWO"/> sek.</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Nustatymai...</translation> -<translation id="6845383723252244143">Pasirinkti aplanką</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> sek.</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> sek.</translation> -<translation id="5583640892426849032">Grįžties klavišas</translation> -<translation id="5263972071113911534">Prieš <ph name="NUMBER_MANY"/> dienas (-ų)</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> dienos</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> val.</translation> -<translation id="2679312662830811292">Prieš <ph name="NUMBER_ONE"/> min.</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> diena</translation> -<translation id="9098468523912235228">Prieš <ph name="NUMBER_DEFAULT"/> sek.</translation> -<translation id="494645311413743213">liko <ph name="NUMBER_TWO"/> sek.</translation> -<translation id="4570886800634958009">Išplėsti pranešimą</translation> -<translation id="436869212180315161">Spustelėti</translation> -<translation id="4860787810836767172">Prieš <ph name="NUMBER_FEW"/> sek.</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> min.</translation> -<translation id="1858722859751911017">Liko <ph name="NUMBER_FEW"/> min.</translation> -<translation id="6040143037577758943">Uždaryti</translation> -<translation id="1101671447232096497">Prieš <ph name="NUMBER_MANY"/> min.</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Žinynas</translation> -<translation id="6699343763173986273">Kitas medijos takelis</translation> -<translation id="8226233771743600312">Netrukdyti vieną dieną</translation> -<translation id="7457942297256758195">Išvalyti viską</translation> -<translation id="822618367988303761">Prieš <ph name="NUMBER_TWO"/> dienas</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> min.</translation> -<translation id="1963692530539281474">liko <ph name="NUMBER_DEFAULT"/> dienos (-ų)</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> min.</translation> -<translation id="5906719743126878045">liko <ph name="NUMBER_TWO"/> valandos (-ų)</translation> -<translation id="8959208747503200525">Prieš <ph name="NUMBER_TWO"/> val.</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> sek.</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> sek.</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> sek.</translation> -<translation id="3759876923365568382">liko <ph name="NUMBER_FEW"/> dienos (-ų)</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Kopijuoti į iškarpinę</translation> -<translation id="8371695176452482769">Kalbėti dabar</translation> -<translation id="6965382102122355670">Gerai</translation> -<translation id="7850320739366109486">Netrukdyti</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Sumažinti</translation> -<translation id="6394627529324717982">Kablelis</translation> -<translation id="3036649622769666520">Atidaryti failus</translation> -<translation id="8328145009876646418">Kairysis kraštas</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> sek.</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_lv.xtb b/chromium/ui/base/strings/ui_strings_lv.xtb deleted file mode 100644 index 276442fefc7..00000000000 --- a/chromium/ui/base/strings/ui_strings_lv.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="lv"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Iespraušana</translation> -<translation id="6135826906199951471">Dzēst</translation> -<translation id="528468243742722775">Beigas</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> sekundes atlikušas</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> sekundes atlikušas</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> minūtes atlikušas</translation> -<translation id="1801827354178857021">Punkts</translation> -<translation id="1190609913194133056">Paziņojumu centrs</translation> -<translation id="7470933019269157899">Atlikušas <ph name="NUMBER_DEFAULT"/> minūtes</translation> -<translation id="5613020302032141669">Kreisā bulta</translation> -<translation id="4971687151119236543">Multivide — iepriekšējā dziesma</translation> -<translation id="8602707065186045623">Fails <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> sekundes</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> stundas atlikušas</translation> -<translation id="8717309436826820190">Vēl <ph name="NUMBER_OF_NOTIFICATIONS"/> no pakalpojuma <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt +<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Atcelt</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Bulta augšup</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> stundas</translation> -<translation id="3990502903496589789">Labā puse</translation> -<translation id="9038489124413477075">Mape bez nosaukuma</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> minūtes</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> dienas atlikušas</translation> -<translation id="932327136139879170">Sākumvieta</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> minūtes atlikušas</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> dienas atlikušas</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> sekundes atlikušas</translation> -<translation id="3909791450649380159">Izgrie&zt</translation> -<translation id="2560788951337264832">Atlikusi <ph name="NUMBER_ZERO"/> minūšu</translation> -<translation id="688711909580084195">Tīmekļa lapa bez nosaukuma</translation> -<translation id="3353284378027041011">Pirms <ph name="NUMBER_FEW"/> dienām</translation> -<translation id="5076340679995252485">&Ielīmēt</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Augšupielādējamās mapes atlase</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">Bulta Lejup</translation> -<translation id="3087734570205094154">Apakša</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> minūtes atlikušas</translation> -<translation id="1860796786778352021">Paziņojuma aizvēršana</translation> -<translation id="6364916375976753737">Ritināt pa kreisi</translation> -<translation id="2629089419211541119">Pirms <ph name="NUMBER_ONE"/> stundas</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minūtes</translation> -<translation id="6982279413068714821">Pirms <ph name="NUMBER_DEFAULT"/> minūtēm</translation> -<translation id="6945221475159498467">Atlasīt</translation> -<translation id="6620110761915583480">Saglabāt failu</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> sekunžu</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Atlikusi <ph name="NUMBER_ONE"/> minūte</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> minūtes</translation> -<translation id="8210608804940886430">Lejup</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> dienas</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/>stundas atlikušas</translation> -<translation id="5329858601952122676">Dzēst</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> sekundes</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">Vakar</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutes</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> minūtes atlikušas</translation> -<translation id="6659594942844771486">Cilne</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523">Pirms <ph name="NUMBER_DEFAULT"/> dienām</translation> -<translation id="8428213095426709021">Iestatījumi</translation> -<translation id="2497284189126895209">Visi faili</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minutes left</translation> -<translation id="5110450810124758964">Pirms <ph name="NUMBER_ONE"/> dienas</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> sekundes</translation> -<translation id="7814458197256864873">Ko&pēt</translation> -<translation id="3889424535448813030">Labā bulta</translation> -<translation id="4229495110203539533">Pirms <ph name="NUMBER_ONE"/> sekundes</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> sekundes atlikušas</translation> -<translation id="6829324100069873704">Atgriezties paziņojumos</translation> -<translation id="6528179044667508675">Netraucēt</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> sekundes</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> minūtes</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Atļaut paziņojumu saņemšanu no:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> stundas</translation> -<translation id="1398853756734560583">Maksimizēt</translation> -<translation id="4250229828105606438">Ekrānuzņēmums</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> stundas</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> minūtes atlikušas</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Izvēlēties visus</translation> -<translation id="2168039046890040389">Augšup</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/>dienas</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> minūtes</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minūte</translation> -<translation id="8448317557906454022">Pirms <ph name="NUMBER_ZERO"/> sekundēm</translation> -<translation id="4927753642311223124">Te nekā nav, varat doties tālāk!</translation> -<translation id="2482878487686419369">Paziņojumi</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Ritināt šeit</translation> -<translation id="4552416320897244156">Lejup</translation> -<translation id="7052633198403197513">taustiņš F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> stundas</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">Multivide — atskaņot/apturēt</translation> -<translation id="2148716181193084225">Šodien</translation> -<translation id="7960078400008666149">Netraucēt stundu</translation> -<translation id="4373894838514502496">Pirms <ph name="NUMBER_FEW"/> minūtēm</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> dienas</translation> -<translation id="2190355936436201913">(tukšs)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> stundas atlikušas</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> sekundes atlikušas</translation> -<translation id="8447116497070723931">Augšup</translation> -<translation id="4588090240171750605">Ritināt pa labi</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> stundas atlikušas</translation> -<translation id="1413622004203049571">Atspējot paziņojumu saņemšanu no: <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Augša</translation> -<translation id="8331626408530291785">Ritināt augšup</translation> -<translation id="7907591526440419938">Atvērt failu</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Atsolis</translation> -<translation id="2797524280730715045">Pirms <ph name="NUMBER_DEFAULT"/> stundām</translation> -<translation id="815598010540052116">Ritināt lejup</translation> -<translation id="6808150112686056157">Multivide — pārtraukt</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Atjaunot</translation> -<translation id="1243314992276662751">Augšupielādēt</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> dienas atlikušas</translation> -<translation id="8179976553408161302">Ievadīt</translation> -<translation id="945522503751344254">Sūtīt atsauksmes</translation> -<translation id="9170848237812810038">&Atsaukt</translation> -<translation id="1285266685456062655">Pirms <ph name="NUMBER_FEW"/> stundām</translation> -<translation id="6918245111648057970">Atļaut paziņojumus visiem lietotājiem no:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> sekunde</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minutes left</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Iestatījumi...</translation> -<translation id="6845383723252244143">Atlasīt mapi</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> sekundes</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> sekundes</translation> -<translation id="5583640892426849032">Atkāpšanās taustiņš</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> dienas</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> stunda</translation> -<translation id="2679312662830811292">Pirms <ph name="NUMBER_ONE"/> minūtes</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> diena</translation> -<translation id="9098468523912235228">Pirms <ph name="NUMBER_DEFAULT"/> sekundēm</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> sekundes atlikušas</translation> -<translation id="4570886800634958009">Paziņojuma izvēršana</translation> -<translation id="436869212180315161">Nospiediet</translation> -<translation id="4860787810836767172">Pirms <ph name="NUMBER_FEW"/> sekundēm</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minūšu</translation> -<translation id="1858722859751911017">Atlikušas <ph name="NUMBER_FEW"/> minūtes</translation> -<translation id="6040143037577758943">Aizvērt</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Palīdzība</translation> -<translation id="6699343763173986273">Multivide — nākamā dziesma</translation> -<translation id="8226233771743600312">Netraucēt dienu</translation> -<translation id="7457942297256758195">Notīrīt visu</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> minūtes</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> dienas atlikušas</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minūtes</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/>stundas atlikušas</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> sekundes</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> sekundes</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> seconds</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> dienas atlikušas</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Kopēt starpliktuvē</translation> -<translation id="8371695176452482769">Runājiet tūlīt</translation> -<translation id="6965382102122355670">Labi</translation> -<translation id="7850320739366109486">Netraucēt</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimizēt</translation> -<translation id="6394627529324717982">Komats</translation> -<translation id="3036649622769666520">Atvērt failus</translation> -<translation id="8328145009876646418">Kreisā mala</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> seconds</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_ml.xtb b/chromium/ui/base/strings/ui_strings_ml.xtb deleted file mode 100644 index 3927fb51df8..00000000000 --- a/chromium/ui/base/strings/ui_strings_ml.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ml"> -<translation id="4820616160060340806">കമാൻഡ്+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">അവസാനം</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> സെക്കന്റ് ശേഷിക്കുന്നു</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> സെക്കന്റ് അവശേഷിക്കുന്നു</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> മിനിറ്റ് അവശേഷിക്കുന്നു</translation> -<translation id="1801827354178857021">കാലയളവ്</translation> -<translation id="1190609913194133056">അറിയിപ്പ് കേന്ദ്രം</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> മിനിറ്റ് ശേഷിക്കുന്നു</translation> -<translation id="5613020302032141669">ഇടത് ആരോ അടയാളം</translation> -<translation id="4971687151119236543">മുമ്പത്തെ മീഡിയ ട്രാക്ക്</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> ഫയല് (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> സെക്കന്റ്</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> മണിക്കൂര് അവശേഷിക്കുന്നു</translation> -<translation id="8717309436826820190"><ph name="SOURCE_OF_NOTIFICATIONS"/>-ൽ നിന്നുള്ള <ph name="NUMBER_OF_NOTIFICATIONS"/> അറിയിപ്പുകൾ</translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">റദ്ദാക്കുക</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">മുകളിലേക്കുള്ള അമ്പടയാളം</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> മണിക്കൂര്</translation> -<translation id="3990502903496589789">വലത് അഗ്രം</translation> -<translation id="9038489124413477075">പേരിടാത്ത ഫോൾഡർ</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> മിനിറ്റ്</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> ദിവസം ശേഷിക്കുന്നു</translation> -<translation id="932327136139879170">ഹോം</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> മിനിറ്റ് അവശേഷിക്കുന്നു</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> ദിവസം അവശേഷിക്കുന്നു</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> സെക്കന്റ് അവശേഷിക്കുന്നു</translation> -<translation id="3909791450649380159">&മുറിക്കുക</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> മിനിറ്റ് ശേഷിക്കുന്നു</translation> -<translation id="688711909580084195">ശീർഷകമില്ലാത്ത വെബ്പേജ്</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">&ഒട്ടിക്കുക</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">അപ്ലോഡുചെയ്യുന്നതിന് ഫോൾഡർ തിരഞ്ഞെടുക്കുക</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">താഴേക്കുള്ള ആരോ അടയാളം</translation> -<translation id="3087734570205094154">താഴെ</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> മിനിറ്റ് ശേഷിക്കുന്നു</translation> -<translation id="1860796786778352021">അറിയിപ്പ് അടയ്ക്കൽ</translation> -<translation id="6364916375976753737">ഇടത്തേക്ക് സ്ക്രോള് ചെയ്യുക</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> hour ago</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> മിനിറ്റ്</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> mins ago</translation> -<translation id="6945221475159498467">തിരഞ്ഞെടുക്കുക</translation> -<translation id="6620110761915583480">ഫയല് സംരക്ഷിക്കുക</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> സെക്കൻഡ്</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> മിനിറ്റ് ശേഷിക്കുന്നു</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> മിനിറ്റ്</translation> -<translation id="8210608804940886430">താഴെയുള്ള പേജുകള്</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> ദിവസം</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> മണിക്കൂര് ശേഷിക്കുന്നു</translation> -<translation id="5329858601952122676">&ഇല്ലാതാക്കൂ</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> സെക്കന്റ്</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> മിനിറ്റ്</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">ഇന്നലെ</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> മിനിറ്റ്</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> മിനിറ്റ് അവശേഷിക്കുന്നു</translation> -<translation id="6659594942844771486">ടാബ്</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> days ago</translation> -<translation id="8428213095426709021">ക്രമീകരണം</translation> -<translation id="2497284189126895209">എല്ലാ ഫയലുകളും</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> മിനിറ്റ് ശേഷിക്കുന്നു</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> day ago</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> സെക്കന്റ്</translation> -<translation id="7814458197256864873">&പകര്ത്തൂ</translation> -<translation id="3889424535448813030">വലതുഭാഗത്തെ അമ്പടയാളം</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> sec ago</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> സെക്കന്റ് അവശേഷിക്കുന്നു</translation> -<translation id="6829324100069873704">അറിയിപ്പുകളിലേക്ക് തിരിച്ചുപോവുക</translation> -<translation id="6528179044667508675">ശല്യപ്പെടുത്തരുത്</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> സെക്കൻഡ്</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> മിനിറ്റ്</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">ഇനിപ്പറയുന്നതിൽ നിന്നുള്ള അറിയിപ്പുകൾ അനുവദിക്കുക:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> മണിക്കൂര്</translation> -<translation id="1398853756734560583">വലുതാക്കുക</translation> -<translation id="4250229828105606438">സ്ക്രീൻഷോട്ട്</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> മണിക്കൂര്</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> മിനിറ്റ് അവശേഷിക്കുന്നു</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">എല്ലാം &തിരഞ്ഞെടുക്കൂ</translation> -<translation id="2168039046890040389">പേജ് മുകളിലേയ്ക്ക്</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> ദിവസം</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> മിനിറ്റ്</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> മിനിറ്റ്</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">ഇവിടെ കാണുന്നതിനായി ഒന്നുമില്ല, തുടരുക.</translation> -<translation id="2482878487686419369">വിജ്ഞാപനങ്ങള്</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">ഇവിടെ സ്ക്രോള് ചെയ്യുക</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> മണിക്കൂര്</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">മീഡിയ പ്ലേ ചെയ്യുക/താൽക്കാലികമായി നിർത്തുക</translation> -<translation id="2148716181193084225">ഇന്ന്</translation> -<translation id="7960078400008666149">ഒരു മണിക്കൂർ നേരത്തേക്ക് ശല്യപ്പെടുത്തരുത്</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> ദിവസം</translation> -<translation id="2190355936436201913">(ശൂന്യം)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> മണിക്കൂര് അവശേഷിക്കുന്നു</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> സെക്കന്റ് അവശേഷിക്കുന്നു</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">വലത്തോട്ട് സ്ക്രോള് ചെയ്യുക</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> മണിക്കൂര് ശേഷിക്കുന്നു</translation> -<translation id="1413622004203049571"><ph name="NOTIFIER_NAME"/> എന്നതിൽ നിന്നുള്ള അറിയിപ്പുകൾ പ്രവർത്തനരഹിതമാക്കുക</translation> -<translation id="2666092431469916601">മുകളിലേക്ക്</translation> -<translation id="8331626408530291785">മുകളിലേക്ക് സ്ക്രോള് ചെയ്യൂ</translation> -<translation id="7907591526440419938">ഫയല് തുറക്കുക</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> hours ago</translation> -<translation id="815598010540052116">താഴേക്ക് സ്ക്രോള്ചെയ്യൂ</translation> -<translation id="6808150112686056157">മീഡിയ നിർത്തുക</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">പുനഃസ്ഥാപിക്കുക</translation> -<translation id="1243314992276662751">അപ്ലോഡുചെയ്യുക</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> ദിവസം അവശേഷിക്കുന്നു</translation> -<translation id="8179976553408161302">നൽകുക</translation> -<translation id="945522503751344254">ഫീഡ്ബാക്ക് അയയ്ക്കുക</translation> -<translation id="9170848237812810038">&പൂര്വാവസ്ഥയിലാക്കുക</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">ഇനിപ്പറയുന്നതിൽ നിന്ന് ഓരോ ഉപയോക്താവിനും അറിയിപ്പുകൾ അനുവദിക്കുക:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> സെക്കൻഡ്</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> മിനിറ്റ് ശേഷിക്കുന്നു</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">ക്രമീകരണങ്ങള്...</translation> -<translation id="6845383723252244143">ഫോള്ഡര് തിരഞ്ഞെടുക്കുക</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> സെക്കൻഡ്</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> സെക്കന്റ്</translation> -<translation id="5583640892426849032">ബാക്ക്സ്പെയ്സ്</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> ദിവസം</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> മണിക്കൂര്</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> min ago</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> ദിവസം</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> സെക്കന്റ് മുമ്പ്</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> സെക്കന്റ് അവശേഷിക്കുന്നു</translation> -<translation id="4570886800634958009">അറിയിപ്പ് വിപുലീകരണം</translation> -<translation id="436869212180315161">അമര്ത്തുക</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> മിനിറ്റ്</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> മിനിറ്റ് ശേഷിക്കുന്നു</translation> -<translation id="6040143037577758943">അടയ്ക്കുക</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">സഹായം</translation> -<translation id="6699343763173986273">അടുത്ത മീഡിയ ട്രാക്ക്</translation> -<translation id="8226233771743600312">ഒരു ദിവസത്തേക്ക് ശല്യപ്പെടുത്തരുത്</translation> -<translation id="7457942297256758195">എല്ലാം മായ്ക്കുക</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> മിനിറ്റ്</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> ദിവസം അവശേഷിക്കുന്നു</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> മിനിറ്റ്</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> മണിക്കൂര് ശേഷിക്കുന്നു</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> സെക്കന്റ്</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> സെക്കന്റ്</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> സെക്കൻഡ്</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> ദിവസം അവശേഷിക്കുന്നു</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">ക്ലിപ്പ്ബോർഡിലേക്ക് പകർത്തുക</translation> -<translation id="8371695176452482769">ഇപ്പോള് സംസാരിക്കുക</translation> -<translation id="6965382102122355670">ശരി</translation> -<translation id="7850320739366109486">ശല്യം ചെയ്യരുത്</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">ചെറുതാക്കുക</translation> -<translation id="6394627529324717982">കോമ</translation> -<translation id="3036649622769666520">ഫയലുകള് തുറക്കുക</translation> -<translation id="8328145009876646418">ഇടത് അഗ്രം</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> സെക്കൻഡ്</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_mr.xtb b/chromium/ui/base/strings/ui_strings_mr.xtb deleted file mode 100644 index 733441dd0ef..00000000000 --- a/chromium/ui/base/strings/ui_strings_mr.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="mr"> -<translation id="4820616160060340806">आदेश+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">समाप्त</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> से बाकी</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> से बाकी</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> मिनिटे बाकी</translation> -<translation id="1801827354178857021">अवधी</translation> -<translation id="1190609913194133056">सूचना केंद्र</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> मिनिटे शिल्लक</translation> -<translation id="5613020302032141669">Left Arrow</translation> -<translation id="4971687151119236543">मीडिया मागील ट्रॅक</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> फाइल (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> से</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> तास बाकी</translation> -<translation id="8717309436826820190"><ph name="SOURCE_OF_NOTIFICATIONS"/> मधून <ph name="NUMBER_OF_NOTIFICATIONS"/> अधिक</translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">रद्द करा</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Up Arrow</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> तास</translation> -<translation id="3990502903496589789">उजवा काठ</translation> -<translation id="9038489124413477075">अनामित फोल्डर</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> मि</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> दिवस बाकी</translation> -<translation id="932327136139879170">मुख्यपृष्ठ</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> मि बाकी</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> दिवस बाकी</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> से बाकी</translation> -<translation id="3909791450649380159">क&ट करा</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> मिनिटे शिल्लक</translation> -<translation id="688711909580084195">अशीर्षकांकीत वेबपृष्ठ</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">&पेस्ट करा</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">अपलोड करण्यासाठी फोल्डर निवडा</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">Down Arrow</translation> -<translation id="3087734570205094154">तळाकडील</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> मि बाकी</translation> -<translation id="1860796786778352021">सूचना बंद</translation> -<translation id="6364916375976753737">डावीकडे स्क्रोल करा</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> hour ago</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> मिनिटे</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> mins ago</translation> -<translation id="6945221475159498467">निवडा</translation> -<translation id="6620110761915583480">फाइल जतन करा</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> सेकंद</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> मिनिट शिल्लक</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> मि</translation> -<translation id="8210608804940886430">पृष्ठ खाली</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> दिवस</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> तास बाकी</translation> -<translation id="5329858601952122676">&हटवा</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> से</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> मिनिटे</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">काल</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> मिनिटे</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> मि बाकी</translation> -<translation id="6659594942844771486">टॅब</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> days ago</translation> -<translation id="8428213095426709021">सेटिंग्ज</translation> -<translation id="2497284189126895209">सर्व फाइल</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> मिनिटे शिल्लक</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> day ago</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> से</translation> -<translation id="7814458197256864873">&कॉपी करा</translation> -<translation id="3889424535448813030">Right Arrow</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> sec ago</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> से बाकी</translation> -<translation id="6829324100069873704">सूचनांवर परत जा</translation> -<translation id="6528179044667508675">व्यत्यय आणू नका</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> सेकंद</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> मि</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">खालील लोकांकडील सूचनांना अनुमत करा:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> तास</translation> -<translation id="1398853756734560583">वाढवा</translation> -<translation id="4250229828105606438">स्क्रीनशॉट</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> तास</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> मि बाकी</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">&सर्व निवडा</translation> -<translation id="2168039046890040389">पृष्ठ वर</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> दिवस</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> मि</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> मिनिट</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">येथे पाहण्यासाठी काही नाही, पुढे चला.</translation> -<translation id="2482878487686419369">सूचना</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">येथे स्क्रोल करा</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> तास</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">मीडिया प्ले करा/विराम द्या</translation> -<translation id="2148716181193084225">आज</translation> -<translation id="7960078400008666149">एक तास व्यत्यय आणू नका</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> दिवस</translation> -<translation id="2190355936436201913">(रिक्त)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> तास बाकी</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> से बाकी</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">उजवे स्क्रोल करा</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> तास बाकी</translation> -<translation id="1413622004203049571"><ph name="NOTIFIER_NAME"/> वरील सूचना अक्षम करा</translation> -<translation id="2666092431469916601">शीर्ष</translation> -<translation id="8331626408530291785">वर स्क्रोल करा</translation> -<translation id="7907591526440419938">फाइल उघडा</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> hours ago</translation> -<translation id="815598010540052116">खाली स्क्रोल करा</translation> -<translation id="6808150112686056157">मीडिया थांबवा</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">पुनर्संचयित करा</translation> -<translation id="1243314992276662751">अपलोड करा</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> दिवस बाकी</translation> -<translation id="8179976553408161302">प्रवेश करा</translation> -<translation id="945522503751344254">अभिप्राय पाठवा</translation> -<translation id="9170848237812810038">&पूर्ववत करा</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">प्रत्येक वापरकर्त्यासाठी खालील मधून सूचनांना अनुमती द्या:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> सेकंद</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> मिनिटे शिल्लक</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">सेटिंग्ज...</translation> -<translation id="6845383723252244143">फोल्डर निवडा</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> सेकंद</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> से</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> दिवस</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> तास</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> min ago</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> दिवस</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> secs ago</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> से बाकी</translation> -<translation id="4570886800634958009">सूचना विस्तार</translation> -<translation id="436869212180315161">दाबा</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> मिनिटे</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> मिनिटे शिल्लक</translation> -<translation id="6040143037577758943">बंद करा</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">मदत</translation> -<translation id="6699343763173986273">मीडिया पुढील ट्रॅक</translation> -<translation id="8226233771743600312">एक दिवस व्यत्यय आणू नका</translation> -<translation id="7457942297256758195">सर्व साफ करा</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> मि</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> दिवस बाकी</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> मिनिटे</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> तास बाकी</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> से</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> से</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> सेकंद</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> दिवस बाकी</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">क्लिपबोर्डवर कॉपी करा</translation> -<translation id="8371695176452482769">आता बोला</translation> -<translation id="6965382102122355670">ठिक आहे</translation> -<translation id="7850320739366109486">व्यत्यय आणू नका</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">लहान करा</translation> -<translation id="6394627529324717982">स्वल्पविराम</translation> -<translation id="3036649622769666520">फायली उघडा</translation> -<translation id="8328145009876646418">डावे काठ</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> सेकंद</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_ms.xtb b/chromium/ui/base/strings/ui_strings_ms.xtb deleted file mode 100644 index 82263788e03..00000000000 --- a/chromium/ui/base/strings/ui_strings_ms.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ms"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> jam yang lalu</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> saat lagi</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> saat lagi</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> minit lagi</translation> -<translation id="1801827354178857021">Tempoh</translation> -<translation id="1190609913194133056">Pusat Pemberitahuan</translation> -<translation id="7470933019269157899">Tinggal <ph name="NUMBER_DEFAULT"/> minit</translation> -<translation id="5613020302032141669">Anak Panah Kiri</translation> -<translation id="4971687151119236543">Lagu Media Sebelumnya</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> Fail (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> minit yang lalu</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> saat</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> jam lagi</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> lagi dari <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Batal</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Anak Panah Atas</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> jam</translation> -<translation id="3990502903496589789">Tepi Kanan</translation> -<translation id="9038489124413477075">Folder Tanpa Nama</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> mins</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> hari lagi</translation> -<translation id="932327136139879170">Halaman Utama</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> minit lagi</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> hari lagi</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> saat lagi</translation> -<translation id="3909791450649380159">Po&tong</translation> -<translation id="2560788951337264832">Tinggal <ph name="NUMBER_ZERO"/> minit</translation> -<translation id="688711909580084195">Laman Web Tidak Bertajuk</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> hari yang lalu</translation> -<translation id="5076340679995252485">&Tampal</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Pilih Folder untuk Dimuat Naik</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> minit lalu</translation> -<translation id="3234408098842461169">Anak Panah Bawah</translation> -<translation id="3087734570205094154">Bawah</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> minit lagi</translation> -<translation id="1860796786778352021">Tutup Pemberitahuan</translation> -<translation id="6364916375976753737">Tatal Ke Kiri</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> jam yang lalu</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minit</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> minit yang lalu</translation> -<translation id="6945221475159498467">Pilih</translation> -<translation id="6620110761915583480">Simpan Fail</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> saat</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> jam</translation> -<translation id="7836361698254323868">Tinggal <ph name="NUMBER_ONE"/> minit</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> minit</translation> -<translation id="8210608804940886430">Ke Bawah Halaman</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> hari</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> jam lagi</translation> -<translation id="5329858601952122676">&Padam</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> saat</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minit</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> saat yang lalu</translation> -<translation id="7781829728241885113">Semalam</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minit</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> minit lagi</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> hari yang lalu</translation> -<translation id="8428213095426709021">Tetapan</translation> -<translation id="2497284189126895209">Semua Fail</translation> -<translation id="7487278341251176613">Tinggal <ph name="NUMBER_TWO"/> minit</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> hari yang lalu</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> saat</translation> -<translation id="7814458197256864873">&Salin</translation> -<translation id="3889424535448813030">Anak Panah Kanan</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> saat yang lalu</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> saat lagi</translation> -<translation id="6829324100069873704">Kembali ke pemberitahuan</translation> -<translation id="6528179044667508675">Jangan ganggu</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> saat</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> mins</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> jam lagi</translation> -<translation id="7135556860107312402">Benarkan pemberitahuan daripada yang berikut:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> jam</translation> -<translation id="1398853756734560583">Maksimumkan</translation> -<translation id="4250229828105606438">Tangkapan skrin</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> jam</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> minit lagi</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Pilih &semua</translation> -<translation id="2168039046890040389">Halaman Ke Atas</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> hari</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> mins</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minit</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> saat yang lalu</translation> -<translation id="4927753642311223124">Tiada apa-apa untuk dilihat di sini, teruskan.</translation> -<translation id="2482878487686419369">Pemberitahuan</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> hari</translation> -<translation id="3183922693828471536">Tatal ke Sini</translation> -<translation id="4552416320897244156">BwhHlmn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> jam</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">Main/Jeda Media</translation> -<translation id="2148716181193084225">Hari ini</translation> -<translation id="7960078400008666149">Jangan ganggu selama sejam</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> minit yang lalu</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> hari</translation> -<translation id="2190355936436201913">(kosong)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> jam lagi</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> saat lagi</translation> -<translation id="8447116497070723931">AtsHlmn</translation> -<translation id="4588090240171750605">Tatal ke Kanan</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> jam lagi</translation> -<translation id="1413622004203049571">Lumpuhkan pemberitahuan daripada <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Atas</translation> -<translation id="8331626408530291785">Tatal Ke Atas</translation> -<translation id="7907591526440419938">Buka Fail</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> hari lagi</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> jam lalu</translation> -<translation id="815598010540052116">Tatal Ke Bawah</translation> -<translation id="6808150112686056157">Media Berhenti</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> minit lagi</translation> -<translation id="3157931365184549694">Pulihkan</translation> -<translation id="1243314992276662751">Muat naik</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> hari lagi</translation> -<translation id="8179976553408161302">Masuk</translation> -<translation id="945522503751344254">Hantar maklum balas</translation> -<translation id="9170848237812810038">&Buat asal</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> jam yang lalu</translation> -<translation id="6918245111648057970">Benarkan pemberitahuan daripada yang berikut untuk setiap pengguna:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> saat</translation> -<translation id="3994835489895548312">Tinggal <ph name="NUMBER_MANY"/> minit</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> saat yang lalu</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Tetapan...</translation> -<translation id="6845383723252244143">Pilih Folder</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> saat</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> saat</translation> -<translation id="5583640892426849032">Undur ruang</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> hari yang lalu</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> hari</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> jam</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> minit yang lalu</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> jam yang lalu</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> hari</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> saat yang lalu</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> saat lagi</translation> -<translation id="4570886800634958009">Kembangkan pemberitahuan</translation> -<translation id="436869212180315161">Tekan</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> saat yang lalu</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minit</translation> -<translation id="1858722859751911017">Tinggal <ph name="NUMBER_FEW"/> minit</translation> -<translation id="6040143037577758943">Tutup</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> minit yang lalu</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Bantuan</translation> -<translation id="6699343763173986273">Lagu Media Seterusnya</translation> -<translation id="8226233771743600312">Jangan ganggu selama sehari</translation> -<translation id="7457942297256758195">Kosongkan Semua</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> hari yang lalu</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> mins</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> hari lagi</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minit</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> jam lagi</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> jam yang lalu</translation> -<translation id="8400147561352026160">Anjak+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> saat</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> saat</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> saat</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> hari lagi</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Salin ke papan keratan</translation> -<translation id="8371695176452482769">Cakap sekarang</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Jangan Ganggu</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> hari yang lalu</translation> -<translation id="5941711191222866238">Minimumkan</translation> -<translation id="6394627529324717982">Koma</translation> -<translation id="3036649622769666520">Buka Fail</translation> -<translation id="8328145009876646418">Tepi Kiri</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> saat</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_nl.xtb b/chromium/ui/base/strings/ui_strings_nl.xtb deleted file mode 100644 index 1e5591570cb..00000000000 --- a/chromium/ui/base/strings/ui_strings_nl.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="nl"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> uur geleden</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> seconden resterend</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> seconden resterend</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> minuten resterend</translation> -<translation id="1801827354178857021">Punt</translation> -<translation id="1190609913194133056">Meldingscentrum</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> minuten resterend</translation> -<translation id="5613020302032141669">Pijl-links</translation> -<translation id="4971687151119236543">Vorige track voor media</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/>-bestand (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> seconden</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> uur resterend</translation> -<translation id="8717309436826820190">Nog <ph name="NUMBER_OF_NOTIFICATIONS"/> andere van <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Annuleren</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Pijl-omhoog</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> uur</translation> -<translation id="3990502903496589789">Rechterzijde</translation> -<translation id="9038489124413477075">Naamloze map</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> minuten</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> dagen resterend</translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> minuten resterend</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> dagen resterend</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> seconden resterend</translation> -<translation id="3909791450649380159">&Knippen</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minuten resterend</translation> -<translation id="688711909580084195">Naamloze webpagina</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> dagen geleden</translation> -<translation id="5076340679995252485">&Plakken</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Map voor uploaden selecteren</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> minuten geleden</translation> -<translation id="3234408098842461169">Pijl-omlaag</translation> -<translation id="3087734570205094154">Onderaan</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> minuut resterend</translation> -<translation id="1860796786778352021">Melding sluiten</translation> -<translation id="6364916375976753737">Naar links bladeren</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> uur geleden</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minuten</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> minuten geleden</translation> -<translation id="6945221475159498467">Selecteren</translation> -<translation id="6620110761915583480">Bestand opslaan</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> seconden</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> minuut resterend</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> minuut</translation> -<translation id="8210608804940886430">Pagina omlaag</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> dagen</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> uur resterend</translation> -<translation id="5329858601952122676">Verwij&deren</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> seconden</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> seconden geleden</translation> -<translation id="7781829728241885113">Gisteren</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minuten</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> minuten resterend</translation> -<translation id="6659594942844771486">Tabblad</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> dagen geleden</translation> -<translation id="8428213095426709021">Instellingen</translation> -<translation id="2497284189126895209">Alle bestanden</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minuten resterend</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> dag geleden</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> sec</translation> -<translation id="7814458197256864873">&Kopiëren</translation> -<translation id="3889424535448813030">Pijl-rechts</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> seconde geleden</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> seconden resterend</translation> -<translation id="6829324100069873704">Terug naar meldingen</translation> -<translation id="6528179044667508675">Niet storen</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> seconden</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> minuten</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Meldingen toestaan van het volgende:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> uur</translation> -<translation id="1398853756734560583">Maximaliseren</translation> -<translation id="4250229828105606438">Screenshot</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> uur</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> minuten resterend</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">&Alles selecteren</translation> -<translation id="2168039046890040389">Pagina omhoog</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> dagen</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> minuten</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minuut</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> seconden geleden</translation> -<translation id="4927753642311223124">Er zijn geen meldingen.</translation> -<translation id="2482878487686419369">Meldingen</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Hiernaartoe bladeren</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> uur</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> kB/s</translation> -<translation id="8394908167088220973">Media afspelen/onderbreken</translation> -<translation id="2148716181193084225">Vandaag</translation> -<translation id="7960078400008666149">Een uur niet storen</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> minuten geleden</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> dagen</translation> -<translation id="2190355936436201913">(leeg)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> uur resterend</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> seconde resterend</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Naar rechts bladeren</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> uur resterend</translation> -<translation id="1413622004203049571">Meldingen van <ph name="NOTIFIER_NAME"/> uitschakelen</translation> -<translation id="2666092431469916601">Boven</translation> -<translation id="8331626408530291785">Omhoog bladeren</translation> -<translation id="7907591526440419938">Bestand openen</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> uur geleden</translation> -<translation id="815598010540052116">Omlaag bladeren</translation> -<translation id="6808150112686056157">Media stoppen</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Herstellen</translation> -<translation id="1243314992276662751">Uploaden</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> dag resterend</translation> -<translation id="8179976553408161302">Beginnen</translation> -<translation id="945522503751344254">Feedback verzenden</translation> -<translation id="9170848237812810038">&Ongedaan maken</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> uur geleden</translation> -<translation id="6918245111648057970">Melden van het volgende toestaan voor elke gebruiker:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> seconde</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minuten resterend</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> seconden geleden</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Instellingen...</translation> -<translation id="6845383723252244143">Map selecteren</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> seconds</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> seconden</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> dagen geleden</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> dagen</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> uur</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> minuut geleden</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> dag</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> seconden geleden</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> seconden resterend</translation> -<translation id="4570886800634958009">Melding uitbreiden</translation> -<translation id="436869212180315161">Drukken</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> seconden geleden</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minuten</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> minuten resterend</translation> -<translation id="6040143037577758943">Sluiten</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> minuten geleden</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Help</translation> -<translation id="6699343763173986273">Volgende track voor media</translation> -<translation id="8226233771743600312">Een dag niet storen</translation> -<translation id="7457942297256758195">Alles wissen</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> dagen geleden</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> minuten</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> dagen resterend</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minutes</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> uur resterend</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> uur geleden</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> seconden</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> seconden</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> seconds</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> dagen resterend</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Kopiëren naar klembord</translation> -<translation id="8371695176452482769">Begin nu te spreken</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Niet storen</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimaliseren</translation> -<translation id="6394627529324717982">Komma</translation> -<translation id="3036649622769666520">Bestanden openen</translation> -<translation id="8328145009876646418">Linkerzijde</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> seconden</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_no.xtb b/chromium/ui/base/strings/ui_strings_no.xtb deleted file mode 100644 index 44b9eacfe94..00000000000 --- a/chromium/ui/base/strings/ui_strings_no.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="no"> -<translation id="4820616160060340806">Kommando + <ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> sekunder igjen</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> sekunder igjen</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> minutter igjen</translation> -<translation id="1801827354178857021">Punktum</translation> -<translation id="1190609913194133056">Varselsenter</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> minutter igjen</translation> -<translation id="5613020302032141669">Pil venstre</translation> -<translation id="4971687151119236543">Media – forrige spor</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> Fil (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> sekunder</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> timer igjen</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> til fra <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Avbryt</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Pil opp</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB per sek.</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> timer</translation> -<translation id="3990502903496589789">Høyre kant</translation> -<translation id="9038489124413477075">Mappe uten navn</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> minutter</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> dager igjen</translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> minutter igjen</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> dager igjen</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> sekunder igjen</translation> -<translation id="3909791450649380159">Klipp u&t</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minutter igjen</translation> -<translation id="688711909580084195">Nettside uten tittel</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">&Lim inn</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Velg mappen du vil laste opp</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">Pil ned</translation> -<translation id="3087734570205094154">Bunn</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> minutt igjen</translation> -<translation id="1860796786778352021">Lukk varsel</translation> -<translation id="6364916375976753737">Rull mot venstre</translation> -<translation id="2629089419211541119">For <ph name="NUMBER_ONE"/> time siden</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minutter</translation> -<translation id="6982279413068714821">For <ph name="NUMBER_DEFAULT"/> minutter siden</translation> -<translation id="6945221475159498467">Velg</translation> -<translation id="6620110761915583480">Lagre fil</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> sekunder</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> minutt igjen</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> minutt</translation> -<translation id="8210608804940886430">Ned 1 s.</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> dager</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> timer igjen</translation> -<translation id="5329858601952122676">&Slett</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> sekunder</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutter</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">I går</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutter</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> minutter igjen</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523">For <ph name="NUMBER_DEFAULT"/> dager siden</translation> -<translation id="8428213095426709021">Innstillinger</translation> -<translation id="2497284189126895209">Alle filer</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minutter igjen</translation> -<translation id="5110450810124758964">For <ph name="NUMBER_ONE"/> dag siden</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> sekund</translation> -<translation id="7814458197256864873">&Kopier</translation> -<translation id="3889424535448813030">Pil høyre</translation> -<translation id="4229495110203539533">For <ph name="NUMBER_ONE"/> sekund siden</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> sekunder igjen</translation> -<translation id="6829324100069873704">Gå tilbake til varsler</translation> -<translation id="6528179044667508675">Ikke forstyrr</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> sekunder</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> minutter</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Tillat varsler fra følgende:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> timer</translation> -<translation id="1398853756734560583">Maksimer</translation> -<translation id="4250229828105606438">Skjermdump</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> timer</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> minutter igjen</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Marker &alt</translation> -<translation id="2168039046890040389">Opp 1 s.</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> dager</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> minutter</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minutt</translation> -<translation id="8448317557906454022">For <ph name="NUMBER_ZERO"/> sekunder siden</translation> -<translation id="4927753642311223124">Det er ikke noe å se her. Gå videre.</translation> -<translation id="2482878487686419369">Varslinger</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Rull hit</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> timer</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> kB per sek</translation> -<translation id="8394908167088220973">Media – spill av / pause</translation> -<translation id="2148716181193084225">I dag</translation> -<translation id="7960078400008666149">Ikke forstyrr i én time</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> dager</translation> -<translation id="2190355936436201913">(tom)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> timer igjen</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> sekund igjen</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Rull mot høyre</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> time igjen</translation> -<translation id="1413622004203049571">Deaktiver varsler fra <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Topp</translation> -<translation id="8331626408530291785">Rull opp</translation> -<translation id="7907591526440419938">Åpne filen</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">For <ph name="NUMBER_DEFAULT"/> timer siden</translation> -<translation id="815598010540052116">Rull ned</translation> -<translation id="6808150112686056157">Media – stopp</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Gjenopprett</translation> -<translation id="1243314992276662751">Last opp</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> dag igjen</translation> -<translation id="8179976553408161302">Start</translation> -<translation id="945522503751344254">Gi tilbakemelding</translation> -<translation id="9170848237812810038">&Angre</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">Tillat varsler fra følgende for hver bruker:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> sekund</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minutter igjen</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Innstillinger</translation> -<translation id="6845383723252244143">Velg mappe</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> sekunder</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> sekunder</translation> -<translation id="5583640892426849032">Tilbake-tasten</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> dager</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> time</translation> -<translation id="2679312662830811292">For <ph name="NUMBER_ONE"/> minutt siden</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB per sek</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> dag</translation> -<translation id="9098468523912235228">For <ph name="NUMBER_DEFAULT"/> sekunder siden</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> sekunder igjen</translation> -<translation id="4570886800634958009">Utvid varsel</translation> -<translation id="436869212180315161">Trykk</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB per sek</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minutter</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> minutter igjen</translation> -<translation id="6040143037577758943">Lukk</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B per sek</translation> -<translation id="7649070708921625228">Hjelp</translation> -<translation id="6699343763173986273">Media – neste spor</translation> -<translation id="8226233771743600312">Ikke forstyrr i en dag</translation> -<translation id="7457942297256758195">Fjern alle</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> minutter</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> dager igjen</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minutter</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> timer igjen</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Skift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> sekunder</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> sekunder</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> sekunder</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> dager igjen</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB per sek</translation> -<translation id="2743387203779672305">Kopiér til utklippstavlen</translation> -<translation id="8371695176452482769">Snakk nå</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Ikke forstyrr</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimer</translation> -<translation id="6394627529324717982">Komma</translation> -<translation id="3036649622769666520">Åpne filer</translation> -<translation id="8328145009876646418">Venstre kant</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> sekunder</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_pl.xtb b/chromium/ui/base/strings/ui_strings_pl.xtb deleted file mode 100644 index e754dd2e0aa..00000000000 --- a/chromium/ui/base/strings/ui_strings_pl.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="pl"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> sek</translation> -<translation id="9213479837033539041">Pozostało: <ph name="NUMBER_MANY"/> sek</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> min</translation> -<translation id="1801827354178857021">Okres</translation> -<translation id="1190609913194133056">Centrum powiadomień</translation> -<translation id="7470933019269157899">Pozostało <ph name="NUMBER_DEFAULT"/> minut</translation> -<translation id="5613020302032141669">Strzałka w lewo</translation> -<translation id="4971687151119236543">Poprzedni utwór multimedialny</translation> -<translation id="8602707065186045623">Plik <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> s</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> godz</translation> -<translation id="8717309436826820190">Jeszcze <ph name="NUMBER_OF_NOTIFICATIONS"/> z <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Anuluj</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Strzałka w górę</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> godz.</translation> -<translation id="3990502903496589789">Krawędź po prawej</translation> -<translation id="9038489124413477075">Folder bez nazwy</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> min</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> dni</translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> min</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> dni</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> sek</translation> -<translation id="3909791450649380159">Wy&tnij</translation> -<translation id="2560788951337264832">Pozostało <ph name="NUMBER_ZERO"/> minut</translation> -<translation id="688711909580084195">Strona internetowa bez tytułu</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> dni temu</translation> -<translation id="5076340679995252485">&Wklej</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Wybierz folder do przesłania</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> min temu</translation> -<translation id="3234408098842461169">Strzałka w dół</translation> -<translation id="3087734570205094154">Na dół</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> min do końca</translation> -<translation id="1860796786778352021">Zamknięcie powiadomienia</translation> -<translation id="6364916375976753737">Przewiń w lewo</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> godz. temu</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minuty</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> min temu</translation> -<translation id="6945221475159498467">Wybierz</translation> -<translation id="6620110761915583480">Zapisz plik</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> seconds</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Pozostała <ph name="NUMBER_ONE"/> minuta</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> min</translation> -<translation id="8210608804940886430">Strona w dół</translation> -<translation id="1572103024875503863">Liczba dni: <ph name="NUMBER_MANY"/></translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> godz</translation> -<translation id="5329858601952122676">&Usuń</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> s</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">Wczoraj</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutes</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> min</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> dni temu</translation> -<translation id="8428213095426709021">Ustawienia</translation> -<translation id="2497284189126895209">Wszystkie pliki</translation> -<translation id="7487278341251176613">Pozostały <ph name="NUMBER_TWO"/> minuty</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> dzień temu</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> s</translation> -<translation id="7814458197256864873">&Kopiuj</translation> -<translation id="3889424535448813030">Strzałka w prawo</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> s temu</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> sek</translation> -<translation id="6829324100069873704">Wróć do powiadomień</translation> -<translation id="6528179044667508675">Nie przeszkadzać</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> sekundy</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> min</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Zezwalaj na powiadomienia z:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> godz.</translation> -<translation id="1398853756734560583">Maksymalizuj</translation> -<translation id="4250229828105606438">Zrzut ekranu</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> godz.</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> min</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Zaznacz &wszystko</translation> -<translation id="2168039046890040389">Strona do góry</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581">Liczba dni: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> min</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minuta</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">Nic tu nie ma.</translation> -<translation id="2482878487686419369">Powiadomienia</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Przewiń tutaj</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> godz.</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> kB/s</translation> -<translation id="8394908167088220973">Odtwórz/wstrzymaj multimedia</translation> -<translation id="2148716181193084225">Dzisiaj</translation> -<translation id="7960078400008666149">Nie przeszkadzać przez godzinę</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> min temu</translation> -<translation id="4115153316875436289">Liczba dni: <ph name="NUMBER_TWO"/></translation> -<translation id="2190355936436201913">(puste)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> godz</translation> -<translation id="152482086482215392">Pozostała <ph name="NUMBER_ONE"/> sekunda</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Przewiń w prawo</translation> -<translation id="7414887922320653780">Pozostała <ph name="NUMBER_ONE"/> godzina</translation> -<translation id="1413622004203049571">Wyłącz powiadomienia z <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Do góry</translation> -<translation id="8331626408530291785">Przewiń w górę</translation> -<translation id="7907591526440419938">Otwórz plik</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> godz. temu</translation> -<translation id="815598010540052116">Przewiń w dół</translation> -<translation id="6808150112686056157">Zatrzymaj multimedia</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Przywróć</translation> -<translation id="1243314992276662751">Prześlij</translation> -<translation id="50030952220075532">Pozostał <ph name="NUMBER_ONE"/> dzień</translation> -<translation id="8179976553408161302">Start</translation> -<translation id="945522503751344254">Wyślij zgłoszenie</translation> -<translation id="9170848237812810038">&Cofnij</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> godz. temu</translation> -<translation id="6918245111648057970">Zezwól na powiadomienia dla każdego użytkownika z:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> sekunda</translation> -<translation id="3994835489895548312">Pozostało <ph name="NUMBER_MANY"/> minut</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Ustawienia</translation> -<translation id="6845383723252244143">Wybierz folder</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> sekundy</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> s</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920">Liczba dni: <ph name="NUMBER_FEW"/></translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> godz.</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> min temu</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> dzień</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> s temu</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> sek</translation> -<translation id="4570886800634958009">Rozwinięcie powiadomienia</translation> -<translation id="436869212180315161">Kliknij</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> s temu</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minutes</translation> -<translation id="1858722859751911017">Pozostały <ph name="NUMBER_FEW"/> minuty</translation> -<translation id="6040143037577758943">Zamknij</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Pomoc</translation> -<translation id="6699343763173986273">Następny utwór multimedialny</translation> -<translation id="8226233771743600312">Nie przeszkadzać przez jeden dzień</translation> -<translation id="7457942297256758195">Wyczyść wszystkie</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> dni temu</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> min</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> dni</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minuty</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> godz</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> s</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> s</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> seconds</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> dni</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Skopiuj do schowka</translation> -<translation id="8371695176452482769">Mów teraz</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Nie przeszkadzać</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimalizuj</translation> -<translation id="6394627529324717982">Przecinek</translation> -<translation id="3036649622769666520">Otwórz pliki</translation> -<translation id="8328145009876646418">Krawędź po lewej</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> seconds</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_pt-BR.xtb b/chromium/ui/base/strings/ui_strings_pt-BR.xtb deleted file mode 100644 index 13fa1e89e5b..00000000000 --- a/chromium/ui/base/strings/ui_strings_pt-BR.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="pt-BR"> -<translation id="4820616160060340806">Comando+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> segundos restantes</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> segundos restantes</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> minutos restantes</translation> -<translation id="1801827354178857021">Ponto final</translation> -<translation id="1190609913194133056">Central de Notificações</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> minutos restantes</translation> -<translation id="5613020302032141669">Seta para a esquerda</translation> -<translation id="4971687151119236543">Faixa anterior da mídia</translation> -<translation id="8602707065186045623">Arquivo <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> s</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> horas restantes</translation> -<translation id="8717309436826820190">Mais <ph name="NUMBER_OF_NOTIFICATIONS"/> de <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Cancelar</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> bytes</translation> -<translation id="3660179305079774227">Seta para cima</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> horas</translation> -<translation id="3990502903496589789">Borda direita</translation> -<translation id="9038489124413477075">Pasta sem nome</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> minutos</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> dias restantes</translation> -<translation id="932327136139879170">Página inicial</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> minutos restantes</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> dias restantes</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> segundos restantes</translation> -<translation id="3909791450649380159">&Recortar</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minutes left</translation> -<translation id="688711909580084195">Página da web sem título</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">&Colar</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Selecionar pasta para upload</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">Seta para baixo</translation> -<translation id="3087734570205094154">Parte inferior</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> minutos restantes</translation> -<translation id="1860796786778352021">Fechar notificação</translation> -<translation id="6364916375976753737">Percorrer à esquerda</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> hora atrás</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minutos</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> minutos atrás</translation> -<translation id="6945221475159498467">Selecionar</translation> -<translation id="6620110761915583480">Salvar arquivo</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> segundos</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> minuto restante</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> minuto</translation> -<translation id="8210608804940886430">Página para baixo</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> dias</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> horas restantes</translation> -<translation id="5329858601952122676">&Excluir</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> s</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutos</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">Ontem</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutos</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> minutos restantes</translation> -<translation id="6659594942844771486">Guia</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> dias atrás</translation> -<translation id="8428213095426709021">Configurações</translation> -<translation id="2497284189126895209">Todos os arquivos</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minutes left</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> dia atrás</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> s</translation> -<translation id="7814458197256864873">Co&piar</translation> -<translation id="3889424535448813030">Seta para a direita</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> segundo atrás</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> segundos restantes</translation> -<translation id="6829324100069873704">Voltar para notificações</translation> -<translation id="6528179044667508675">Não perturbe</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> segundos</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> minutos</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Permitir as seguintes notificações:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> horas</translation> -<translation id="1398853756734560583">Maximizar</translation> -<translation id="4250229828105606438">Captura de tela</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> horas</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> minutos restantes</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Selecionar &tudo</translation> -<translation id="2168039046890040389">Página para cima</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> dias</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> minutos</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minuto</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">Nada para ver aqui, siga em frente.</translation> -<translation id="2482878487686419369">Notificações</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Percorrer até aqui</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> horas</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">Reproduzir/pausar mídia</translation> -<translation id="2148716181193084225">Hoje</translation> -<translation id="7960078400008666149">Não perturbe por uma hora</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> dias</translation> -<translation id="2190355936436201913">(vazio)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> horas restantes</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> segundo restante</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Percorrer à direita</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> hora restante</translation> -<translation id="1413622004203049571">Desativar notificações de <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Parte superior</translation> -<translation id="8331626408530291785">Percorrer para cima</translation> -<translation id="7907591526440419938">Abrir arquivo</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> horas atrás</translation> -<translation id="815598010540052116">Percorrer para baixo</translation> -<translation id="6808150112686056157">Parar mídia</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Restaurar</translation> -<translation id="1243314992276662751">Fazer upload</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> dia restante</translation> -<translation id="8179976553408161302">Entrar</translation> -<translation id="945522503751344254">Enviar comentários</translation> -<translation id="9170848237812810038">&Desfazer</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">Permitir as seguintes notificações para cada usuário:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> segundo</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minutes left</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Configurações...</translation> -<translation id="6845383723252244143">Selecionar pasta</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> segundos</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> s</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> dias</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> hora</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> minuto atrás</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> dia</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> segundos atrás</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> segundos restantes</translation> -<translation id="4570886800634958009">Expandir notificação</translation> -<translation id="436869212180315161">Apertar</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minutos</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> minutes left</translation> -<translation id="6040143037577758943">Fechar</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Ajuda</translation> -<translation id="6699343763173986273">Próxima faixa da mídia</translation> -<translation id="8226233771743600312">Não perturbe por um dia</translation> -<translation id="7457942297256758195">Limpar tudo</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> minutos</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> dias restantes</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minutos</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> horas restantes</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> s</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> s</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> segundos</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> dias restantes</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Copiar para a área de trabalho</translation> -<translation id="8371695176452482769">Fale agora</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Não Perturbe</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimizar</translation> -<translation id="6394627529324717982">Vírgula</translation> -<translation id="3036649622769666520">Abrir arquivos</translation> -<translation id="8328145009876646418">Borda esquerda</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> segundos</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_pt-PT.xtb b/chromium/ui/base/strings/ui_strings_pt-PT.xtb deleted file mode 100644 index b649dfd1ce1..00000000000 --- a/chromium/ui/base/strings/ui_strings_pt-PT.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="pt-PT"> -<translation id="4820616160060340806">Command + <ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798">Há <ph name="NUMBER_MANY"/> horas</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> seg. restantes</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> seg. restantes</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> min. restantes</translation> -<translation id="1801827354178857021">Ponto final</translation> -<translation id="1190609913194133056">Centro de Notificações</translation> -<translation id="7470933019269157899">Faltam <ph name="NUMBER_DEFAULT"/> minutos</translation> -<translation id="5613020302032141669">Seta para a esquerda</translation> -<translation id="4971687151119236543">Faixa anterior de multimédia</translation> -<translation id="8602707065186045623">Ficheiro <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> seg.</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> horas restantes</translation> -<translation id="8717309436826820190">Mais <ph name="NUMBER_OF_NOTIFICATIONS"/> de <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Cancelar</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Seta para cima</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> horas</translation> -<translation id="3990502903496589789">Margem direita</translation> -<translation id="9038489124413477075">Pasta sem nome</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> min.</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> dias restantes</translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> min. restantes</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> dias restantes</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> seg. restantes</translation> -<translation id="3909791450649380159">Cor&tar</translation> -<translation id="2560788951337264832">Faltam <ph name="NUMBER_ZERO"/> minutos</translation> -<translation id="688711909580084195">Página Web Sem Nome</translation> -<translation id="3353284378027041011">Há <ph name="NUMBER_FEW"/> dias</translation> -<translation id="5076340679995252485">C&olar</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Selecionar Pasta a Carregar</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016">Há <ph name="NUMBER_TWO"/> min.</translation> -<translation id="3234408098842461169">Seta para baixo</translation> -<translation id="3087734570205094154">Parte inferior</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> min. restante</translation> -<translation id="1860796786778352021">Fechar notificação</translation> -<translation id="6364916375976753737">Deslocar-se para a esquerda</translation> -<translation id="2629089419211541119">Há <ph name="NUMBER_ONE"/> hora</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minutos</translation> -<translation id="6982279413068714821">Há <ph name="NUMBER_DEFAULT"/> min.</translation> -<translation id="6945221475159498467">Seleccionar</translation> -<translation id="6620110761915583480">Guardar ficheiro</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> segundos</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Falta <ph name="NUMBER_ONE"/> minuto</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> min.</translation> -<translation id="8210608804940886430">Página para baixo</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> dias</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> horas restantes</translation> -<translation id="5329858601952122676">E&liminar</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> seg.</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutos</translation> -<translation id="7275974018215686543">Há <ph name="NUMBER_MANY"/> seg.</translation> -<translation id="7781829728241885113">Ontem</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutos</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> min. restantes</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523">Há <ph name="NUMBER_DEFAULT"/> dias</translation> -<translation id="8428213095426709021">Definições</translation> -<translation id="2497284189126895209">Todos os ficheiros</translation> -<translation id="7487278341251176613">Faltam <ph name="NUMBER_TWO"/> minutos</translation> -<translation id="5110450810124758964">Há <ph name="NUMBER_ONE"/> dia</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> seg.</translation> -<translation id="7814458197256864873">&Copiar</translation> -<translation id="3889424535448813030">Seta para a direita</translation> -<translation id="4229495110203539533">Há <ph name="NUMBER_ONE"/> seg.</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> seg. restantes</translation> -<translation id="6829324100069873704">Voltar às notificações</translation> -<translation id="6528179044667508675">Não incomodar</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> segundos</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> min.</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Permitir notificações de:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> horas</translation> -<translation id="1398853756734560583">Maximizar</translation> -<translation id="4250229828105606438">Captura de ecrã</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> horas</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> min. restantes</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Seleccion&ar tudo</translation> -<translation id="2168039046890040389">Página para cima</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> dias</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> min.</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minuto</translation> -<translation id="8448317557906454022">Há <ph name="NUMBER_ZERO"/> seg.</translation> -<translation id="4927753642311223124">Nada de novo a apresentar por aqui.</translation> -<translation id="2482878487686419369">Notificações</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Deslocar-se para aqui</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> horas</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">Reproduzir/interromper multimédia</translation> -<translation id="2148716181193084225">Hoje</translation> -<translation id="7960078400008666149">Não incomodar durante uma hora</translation> -<translation id="4373894838514502496">Há <ph name="NUMBER_FEW"/> min.</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> dias</translation> -<translation id="2190355936436201913">(vazio)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> horas restantes</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> seg. restante</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Deslocar-se para a direita</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> hora restante</translation> -<translation id="1413622004203049571">Desativar notificações de <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Parte superior</translation> -<translation id="8331626408530291785">Deslocar-se para cima</translation> -<translation id="7907591526440419938">Abrir ficheiro</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">Há <ph name="NUMBER_DEFAULT"/> horas</translation> -<translation id="815598010540052116">Deslocar-se para baixo</translation> -<translation id="6808150112686056157">Parar multimédia</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Restaurar</translation> -<translation id="1243314992276662751">Carregar</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> dia restante</translation> -<translation id="8179976553408161302">Entrar</translation> -<translation id="945522503751344254">Enviar comentários</translation> -<translation id="9170848237812810038">An&ular</translation> -<translation id="1285266685456062655">Há <ph name="NUMBER_FEW"/> horas</translation> -<translation id="6918245111648057970">Permitir as seguintes notificações para cada utilizador:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> segundo</translation> -<translation id="3994835489895548312">Faltam <ph name="NUMBER_MANY"/> minutos</translation> -<translation id="6358975074282722691">Há <ph name="NUMBER_TWO"/> seg.</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Definições...</translation> -<translation id="6845383723252244143">Seleccionar pasta</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> segundos</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> seg.</translation> -<translation id="5583640892426849032">Retrocesso</translation> -<translation id="5263972071113911534">Há <ph name="NUMBER_MANY"/> dias</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> dias</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> hora</translation> -<translation id="2679312662830811292">Há <ph name="NUMBER_ONE"/> min.</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> dia</translation> -<translation id="9098468523912235228">Há <ph name="NUMBER_DEFAULT"/> seg.</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> seg. restantes</translation> -<translation id="4570886800634958009">Expandir notificação</translation> -<translation id="436869212180315161">Premir</translation> -<translation id="4860787810836767172">Há <ph name="NUMBER_FEW"/> seg.</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minutos</translation> -<translation id="1858722859751911017">Faltam <ph name="NUMBER_FEW"/> minutos</translation> -<translation id="6040143037577758943">Fechar</translation> -<translation id="1101671447232096497">Há <ph name="NUMBER_MANY"/> min.</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Ajuda</translation> -<translation id="6699343763173986273">Faixa seguinte de multimédia</translation> -<translation id="8226233771743600312">Não incomodar durante um dia</translation> -<translation id="7457942297256758195">Limpar Tudo</translation> -<translation id="822618367988303761">Há <ph name="NUMBER_TWO"/> dias</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> min.</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> dias restantes</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minutos</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> horas restantes</translation> -<translation id="8959208747503200525">Há <ph name="NUMBER_TWO"/> horas</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> seg.</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> seg.</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> segundos</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> dias restantes</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Copiar para a área de transferência</translation> -<translation id="8371695176452482769">Falar agora</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Não incomodar</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimizar</translation> -<translation id="6394627529324717982">Vírgula</translation> -<translation id="3036649622769666520">Abrir ficheiros</translation> -<translation id="8328145009876646418">Margem esquerda</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> segundos</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_ro.xtb b/chromium/ui/base/strings/ui_strings_ro.xtb deleted file mode 100644 index 63a05783fb4..00000000000 --- a/chromium/ui/base/strings/ui_strings_ro.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ro"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins (Inserați)</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End (La sfârșit)</translation> -<translation id="5341849548509163798">Cu <ph name="NUMBER_MANY"/> (de) ore în urmă</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> secunde rămase</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> secunde rămase</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> minute rămase</translation> -<translation id="1801827354178857021">Punct</translation> -<translation id="1190609913194133056">Centrul pentru notificări</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> minute rămase</translation> -<translation id="5613020302032141669">Săgeata spre stânga</translation> -<translation id="4971687151119236543">Melodia anterioară din conținutul media</translation> -<translation id="8602707065186045623">Fișier <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918">Cu <ph name="NUMBER_ZERO"/> minute în urmă</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> secunde</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> ore rămase</translation> -<translation id="8717309436826820190">Încă <ph name="NUMBER_OF_NOTIFICATIONS"/> de la <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Anulaţi</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> O</translation> -<translation id="3660179305079774227">Săgeata în sus</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MO/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> ore</translation> -<translation id="3990502903496589789">Marginea dreaptă</translation> -<translation id="9038489124413477075">Dosar fără nume</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> minute</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> zile rămase</translation> -<translation id="932327136139879170">Pagina de pornire</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> minute rămase</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> zile rămase</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> secunde rămase</translation> -<translation id="3909791450649380159">&Decupați</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minute rămase</translation> -<translation id="688711909580084195">Pagină web fără titlu</translation> -<translation id="3353284378027041011">Cu <ph name="NUMBER_FEW"/> zile în urmă</translation> -<translation id="5076340679995252485">&Inserați</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TO</translation> -<translation id="364720409959344976">Selectați un dosar de încărcat</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016">Cu <ph name="NUMBER_TWO"/> minute în urmă</translation> -<translation id="3234408098842461169">Săgeata în jos</translation> -<translation id="3087734570205094154">Jos</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> minut rămas</translation> -<translation id="1860796786778352021">Buton de închidere a notificării</translation> -<translation id="6364916375976753737">Derulați spre stânga</translation> -<translation id="2629089419211541119">Cu <ph name="NUMBER_ONE"/> oră în urmă</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minute</translation> -<translation id="6982279413068714821">Cu <ph name="NUMBER_DEFAULT"/> (de) minute în urmă</translation> -<translation id="6945221475159498467">Selectați</translation> -<translation id="6620110761915583480">Salvați fișierul</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> secunde</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> ore</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> minut rămas</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> minut</translation> -<translation id="8210608804940886430">Page Down (o pagină mai jos)</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> zile</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> ore rămase</translation> -<translation id="5329858601952122676">Ș&tergeți</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> secunde</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KO</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7275974018215686543">Cu <ph name="NUMBER_MANY"/> (de) secunde în urmă</translation> -<translation id="7781829728241885113">Ieri</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minute</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> minute rămase</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MO</translation> -<translation id="4988273303304146523">Cu <ph name="NUMBER_DEFAULT"/> zile în urmă</translation> -<translation id="8428213095426709021">Setări</translation> -<translation id="2497284189126895209">Toate fișierele</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minute rămase</translation> -<translation id="5110450810124758964">Cu <ph name="NUMBER_ONE"/> zi în urmă</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> secundă</translation> -<translation id="7814458197256864873">&Copiați</translation> -<translation id="3889424535448813030">Săgeata spre dreapta</translation> -<translation id="4229495110203539533">Cu <ph name="NUMBER_ONE"/> secundă în urmă</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> secunde rămase</translation> -<translation id="6829324100069873704">Reveniți la notificări</translation> -<translation id="6528179044667508675">Nu deranja</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> secunde</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> minute</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> ore rămase</translation> -<translation id="7135556860107312402">Permiteți notificările de la următoarele:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> ore</translation> -<translation id="1398853756734560583">Maximizați</translation> -<translation id="4250229828105606438">Captură de ecran</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> ore</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> minute rămase</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GO</translation> -<translation id="1901303067676059328">Select&ați tot</translation> -<translation id="2168039046890040389">O pagină mai sus</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> minute</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> zile</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> minute</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minut</translation> -<translation id="8448317557906454022">Cu <ph name="NUMBER_ZERO"/> secunde în urmă</translation> -<translation id="4927753642311223124">Nimic de văzut aici, treceți mai departe.</translation> -<translation id="2482878487686419369">Notificări</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> zile</translation> -<translation id="3183922693828471536">Derulați până aici</translation> -<translation id="4552416320897244156">PgDwn (o pagină mai jos)</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> ore</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KO/s</translation> -<translation id="8394908167088220973">Redați/întrerupeți conținutul media</translation> -<translation id="2148716181193084225">Astăzi</translation> -<translation id="7960078400008666149">Nu deranja o oră</translation> -<translation id="4373894838514502496">Cu <ph name="NUMBER_FEW"/> minute în urmă</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> zile</translation> -<translation id="2190355936436201913">(gol)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> ore rămase</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> secundă rămasă</translation> -<translation id="8447116497070723931">PgUp (o pagină mai sus)</translation> -<translation id="4588090240171750605">Derulați spre dreapta</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> oră rămasă</translation> -<translation id="1413622004203049571">Dezactivați notificările de la <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Sus</translation> -<translation id="8331626408530291785">Derulați în sus</translation> -<translation id="7907591526440419938">Deschideți fișierul</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> zile rămase</translation> -<translation id="1293699935367580298">Esc (Ieșiți)</translation> -<translation id="2797524280730715045">Cu <ph name="NUMBER_DEFAULT"/> (de) ore în urmă</translation> -<translation id="815598010540052116">Derulați în jos</translation> -<translation id="6808150112686056157">Opriți conținutul media</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> minute rămase</translation> -<translation id="3157931365184549694">Restabiliți</translation> -<translation id="1243314992276662751">Încărcați</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> zi rămasă</translation> -<translation id="8179976553408161302">Intrați</translation> -<translation id="945522503751344254">Trimiteți feedback</translation> -<translation id="9170848237812810038">&Anulați</translation> -<translation id="1285266685456062655">Cu <ph name="NUMBER_FEW"/> ore în urmă</translation> -<translation id="6918245111648057970">Permiteți notificări de la următoarele servicii pentru fiecare utilizator:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> secundă</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> de minute rămase</translation> -<translation id="6358975074282722691">Cu <ph name="NUMBER_TWO"/> secunde în urmă</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PO</translation> -<translation id="2983818520079887040">Setări...</translation> -<translation id="6845383723252244143">Selectați dosarul</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> secunde</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> secunde</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534">Cu <ph name="NUMBER_MANY"/> (de) zile în urmă</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> zile</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> oră</translation> -<translation id="2679312662830811292">Cu <ph name="NUMBER_ONE"/> minut în urmă</translation> -<translation id="8788572795284305350">Cu <ph name="NUMBER_ZERO"/> ore în urmă</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GO/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> zi</translation> -<translation id="9098468523912235228">Cu <ph name="NUMBER_DEFAULT"/> (de) secunde în urmă</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> secunde rămase</translation> -<translation id="4570886800634958009">Buton de extindere a notificării</translation> -<translation id="436869212180315161">Apăsați</translation> -<translation id="4860787810836767172">Cu <ph name="NUMBER_FEW"/> secunde în urmă</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TO/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minute</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> minute rămase</translation> -<translation id="6040143037577758943">Închideți</translation> -<translation id="1101671447232096497">Cu <ph name="NUMBER_MANY"/> (de) minute în urmă</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> O/s</translation> -<translation id="7649070708921625228">Ajutor</translation> -<translation id="6699343763173986273">Melodia următoare din conținutul media</translation> -<translation id="8226233771743600312">Nu deranja o zi</translation> -<translation id="7457942297256758195">Ștergeți-le pe toate</translation> -<translation id="822618367988303761">Cu <ph name="NUMBER_TWO"/> zile în urmă</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> minute</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> zile rămase</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minute</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> ore rămase</translation> -<translation id="8959208747503200525">Cu <ph name="NUMBER_TWO"/> ore în urmă</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> secunde</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> secunde</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> seconds</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> zile rămase</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PO/s</translation> -<translation id="2743387203779672305">Copiați în clipboard</translation> -<translation id="8371695176452482769">Vorbiți acum</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Nu deranja</translation> -<translation id="6978839998405419496">Cu <ph name="NUMBER_ZERO"/> zile în urmă</translation> -<translation id="5941711191222866238">Minimizați</translation> -<translation id="6394627529324717982">Virgulă</translation> -<translation id="3036649622769666520">Deschideți fișierele</translation> -<translation id="8328145009876646418">Marginea stângă</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> secunde</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_ru.xtb b/chromium/ui/base/strings/ui_strings_ru.xtb deleted file mode 100644 index 43e936017ca..00000000000 --- a/chromium/ui/base/strings/ui_strings_ru.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ru"> -<translation id="4820616160060340806">Command + <ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">Завершить</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> сек.</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> сек.</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> мин.</translation> -<translation id="1801827354178857021">Точка</translation> -<translation id="1190609913194133056">Центр оповещений</translation> -<translation id="7470933019269157899">Осталось <ph name="NUMBER_DEFAULT"/> минут</translation> -<translation id="5613020302032141669">Стрелка влево</translation> -<translation id="4971687151119236543">Предыдущий трек</translation> -<translation id="8602707065186045623">Файл <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> сек.</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> ч.</translation> -<translation id="8717309436826820190">Ещё <ph name="NUMBER_OF_NOTIFICATIONS"/> (<ph name="SOURCE_OF_NOTIFICATIONS"/>)</translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Отмена</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> Б</translation> -<translation id="3660179305079774227">Стрелка вверх</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> МБ/с</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> ч.</translation> -<translation id="3990502903496589789">Правый край</translation> -<translation id="9038489124413477075">Без названия</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> мин.</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> дн.</translation> -<translation id="932327136139879170">На главную</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> мин.</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> дн.</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> сек.</translation> -<translation id="3909791450649380159">Выре&зать</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minutes left</translation> -<translation id="688711909580084195">Страница без названия</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> дн. назад</translation> -<translation id="5076340679995252485">&Вставить</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> ТБ</translation> -<translation id="364720409959344976">Выберите папку для загрузки</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">Стрелка вниз</translation> -<translation id="3087734570205094154">Низ</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> мин.</translation> -<translation id="1860796786778352021">Закрыть оповещение</translation> -<translation id="6364916375976753737">Прокрутка влево</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> ч. назад</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> мин.</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> мин. назад</translation> -<translation id="6945221475159498467">Выбрать</translation> -<translation id="6620110761915583480">Сохранить файл</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> сек.</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Осталась <ph name="NUMBER_ONE"/> минута</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> мин.</translation> -<translation id="8210608804940886430">Прокрутка вниз</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> дн.</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> ч.</translation> -<translation id="5329858601952122676">&Удалить</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> сек.</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> КБ</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> мин.</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">Вчера</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> мин.</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> мин.</translation> -<translation id="6659594942844771486">Вкладка</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> МБ</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> дн. назад</translation> -<translation id="8428213095426709021">Настройки</translation> -<translation id="2497284189126895209">Все файлы</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minutes left</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> дн. назад</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> сек.</translation> -<translation id="7814458197256864873">&Копировать</translation> -<translation id="3889424535448813030">Стрелка вправо</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> с. назад</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> сек.</translation> -<translation id="6829324100069873704">Назад к оповещениям</translation> -<translation id="6528179044667508675">Не беспокоить</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> сек.</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> мин.</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Разрешить оповещения от:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> ч.</translation> -<translation id="1398853756734560583">Развернуть</translation> -<translation id="4250229828105606438">Скриншот</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> ч.</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> мин.</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> ГБ</translation> -<translation id="1901303067676059328">Выделить &все</translation> -<translation id="2168039046890040389">Вверх</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> дн.</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> мин.</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> мин.</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">Оповещений нет.</translation> -<translation id="2482878487686419369">Оповещения</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Прокрутить до этого места</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> ч.</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> КБ/с</translation> -<translation id="8394908167088220973">Воспроизведение/пауза</translation> -<translation id="2148716181193084225">Сегодня</translation> -<translation id="7960078400008666149">Не беспокоить (1 час)</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> мин. назад</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> дня</translation> -<translation id="2190355936436201913">(пусто)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> ч.</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> сек.</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Прокрутка вправо</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> ч.</translation> -<translation id="1413622004203049571">Отключить оповещения от <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Наверх</translation> -<translation id="8331626408530291785">Прокрутка вверх</translation> -<translation id="7907591526440419938">Открытие файла</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> ч. назад</translation> -<translation id="815598010540052116">Прокрутка вниз</translation> -<translation id="6808150112686056157">Остановить</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Восстановить</translation> -<translation id="1243314992276662751">Загрузить</translation> -<translation id="50030952220075532">Остался <ph name="NUMBER_ONE"/> день</translation> -<translation id="8179976553408161302">Войти</translation> -<translation id="945522503751344254">Отправить отзыв</translation> -<translation id="9170848237812810038">&Отменить</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> ч. назад</translation> -<translation id="6918245111648057970">Разрешить оповещения для каждого пользователя:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> сек.</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minutes left</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> ПБ</translation> -<translation id="2983818520079887040">Настройки...</translation> -<translation id="6845383723252244143">Выбор папки</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> сек.</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> сек.</translation> -<translation id="5583640892426849032">Клавиша возврата (Backspace)</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> дн.</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> час</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> мин. назад</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> ГБ/с</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> день</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> с. назад</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> сек.</translation> -<translation id="4570886800634958009">Раскрыть оповещение</translation> -<translation id="436869212180315161">Нажать</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> с. назад</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> ТБ/с</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> мин.</translation> -<translation id="1858722859751911017">Осталось <ph name="NUMBER_FEW"/> мин.</translation> -<translation id="6040143037577758943">Закрыть</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> Б/с</translation> -<translation id="7649070708921625228">Справка</translation> -<translation id="6699343763173986273">Следующий трек</translation> -<translation id="8226233771743600312">Не беспокоить (1 день)</translation> -<translation id="7457942297256758195">Очистить все</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> мин.</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> дн.</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> мин.</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> ч.</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> сек.</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> сек.</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> сек.</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> дн.</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> ПБ/с</translation> -<translation id="2743387203779672305">Скопировать в буфер</translation> -<translation id="8371695176452482769">Говорите</translation> -<translation id="6965382102122355670">ОК</translation> -<translation id="7850320739366109486">Не беспокоить</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Свернуть</translation> -<translation id="6394627529324717982">Запятая</translation> -<translation id="3036649622769666520">Открытие файлов</translation> -<translation id="8328145009876646418">Левый край</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> сек.</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_sk.xtb b/chromium/ui/base/strings/ui_strings_sk.xtb deleted file mode 100644 index db7d0f2dc16..00000000000 --- a/chromium/ui/base/strings/ui_strings_sk.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="sk"> -<translation id="4820616160060340806">Command + <ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942">Počet zvyšných sekúnd: <ph name="NUMBER_FEW"/></translation> -<translation id="9213479837033539041">Počet zvyšných sekúnd: <ph name="NUMBER_MANY"/></translation> -<translation id="1209866192426315618">Počet zvyšných minút: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="1801827354178857021">Bodka</translation> -<translation id="1190609913194133056">Centrum upozornení</translation> -<translation id="7470933019269157899">Zostáva <ph name="NUMBER_DEFAULT"/> minút</translation> -<translation id="5613020302032141669">Šípka doľava</translation> -<translation id="4971687151119236543">Média – predchádzajúca stopa</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> Súbor (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252">Počet sekúnd: <ph name="NUMBER_TWO"/></translation> -<translation id="7511635910912978956">Počet zvyšných hodín: <ph name="NUMBER_FEW"/></translation> -<translation id="8717309436826820190">Počet ďalších upozornení zo služby <ph name="SOURCE_OF_NOTIFICATIONS"/>: <ph name="NUMBER_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Zrušiť</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Šípka nahor</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928">Počet hodín: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="3990502903496589789">Pravý okraj</translation> -<translation id="9038489124413477075">Priečinok bez názvu</translation> -<translation id="8507996248087185956">Počet minút: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="3520476450377425184">Počet zvyšných dní: <ph name="NUMBER_MANY"/></translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868">Počet zvyšných minút: <ph name="NUMBER_MANY"/></translation> -<translation id="8666066831007952346">Počet zvyšných dní: <ph name="NUMBER_TWO"/></translation> -<translation id="6390842777729054533">Počet zvyšných sekúnd: <ph name="NUMBER_ZERO"/></translation> -<translation id="3909791450649380159">&Vystrihnúť</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minutes left</translation> -<translation id="688711909580084195">Nepomenovaná webová stránka</translation> -<translation id="3353284378027041011">Pred <ph name="NUMBER_FEW"/> dňami</translation> -<translation id="5076340679995252485">&Vložiť</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Výber priečinka na nahranie</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">Šípka nadol</translation> -<translation id="3087734570205094154">Spodok</translation> -<translation id="5935630983280450497">Počet zvyšných minút: <ph name="NUMBER_ONE"/></translation> -<translation id="1860796786778352021">Zavrieť upozornenie</translation> -<translation id="6364916375976753737">Rolovať doľava</translation> -<translation id="2629089419211541119">Pred <ph name="NUMBER_ONE"/> hod</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> min</translation> -<translation id="6982279413068714821">Pred <ph name="NUMBER_DEFAULT"/> minútami</translation> -<translation id="6945221475159498467">Vybrať</translation> -<translation id="6620110761915583480">Uložiť súbor</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> sekúnd</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Zostáva <ph name="NUMBER_ONE"/> minúta</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> minúta</translation> -<translation id="8210608804940886430">Stránkovať nadol</translation> -<translation id="1572103024875503863">Počet dní: <ph name="NUMBER_MANY"/></translation> -<translation id="7163503212501929773">Počet zvyšných hodín: <ph name="NUMBER_MANY"/></translation> -<translation id="5329858601952122676">&Odstrániť</translation> -<translation id="8088823334188264070">Počet sekúnd: <ph name="NUMBER_MANY"/></translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">Včera</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minúty</translation> -<translation id="50960180632766478">Počet zvyšných minút: <ph name="NUMBER_FEW"/></translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523">Pred <ph name="NUMBER_DEFAULT"/> dňami</translation> -<translation id="8428213095426709021">Nastavenia</translation> -<translation id="2497284189126895209">Všetky súbory</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minutes left</translation> -<translation id="5110450810124758964">Pred <ph name="NUMBER_ONE"/> dňom</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> sekunda</translation> -<translation id="7814458197256864873">&Kopírovať</translation> -<translation id="3889424535448813030">Šípka doprava</translation> -<translation id="4229495110203539533">Pred <ph name="NUMBER_ONE"/> s</translation> -<translation id="2544782972264605588">Počet zvyšných sekúnd: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="6829324100069873704">Prejsť späť na upozornenia</translation> -<translation id="6528179044667508675">Nerušiť</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> s</translation> -<translation id="290555789621781773">Počet minút: <ph name="NUMBER_TWO"/></translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Povoliť prijímanie upozornení od:</translation> -<translation id="8112886015144590373">Počet hodín: <ph name="NUMBER_FEW"/></translation> -<translation id="1398853756734560583">Maximalizovať</translation> -<translation id="4250229828105606438">Snímka obrazovky</translation> -<translation id="6690744523875189208">Počet hodín: <ph name="NUMBER_TWO"/></translation> -<translation id="5260878308685146029">Počet zvyšných minút: <ph name="NUMBER_TWO"/></translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Vybrať &všetko</translation> -<translation id="2168039046890040389">Page Up</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581">Počet dní: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="6463061331681402734">Počet minút: <ph name="NUMBER_MANY"/></translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minúta</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">Tu sa nič nenachádza, pokračujte ďalej.</translation> -<translation id="2482878487686419369">Upozornenia</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Rolovať na toto miesto</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401">Počet hodín: <ph name="NUMBER_MANY"/></translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> kB/s</translation> -<translation id="8394908167088220973">Média – prehrať / pozastaviť</translation> -<translation id="2148716181193084225">Dnes</translation> -<translation id="7960078400008666149">Nerušiť jednu hodinu</translation> -<translation id="4373894838514502496">Pred <ph name="NUMBER_FEW"/> min</translation> -<translation id="4115153316875436289">Počet dní: <ph name="NUMBER_TWO"/></translation> -<translation id="2190355936436201913">(prázdne)</translation> -<translation id="1164369517022005061">Počet zvyšných hodín: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="152482086482215392">Zostáva <ph name="NUMBER_ONE"/> sekunda</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Rolovať doprava</translation> -<translation id="7414887922320653780">Zostáva <ph name="NUMBER_ONE"/> hodina</translation> -<translation id="1413622004203049571">Zakázať upozornenia od <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Vrch</translation> -<translation id="8331626408530291785">Rolovať nahor</translation> -<translation id="7907591526440419938">Otvoriť súbor</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">Pred <ph name="NUMBER_DEFAULT"/> hodinami</translation> -<translation id="815598010540052116">Rolovať nadol</translation> -<translation id="6808150112686056157">Médiá – zastaviť</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Obnoviť</translation> -<translation id="1243314992276662751">Nahrať</translation> -<translation id="50030952220075532">Zostáva <ph name="NUMBER_ONE"/> deň</translation> -<translation id="8179976553408161302">Začať</translation> -<translation id="945522503751344254">Poslať pripomienky</translation> -<translation id="9170848237812810038">&Naspäť</translation> -<translation id="1285266685456062655">Pred <ph name="NUMBER_FEW"/> hodinami</translation> -<translation id="6918245111648057970">Povoliť upozornenia na nasledujúce položky pre každého používateľa:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> sekunda</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minutes left</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Nastavenia...</translation> -<translation id="6845383723252244143">Vybrať priečinok</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> sekundy</translation> -<translation id="1095623615273566396">Počet sekúnd: <ph name="NUMBER_FEW"/></translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920">Počet dní: <ph name="NUMBER_FEW"/></translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> hodina</translation> -<translation id="2679312662830811292">Pred <ph name="NUMBER_ONE"/> min</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> deň</translation> -<translation id="9098468523912235228">Pred <ph name="NUMBER_DEFAULT"/> s</translation> -<translation id="494645311413743213">Počet zvyšných sekúnd: <ph name="NUMBER_TWO"/></translation> -<translation id="4570886800634958009">Rozbaliť upozornenie</translation> -<translation id="436869212180315161">Stlačiť</translation> -<translation id="4860787810836767172">Pred <ph name="NUMBER_FEW"/> s</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minút</translation> -<translation id="1858722859751911017">Zostávajú <ph name="NUMBER_FEW"/> minúty</translation> -<translation id="6040143037577758943">Zatvoriť</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Pomocník</translation> -<translation id="6699343763173986273">Média – ďalšia stopa</translation> -<translation id="8226233771743600312">Nerušiť jeden deň</translation> -<translation id="7457942297256758195">Vymazať všetky</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565">Počet minút: <ph name="NUMBER_FEW"/></translation> -<translation id="1963692530539281474">Počet zvyšných dní: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minúty</translation> -<translation id="5906719743126878045">Počet zvyšných hodín: <ph name="NUMBER_TWO"/></translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940">Počet sekúnd: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="4197700912384709145">Počet sekúnd: <ph name="NUMBER_ZERO"/></translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> seconds</translation> -<translation id="3759876923365568382">Počet zvyšných dní: <ph name="NUMBER_FEW"/></translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Kopírovať do schránky</translation> -<translation id="8371695176452482769">Začnite hovoriť</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Nerušiť</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimalizovať</translation> -<translation id="6394627529324717982">Čiarka</translation> -<translation id="3036649622769666520">Otvoriť súbory</translation> -<translation id="8328145009876646418">Ľavý okraj</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> sekundy</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_sl.xtb b/chromium/ui/base/strings/ui_strings_sl.xtb deleted file mode 100644 index 8862aaed9c6..00000000000 --- a/chromium/ui/base/strings/ui_strings_sl.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="sl"> -<translation id="4820616160060340806">Command + <ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798">Pred <ph name="NUMBER_MANY"/> h</translation> -<translation id="6310545596129886942">še <ph name="NUMBER_FEW"/> sek</translation> -<translation id="9213479837033539041">še <ph name="NUMBER_MANY"/> sekund</translation> -<translation id="1209866192426315618">še <ph name="NUMBER_DEFAULT"/> min</translation> -<translation id="1801827354178857021">Pika</translation> -<translation id="1190609913194133056">Središče za obvestila</translation> -<translation id="7470933019269157899">še <ph name="NUMBER_DEFAULT"/> min</translation> -<translation id="5613020302032141669">Puščica levo</translation> -<translation id="4971687151119236543">Prejšnja skladba</translation> -<translation id="8602707065186045623">Datoteka <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> sek</translation> -<translation id="7511635910912978956">še <ph name="NUMBER_FEW"/> h</translation> -<translation id="8717309436826820190">Še <ph name="NUMBER_OF_NOTIFICATIONS"/> iz vira <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Prekliči</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Puščica gor</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> h</translation> -<translation id="3990502903496589789">Desni rob</translation> -<translation id="9038489124413477075">Neimenovana mapa</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> min</translation> -<translation id="3520476450377425184">še <ph name="NUMBER_MANY"/> dni</translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868">še <ph name="NUMBER_MANY"/> minut</translation> -<translation id="8666066831007952346">še <ph name="NUMBER_TWO"/> dni</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> secs left</translation> -<translation id="3909791450649380159">Izrež&i</translation> -<translation id="2560788951337264832">še <ph name="NUMBER_ZERO"/> min</translation> -<translation id="688711909580084195">Spletna stran brez naslova</translation> -<translation id="3353284378027041011">Pred <ph name="NUMBER_FEW"/> dnevi</translation> -<translation id="5076340679995252485">&Prilepi</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Izberite mapo, ki jo želite prenesti</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016">Pred <ph name="NUMBER_TWO"/> min</translation> -<translation id="3234408098842461169">Puščica dol</translation> -<translation id="3087734570205094154">Na dno</translation> -<translation id="5935630983280450497">še <ph name="NUMBER_ONE"/> min</translation> -<translation id="1860796786778352021">Zapri obvestilo</translation> -<translation id="6364916375976753737">Pomik levo</translation> -<translation id="2629089419211541119">Pred <ph name="NUMBER_ONE"/> h</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> min</translation> -<translation id="6982279413068714821">Pred <ph name="NUMBER_DEFAULT"/> min</translation> -<translation id="6945221475159498467">Izberi</translation> -<translation id="6620110761915583480">Shrani datoteko</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> seconds</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">še <ph name="NUMBER_ONE"/> min</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> min</translation> -<translation id="8210608804940886430">Stran dol</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> days</translation> -<translation id="7163503212501929773">še <ph name="NUMBER_MANY"/> ur</translation> -<translation id="5329858601952122676">&Izbriši</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> secs</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7275974018215686543">Pred <ph name="NUMBER_MANY"/> s</translation> -<translation id="7781829728241885113">Včeraj</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minuti</translation> -<translation id="50960180632766478">še <ph name="NUMBER_FEW"/> min</translation> -<translation id="6659594942844771486">Tabulator</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523">Pred <ph name="NUMBER_DEFAULT"/> dnevi</translation> -<translation id="8428213095426709021">Nastavitve</translation> -<translation id="2497284189126895209">Vse datoteke</translation> -<translation id="7487278341251176613">še <ph name="NUMBER_TWO"/> min</translation> -<translation id="5110450810124758964">Pred <ph name="NUMBER_ONE"/> dnevom</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> sek</translation> -<translation id="7814458197256864873">&Kopiraj</translation> -<translation id="3889424535448813030">Puščica desno</translation> -<translation id="4229495110203539533">Pred <ph name="NUMBER_ONE"/> s</translation> -<translation id="2544782972264605588">še <ph name="NUMBER_DEFAULT"/> sek</translation> -<translation id="6829324100069873704">Nazaj na obvestila</translation> -<translation id="6528179044667508675">Ne moti</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> s</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> min</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Omogočanje obvestil teh aplikacij:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> ur</translation> -<translation id="1398853756734560583">Povečaj</translation> -<translation id="4250229828105606438">Posnetek zaslona</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> uri</translation> -<translation id="5260878308685146029">še <ph name="NUMBER_TWO"/> min</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Izberi &vse</translation> -<translation id="2168039046890040389">Stran gor</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> dni</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> mins</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minuta</translation> -<translation id="8448317557906454022">Pred <ph name="NUMBER_ZERO"/> s</translation> -<translation id="4927753642311223124">Tu ni ničesar, pomaknite se naprej.</translation> -<translation id="2482878487686419369">Obvestila</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Pomik do sem</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> ur</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">Ustavitev/začasna ustavitev</translation> -<translation id="2148716181193084225">Danes</translation> -<translation id="7960078400008666149">Ne moti eno uro</translation> -<translation id="4373894838514502496">Pred <ph name="NUMBER_FEW"/> min</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> dni</translation> -<translation id="2190355936436201913">(prazno)</translation> -<translation id="1164369517022005061">še <ph name="NUMBER_DEFAULT"/> h</translation> -<translation id="152482086482215392">še <ph name="NUMBER_ONE"/> sek</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Pomik desno</translation> -<translation id="7414887922320653780">še <ph name="NUMBER_ONE"/> ura</translation> -<translation id="1413622004203049571">Izklop obvestil za <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Na vrh</translation> -<translation id="8331626408530291785">Pomik gor</translation> -<translation id="7907591526440419938">Odpri datoteko</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">Pred <ph name="NUMBER_DEFAULT"/> h</translation> -<translation id="815598010540052116">Pomik dol</translation> -<translation id="6808150112686056157">Ustavitev</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Obnovi</translation> -<translation id="1243314992276662751">Prenesi</translation> -<translation id="50030952220075532">še <ph name="NUMBER_ONE"/> dan</translation> -<translation id="8179976553408161302">Potrdi</translation> -<translation id="945522503751344254">Pošlji povratne informacije</translation> -<translation id="9170848237812810038">&Razveljavi</translation> -<translation id="1285266685456062655">Pred <ph name="NUMBER_FEW"/> h</translation> -<translation id="6918245111648057970">Za vsakega uporabnika dovoli obvestila naslednjih storitev:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> sekunda</translation> -<translation id="3994835489895548312">še <ph name="NUMBER_MANY"/> min</translation> -<translation id="6358975074282722691">Pred <ph name="NUMBER_TWO"/> s</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Nastavitve ...</translation> -<translation id="6845383723252244143">Izberite mapo</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> sekunde</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> sek</translation> -<translation id="5583640892426849032">Vračalka</translation> -<translation id="5263972071113911534">Pred <ph name="NUMBER_MANY"/> dnevi</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> dni</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> h</translation> -<translation id="2679312662830811292">Pred <ph name="NUMBER_ONE"/> min</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> dan</translation> -<translation id="9098468523912235228">Pred <ph name="NUMBER_DEFAULT"/> s</translation> -<translation id="494645311413743213">še <ph name="NUMBER_TWO"/> sek</translation> -<translation id="4570886800634958009">Razširi obvestilo</translation> -<translation id="436869212180315161">Pritisnite</translation> -<translation id="4860787810836767172">Pred <ph name="NUMBER_FEW"/> s</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minutes</translation> -<translation id="1858722859751911017">še <ph name="NUMBER_FEW"/> min</translation> -<translation id="6040143037577758943">Zapri</translation> -<translation id="1101671447232096497">Pred <ph name="NUMBER_MANY"/> min</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Pomoč</translation> -<translation id="6699343763173986273">Naslednja skladba</translation> -<translation id="8226233771743600312">Ne moti en dan</translation> -<translation id="7457942297256758195">Izbriši vse</translation> -<translation id="822618367988303761">Pred <ph name="NUMBER_TWO"/> dnevoma</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> min</translation> -<translation id="1963692530539281474">še <ph name="NUMBER_DEFAULT"/> dni</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minute</translation> -<translation id="5906719743126878045">še <ph name="NUMBER_TWO"/> uri</translation> -<translation id="8959208747503200525">Pred <ph name="NUMBER_TWO"/> h</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> sek</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> sekund</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> seconds</translation> -<translation id="3759876923365568382">še <ph name="NUMBER_FEW"/> dni</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Kopiraj v odložišče</translation> -<translation id="8371695176452482769">Začnite govoriti</translation> -<translation id="6965382102122355670">V redu</translation> -<translation id="7850320739366109486">Ne moti</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Pomanjšaj</translation> -<translation id="6394627529324717982">Vejica</translation> -<translation id="3036649622769666520">Odpri datoteke</translation> -<translation id="8328145009876646418">Levi rob</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> sekundi</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_sr.xtb b/chromium/ui/base/strings/ui_strings_sr.xtb deleted file mode 100644 index 681c50632f8..00000000000 --- a/chromium/ui/base/strings/ui_strings_sr.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="sr"> -<translation id="4820616160060340806">Command + <ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942">Преостало <ph name="NUMBER_FEW"/> сек.</translation> -<translation id="9213479837033539041">Преостало <ph name="NUMBER_MANY"/> сек.</translation> -<translation id="1209866192426315618">Преостало <ph name="NUMBER_DEFAULT"/> мин.</translation> -<translation id="1801827354178857021">Тачка</translation> -<translation id="1190609913194133056">Центар за обавештења</translation> -<translation id="7470933019269157899">Преостало је <ph name="NUMBER_DEFAULT"/> минута</translation> -<translation id="5613020302032141669">Стрелица налево</translation> -<translation id="4971687151119236543">Претходна песма медија</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> датотека (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> сек.</translation> -<translation id="7511635910912978956">Преостало сати: <ph name="NUMBER_FEW"/></translation> -<translation id="8717309436826820190">Још <ph name="NUMBER_OF_NOTIFICATIONS"/> од <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Откажи</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Стрелица нагоре</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928">Сати: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="3990502903496589789">Десна ивица</translation> -<translation id="9038489124413477075">Неименовани директоријум</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> мин.</translation> -<translation id="3520476450377425184">Преостало <ph name="NUMBER_MANY"/> дана</translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868">Преостало <ph name="NUMBER_MANY"/> мин.</translation> -<translation id="8666066831007952346">Преостало <ph name="NUMBER_TWO"/> дана</translation> -<translation id="6390842777729054533">Преостало <ph name="NUMBER_ZERO"/> сек.</translation> -<translation id="3909791450649380159">Ис&еци</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minutes left</translation> -<translation id="688711909580084195">Веб-страница без наслова</translation> -<translation id="3353284378027041011">Пре <ph name="NUMBER_FEW"/> дана</translation> -<translation id="5076340679995252485">&Налепи</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Избор директоријума за отпремање</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016">Пре <ph name="NUMBER_TWO"/> минута</translation> -<translation id="3234408098842461169">Стрелица надоле</translation> -<translation id="3087734570205094154">Дно</translation> -<translation id="5935630983280450497">Преостао <ph name="NUMBER_ONE"/> мин.</translation> -<translation id="1860796786778352021">Затвори обавештење</translation> -<translation id="6364916375976753737">Помери налево</translation> -<translation id="2629089419211541119">Пре <ph name="NUMBER_ONE"/> сат</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> мин</translation> -<translation id="6982279413068714821">Пре <ph name="NUMBER_DEFAULT"/> минута</translation> -<translation id="6945221475159498467">Изабери</translation> -<translation id="6620110761915583480">Чување датотеке</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> секунди</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Преостао је <ph name="NUMBER_ONE"/> минут</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> мин.</translation> -<translation id="8210608804940886430">Страница надоле</translation> -<translation id="1572103024875503863">Дана: <ph name="NUMBER_MANY"/></translation> -<translation id="7163503212501929773">Преостало сати: <ph name="NUMBER_MANY"/></translation> -<translation id="5329858601952122676">&Избриши</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> сек.</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> минута</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">Јуче</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> минута</translation> -<translation id="50960180632766478">Преостало <ph name="NUMBER_FEW"/> мин.</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523">Пре <ph name="NUMBER_DEFAULT"/> дана</translation> -<translation id="8428213095426709021">Подешавања</translation> -<translation id="2497284189126895209">Све датотеке</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minutes left</translation> -<translation id="5110450810124758964">Пре <ph name="NUMBER_ONE"/> дан</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> сек.</translation> -<translation id="7814458197256864873">&Копирај</translation> -<translation id="3889424535448813030">Стрелица надесно</translation> -<translation id="4229495110203539533">Пре <ph name="NUMBER_ONE"/> секунду</translation> -<translation id="2544782972264605588">Преостало <ph name="NUMBER_DEFAULT"/> сек.</translation> -<translation id="6829324100069873704">Вратите се на обавештења</translation> -<translation id="6528179044667508675">Не узнемиравај</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> сек</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> мин.</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Дозволи обавештења из следећих извора:</translation> -<translation id="8112886015144590373">Сати: <ph name="NUMBER_FEW"/></translation> -<translation id="1398853756734560583">Увећај</translation> -<translation id="4250229828105606438">Снимак екрана</translation> -<translation id="6690744523875189208">Сати: <ph name="NUMBER_TWO"/></translation> -<translation id="5260878308685146029">Преостало <ph name="NUMBER_TWO"/> мин.</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Изабери &све</translation> -<translation id="2168039046890040389">Страница нагоре</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581">Дана: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> мин.</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> минут</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">Нема шта да се види овде. Наставите даље.</translation> -<translation id="2482878487686419369">Обавештења</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Помери се овде</translation> -<translation id="4552416320897244156">Page Down</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401">Сати: <ph name="NUMBER_MANY"/></translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">Пуштање/паузирање медија</translation> -<translation id="2148716181193084225">Данас</translation> -<translation id="7960078400008666149">Не узнемиравај у периоду од сат времена</translation> -<translation id="4373894838514502496">Пре <ph name="NUMBER_FEW"/> минута</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> дана</translation> -<translation id="2190355936436201913">(празно)</translation> -<translation id="1164369517022005061">Преостало сати: <ph name="NUMBER_DEFAULT"/></translation> -<translation id="152482086482215392">Преостала <ph name="NUMBER_ONE"/> сек.</translation> -<translation id="8447116497070723931">Page Up</translation> -<translation id="4588090240171750605">Помери надесно</translation> -<translation id="7414887922320653780">Преостао <ph name="NUMBER_ONE"/> сат</translation> -<translation id="1413622004203049571">Онемогући обавештења од <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Врх</translation> -<translation id="8331626408530291785">Помери нагоре</translation> -<translation id="7907591526440419938">Отварање датотеке</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">Пре <ph name="NUMBER_DEFAULT"/> сата</translation> -<translation id="815598010540052116">Помери надоле</translation> -<translation id="6808150112686056157">Заустављање медија</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Поново отвори</translation> -<translation id="1243314992276662751">Отпреми</translation> -<translation id="50030952220075532">Преостао <ph name="NUMBER_ONE"/> дан</translation> -<translation id="8179976553408161302">Унеси</translation> -<translation id="945522503751344254">Пошаљи повратне информације</translation> -<translation id="9170848237812810038">&Опозови</translation> -<translation id="1285266685456062655">Пре <ph name="NUMBER_FEW"/> сата</translation> -<translation id="6918245111648057970">Омогући обавештења следећих производа за сваког корисника:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> секунда</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minutes left</translation> -<translation id="6358975074282722691">Пре <ph name="NUMBER_TWO"/> секунде</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Подешавања...</translation> -<translation id="6845383723252244143">Избор директоријума</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> секунде</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> сек.</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920">Дана: <ph name="NUMBER_FEW"/></translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> сат</translation> -<translation id="2679312662830811292">Пре <ph name="NUMBER_ONE"/> минут</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> дан</translation> -<translation id="9098468523912235228">Пре <ph name="NUMBER_DEFAULT"/> секунди</translation> -<translation id="494645311413743213">Преостало <ph name="NUMBER_TWO"/> сек.</translation> -<translation id="4570886800634958009">Прошири обавештење</translation> -<translation id="436869212180315161">Притисните</translation> -<translation id="4860787810836767172">Пре <ph name="NUMBER_FEW"/> секунде</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> минута</translation> -<translation id="1858722859751911017">Преостала су <ph name="NUMBER_FEW"/> минута</translation> -<translation id="6040143037577758943">Затвори</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Помоћ</translation> -<translation id="6699343763173986273">Следећа песма медија</translation> -<translation id="8226233771743600312">Не узнемиравај у периоду од једног дана</translation> -<translation id="7457942297256758195">Обриши све</translation> -<translation id="822618367988303761">Пре <ph name="NUMBER_TWO"/> дана</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> мин.</translation> -<translation id="1963692530539281474">Преостало <ph name="NUMBER_DEFAULT"/> дана</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> минута</translation> -<translation id="5906719743126878045">Преостало сати: <ph name="NUMBER_TWO"/></translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> сек.</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> сек.</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> секунди</translation> -<translation id="3759876923365568382">Преостало <ph name="NUMBER_FEW"/> дана</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Копирај у меморију</translation> -<translation id="8371695176452482769">Почните да говорите</translation> -<translation id="6965382102122355670">Потврди</translation> -<translation id="7850320739366109486">Не узнемиравај</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Смањи</translation> -<translation id="6394627529324717982">Зарез</translation> -<translation id="3036649622769666520">Отварање датотека</translation> -<translation id="8328145009876646418">Лева ивица</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> секунде</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_sv.xtb b/chromium/ui/base/strings/ui_strings_sv.xtb deleted file mode 100644 index f8885762c30..00000000000 --- a/chromium/ui/base/strings/ui_strings_sv.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="sv"> -<translation id="4820616160060340806">Command + <ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> sekunder kvar</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> sekunder kvar</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> minuter kvar</translation> -<translation id="1801827354178857021">Punkt</translation> -<translation id="1190609913194133056">Meddelandecenter</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> minuter kvar</translation> -<translation id="5613020302032141669">Vänsterpil</translation> -<translation id="4971687151119236543">Föregående spår</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/>-fil (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> sekunder</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> timmar kvar</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> till från <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Avbryt</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Uppil</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/sek</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> timmar</translation> -<translation id="3990502903496589789">Högerkant</translation> -<translation id="9038489124413477075">Namnlös mapp</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> minuter</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> dagar kvar</translation> -<translation id="932327136139879170">Startsida</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> minuter kvar</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> dagar kvar</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> sekunder kvar</translation> -<translation id="3909791450649380159">&Klipp ut</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minuter kvar</translation> -<translation id="688711909580084195">Namnlös webbsida</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">K&listra in</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Välj en mapp för överföring</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">Nedpil</translation> -<translation id="3087734570205094154">Nederst</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> minut kvar</translation> -<translation id="1860796786778352021">Meddelande om stängning</translation> -<translation id="6364916375976753737">Rulla åt vänster</translation> -<translation id="2629089419211541119">För <ph name="NUMBER_ONE"/> timme sedan</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> minuter</translation> -<translation id="6982279413068714821">För <ph name="NUMBER_DEFAULT"/> minuter sedan</translation> -<translation id="6945221475159498467">Välj</translation> -<translation id="6620110761915583480">Spara fil</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> sekunder</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> minut kvar</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> minut</translation> -<translation id="8210608804940886430">Page Down</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> dagar</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> timmar kvar</translation> -<translation id="5329858601952122676">&Ta bort</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> sekunder</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> kB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minuter</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">Igår</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minuter</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> minuter kvar</translation> -<translation id="6659594942844771486">Flik</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523">För <ph name="NUMBER_DEFAULT"/> dagar sedan</translation> -<translation id="8428213095426709021">Inställningar</translation> -<translation id="2497284189126895209">Alla filer</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minuter kvar</translation> -<translation id="5110450810124758964">För <ph name="NUMBER_ONE"/> dag sedan</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> sekund</translation> -<translation id="7814458197256864873">&Kopiera</translation> -<translation id="3889424535448813030">Högerpil</translation> -<translation id="4229495110203539533">För <ph name="NUMBER_ONE"/> sekund sedan</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> sekunder kvar</translation> -<translation id="6829324100069873704">Gå tillbaka till meddelanden</translation> -<translation id="6528179044667508675">Stör inte</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> sekunder</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> minuter</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Tillåt meddelanden från följande:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> timmar</translation> -<translation id="1398853756734560583">Maximera</translation> -<translation id="4250229828105606438">Skärmdump</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> timmar</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> minuter kvar</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Välj &alla</translation> -<translation id="2168039046890040389">Page Up</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> dagar</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> minuter</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minut</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">Här finns inget att se, fortsätt.</translation> -<translation id="2482878487686419369">Aviseringar</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Rulla hit</translation> -<translation id="4552416320897244156">Page Down</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> timmar</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> kB/sek</translation> -<translation id="8394908167088220973">Spela upp/Pausa</translation> -<translation id="2148716181193084225">Idag</translation> -<translation id="7960078400008666149">Stör inte i en timme</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> dagar</translation> -<translation id="2190355936436201913">(tom)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> timmar kvar</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> sekund kvar</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Rulla åt höger</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> timmar kvar</translation> -<translation id="1413622004203049571">Inaktivera aviseringar från <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Överst</translation> -<translation id="8331626408530291785">Rulla uppåt</translation> -<translation id="7907591526440419938">Öppna fil</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">För <ph name="NUMBER_DEFAULT"/> timmar sedan</translation> -<translation id="815598010540052116">Rulla nedåt</translation> -<translation id="6808150112686056157">Stoppa</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Återställ</translation> -<translation id="1243314992276662751">Överför</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> dag kvar</translation> -<translation id="8179976553408161302">Start</translation> -<translation id="945522503751344254">Skicka synpunkter</translation> -<translation id="9170848237812810038">&Ångra</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">Tillåt meddelanden från följande personer för alla användare:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> sekund</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minuter kvar</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Inställningar...</translation> -<translation id="6845383723252244143">Välj mapp</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> sekunder</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> sekunder</translation> -<translation id="5583640892426849032">Backsteg</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> dagar</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> timme</translation> -<translation id="2679312662830811292">För <ph name="NUMBER_ONE"/> minut sedan</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/sek</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> dag</translation> -<translation id="9098468523912235228">För <ph name="NUMBER_DEFAULT"/> sekunder sedan</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> sekunder kvar</translation> -<translation id="4570886800634958009">Meddelande om utökning</translation> -<translation id="436869212180315161">Pressen</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/sek</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minuter</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> minuter kvar</translation> -<translation id="6040143037577758943">Stäng</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/sek</translation> -<translation id="7649070708921625228">Hjälp</translation> -<translation id="6699343763173986273">Nästa spår</translation> -<translation id="8226233771743600312">Stör inte i en dag</translation> -<translation id="7457942297256758195">Ta bort alla</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> minuter</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> dagar kvar</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minuter</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> timmar kvar</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Skift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> sekunder</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> sekunder</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> sekunder</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> dagar kvar</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/sek</translation> -<translation id="2743387203779672305">Kopiera till Urklipp</translation> -<translation id="8371695176452482769">Prata nu</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Stör inte</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Minimera</translation> -<translation id="6394627529324717982">Komma</translation> -<translation id="3036649622769666520">Öppna filer</translation> -<translation id="8328145009876646418">Vänsterkant</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> sekunder</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_sw.xtb b/chromium/ui/base/strings/ui_strings_sw.xtb deleted file mode 100644 index f0dc6efa8f1..00000000000 --- a/chromium/ui/base/strings/ui_strings_sw.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="sw"> -<translation id="4820616160060340806">Amri+ <ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Futa</translation> -<translation id="528468243742722775">Mwisho</translation> -<translation id="5341849548509163798">Saa <ph name="NUMBER_MANY"/> zilizopita</translation> -<translation id="6310545596129886942">zimesalia sekunde <ph name="NUMBER_FEW"/></translation> -<translation id="9213479837033539041">zimesalia sekunde <ph name="NUMBER_MANY"/></translation> -<translation id="1209866192426315618">zimesalia dakika <ph name="NUMBER_DEFAULT"/></translation> -<translation id="1801827354178857021">Kikomo</translation> -<translation id="1190609913194133056">Kituo cha Arifa</translation> -<translation id="7470933019269157899">Zimesalia dakika <ph name="NUMBER_DEFAULT"/></translation> -<translation id="5613020302032141669">Mshale Kushoto</translation> -<translation id="4971687151119236543">Wimbo wa Awali wa Media</translation> -<translation id="8602707065186045623">Faili ya <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918">dakika <ph name="NUMBER_ZERO"/> zilizopita</translation> -<translation id="7121570032414343252">zimesalia sekunde <ph name="NUMBER_TWO"/></translation> -<translation id="7511635910912978956">zimesalia saa <ph name="NUMBER_FEW"/></translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> zaidi kutoka <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Ghairi</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658">B <ph name="QUANTITY"/></translation> -<translation id="3660179305079774227">Mshale Juu</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928">saa <ph name="NUMBER_DEFAULT"/></translation> -<translation id="3990502903496589789">Ncha ya Kulia</translation> -<translation id="9038489124413477075">Folda isiyo na jina</translation> -<translation id="8507996248087185956">dakika <ph name="NUMBER_DEFAULT"/></translation> -<translation id="3520476450377425184">zimesalia siku <ph name="NUMBER_MANY"/></translation> -<translation id="932327136139879170">Nyumbani</translation> -<translation id="5600907569873192868">zimesalia dakika <ph name="NUMBER_MANY"/></translation> -<translation id="8666066831007952346">zimesalia siku <ph name="NUMBER_TWO"/></translation> -<translation id="6390842777729054533">zimesalia sekunde <ph name="NUMBER_ZERO"/></translation> -<translation id="3909791450649380159">&Kata</translation> -<translation id="2560788951337264832">Zimesalia dakika <ph name="NUMBER_ZERO"/></translation> -<translation id="688711909580084195">Ukurasa wa Wavuti usio na Kichwa</translation> -<translation id="3353284378027041011">siku <ph name="NUMBER_FEW"/> zilizopita</translation> -<translation id="5076340679995252485">&Bandika</translation> -<translation id="7460907917090416791">TB <ph name="QUANTITY"/></translation> -<translation id="364720409959344976">Chagua Folda ya Kupakia</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016">dakika <ph name="NUMBER_TWO"/> zilizopita</translation> -<translation id="3234408098842461169">Mshale Chini</translation> -<translation id="3087734570205094154">Chini</translation> -<translation id="5935630983280450497">imesalia dakika <ph name="NUMBER_ONE"/></translation> -<translation id="1860796786778352021">Funga arifa</translation> -<translation id="6364916375976753737">Sogeza Kushoto</translation> -<translation id="2629089419211541119">saa <ph name="NUMBER_ONE"/> lililopita</translation> -<translation id="2994641463185352298">Dakika <ph name="NUMBER_DEFAULT"/></translation> -<translation id="6982279413068714821">dakika <ph name="NUMBER_DEFAULT"/> zilizopita</translation> -<translation id="6945221475159498467">Chagua</translation> -<translation id="6620110761915583480">Hifadhi Faili</translation> -<translation id="4349181486102621992">Sekunde <ph name="NUMBER_ZERO"/></translation> -<translation id="6719684875142564568">saa <ph name="NUMBER_ZERO"/></translation> -<translation id="7836361698254323868">Imesalia dakika <ph name="NUMBER_ONE"/></translation> -<translation id="2953767478223974804">dakika <ph name="NUMBER_ONE"/></translation> -<translation id="8210608804940886430">Ukurasa mmoja chini</translation> -<translation id="1572103024875503863">siku <ph name="NUMBER_MANY"/></translation> -<translation id="7163503212501929773">zimesalia saa <ph name="NUMBER_MANY"/></translation> -<translation id="5329858601952122676">&Futa</translation> -<translation id="8088823334188264070">sekunde <ph name="NUMBER_MANY"/></translation> -<translation id="8901569739625249689">KB <ph name="QUANTITY"/></translation> -<translation id="7712011264267466734">Dakika <ph name="NUMBER_MANY"/></translation> -<translation id="7275974018215686543">sekunde <ph name="NUMBER_MANY"/> zilizopita</translation> -<translation id="7781829728241885113">Jana</translation> -<translation id="3424538384153559412">Dakika <ph name="NUMBER_TWO"/></translation> -<translation id="50960180632766478">zimesalia dakika <ph name="NUMBER_FEW"/></translation> -<translation id="6659594942844771486">Kichupo</translation> -<translation id="3049748772180311791">MB <ph name="QUANTITY"/></translation> -<translation id="4988273303304146523">siku <ph name="NUMBER_DEFAULT"/> zilizopita</translation> -<translation id="8428213095426709021">Mipangilio</translation> -<translation id="2497284189126895209">Faili zote</translation> -<translation id="7487278341251176613">Zimesalia dakika <ph name="NUMBER_TWO"/></translation> -<translation id="5110450810124758964">siku <ph name="NUMBER_ONE"/> iliyopita</translation> -<translation id="2820806154655529776">sekunde <ph name="NUMBER_ONE"/></translation> -<translation id="7814458197256864873">&Nakili</translation> -<translation id="3889424535448813030">Mshale Kulia</translation> -<translation id="4229495110203539533">sekunde <ph name="NUMBER_ONE"/> iliyopita</translation> -<translation id="2544782972264605588">zimesalia sekunde <ph name="NUMBER_DEFAULT"/></translation> -<translation id="6829324100069873704">Rudi kwenye arifa</translation> -<translation id="6528179044667508675">Usinisumbue</translation> -<translation id="5066177358602611309">Sekunde <ph name="NUMBER_DEFAULT"/></translation> -<translation id="290555789621781773">dakika <ph name="NUMBER_TWO"/></translation> -<translation id="5149131957118398098">Zimesalia saa <ph name="NUMBER_ZERO"/></translation> -<translation id="7135556860107312402">Ruhusu arifa kutoka kwa:</translation> -<translation id="8112886015144590373">saa <ph name="NUMBER_FEW"/></translation> -<translation id="1398853756734560583">Tanua</translation> -<translation id="4250229828105606438">Picha ya skrini</translation> -<translation id="6690744523875189208">saa <ph name="NUMBER_TWO"/></translation> -<translation id="5260878308685146029">zimesalia dakika <ph name="NUMBER_TWO"/></translation> -<translation id="3757388668994797779">GB <ph name="QUANTITY"/></translation> -<translation id="1901303067676059328">Chagua &yote</translation> -<translation id="2168039046890040389">Ukurasa mmoja juu</translation> -<translation id="7363290921156020669">dakika <ph name="NUMBER_ZERO"/></translation> -<translation id="9107059250669762581">siku <ph name="NUMBER_DEFAULT"/></translation> -<translation id="6463061331681402734">dakika <ph name="NUMBER_MANY"/></translation> -<translation id="7634624804467787019">Dakika <ph name="NUMBER_ONE"/></translation> -<translation id="8448317557906454022">sekunde <ph name="NUMBER_ZERO"/> zilizopita</translation> -<translation id="4927753642311223124">Hakuna cha kuangalia hapa, endelea.</translation> -<translation id="2482878487686419369">Arifa</translation> -<translation id="6357135709975569075">siku <ph name="NUMBER_ZERO"/></translation> -<translation id="3183922693828471536">Sogeza Hadi Hapa</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401">saa <ph name="NUMBER_MANY"/></translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">Cheza Media/Sitisha</translation> -<translation id="2148716181193084225">Leo</translation> -<translation id="7960078400008666149">Usinisumbue kwa saa moja</translation> -<translation id="4373894838514502496">dakika <ph name="NUMBER_FEW"/> zilizopita</translation> -<translation id="4115153316875436289">siku <ph name="NUMBER_TWO"/></translation> -<translation id="2190355936436201913">(tupu)</translation> -<translation id="1164369517022005061">Zimesalia saa <ph name="NUMBER_DEFAULT"/></translation> -<translation id="152482086482215392">imesalia sekunde <ph name="NUMBER_ONE"/></translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Sogeza Kulia</translation> -<translation id="7414887922320653780">limesalia saa <ph name="NUMBER_ONE"/></translation> -<translation id="1413622004203049571">Zima arifa kutoka <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Ya Juu</translation> -<translation id="8331626408530291785">Sogeza Juu</translation> -<translation id="7907591526440419938">Fungua Faili</translation> -<translation id="2864069933652346933">zimesalia siku <ph name="NUMBER_ZERO"/></translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045">Saa <ph name="NUMBER_DEFAULT"/> zilizopita</translation> -<translation id="815598010540052116">Sogeza Chini</translation> -<translation id="6808150112686056157">Simamisha Media</translation> -<translation id="1308727876662951186">zimesalia dakika <ph name="NUMBER_ZERO"/></translation> -<translation id="3157931365184549694">Rejesha</translation> -<translation id="1243314992276662751">Pakia</translation> -<translation id="50030952220075532">imesalia siku <ph name="NUMBER_ONE"/></translation> -<translation id="8179976553408161302">Enter</translation> -<translation id="945522503751344254">Tuma maoni</translation> -<translation id="9170848237812810038">&Tendua</translation> -<translation id="1285266685456062655">Saa <ph name="NUMBER_FEW"/> zilizopita</translation> -<translation id="6918245111648057970">Ruhusu arifa kutoka kwa wafuatao kwa kila mtumiaji:</translation> -<translation id="5489830104927132166">Sekunde <ph name="NUMBER_ONE"/></translation> -<translation id="3994835489895548312">Zimesalia dakika <ph name="NUMBER_MANY"/></translation> -<translation id="6358975074282722691">sekunde <ph name="NUMBER_TWO"/> zilizopita</translation> -<translation id="520299402983819650">PB <ph name="QUANTITY"/></translation> -<translation id="2983818520079887040">Mipangilio...</translation> -<translation id="6845383723252244143">Chagua Folda</translation> -<translation id="7600770490873519066">Sekunde <ph name="NUMBER_FEW"/></translation> -<translation id="1095623615273566396">sekunde <ph name="NUMBER_FEW"/></translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534">siku <ph name="NUMBER_MANY"/> zilizopita</translation> -<translation id="8355915647418390920">siku <ph name="NUMBER_FEW"/></translation> -<translation id="5116333507878097773">saa <ph name="NUMBER_ONE"/></translation> -<translation id="2679312662830811292">dakika <ph name="NUMBER_ONE"/> iliyopita</translation> -<translation id="8788572795284305350">Saa <ph name="NUMBER_ZERO"/> zilizopita</translation> -<translation id="3740362395218339114">GB/s <ph name="QUANTITY"/></translation> -<translation id="6644971472240498405">siku <ph name="NUMBER_ONE"/></translation> -<translation id="9098468523912235228">sekunde <ph name="NUMBER_DEFAULT"/> zilizopita</translation> -<translation id="494645311413743213">zimesalia sekunde <ph name="NUMBER_TWO"/></translation> -<translation id="4570886800634958009">Panua arifa</translation> -<translation id="436869212180315161">Bofya</translation> -<translation id="4860787810836767172">sekunde <ph name="NUMBER_FEW"/> zilizopita</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074">Dakika <ph name="NUMBER_ZERO"/></translation> -<translation id="1858722859751911017">Zimesalia dakika <ph name="NUMBER_FEW"/></translation> -<translation id="6040143037577758943">Funga</translation> -<translation id="1101671447232096497">dakika <ph name="NUMBER_MANY"/> zilizopita</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">Usaidizi</translation> -<translation id="6699343763173986273">Wimbo Unaofuata kwenye Media</translation> -<translation id="8226233771743600312">Usinisumbue kwa siku moja</translation> -<translation id="7457942297256758195">Futa Zote</translation> -<translation id="822618367988303761">siku <ph name="NUMBER_TWO"/> zilizopita</translation> -<translation id="4745438305783437565">dakika <ph name="NUMBER_FEW"/></translation> -<translation id="1963692530539281474">Zimesalia siku <ph name="NUMBER_DEFAULT"/></translation> -<translation id="7509440305564869263">Dakika <ph name="NUMBER_FEW"/></translation> -<translation id="5906719743126878045">zimesalia saa <ph name="NUMBER_TWO"/></translation> -<translation id="8959208747503200525">Saa <ph name="NUMBER_TWO"/> zilizopita</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940">sekunde <ph name="NUMBER_DEFAULT"/></translation> -<translation id="4197700912384709145">sekunde <ph name="NUMBER_ZERO"/></translation> -<translation id="27199337101878275">Sekunde <ph name="NUMBER_MANY"/></translation> -<translation id="3759876923365568382">zimesalia siku <ph name="NUMBER_FEW"/></translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">Nakili kwenye ubao wa kunakili</translation> -<translation id="8371695176452482769">Ongea sasa</translation> -<translation id="6965382102122355670">Sawa</translation> -<translation id="7850320739366109486">Usinisumbue</translation> -<translation id="6978839998405419496">siku <ph name="NUMBER_ZERO"/> zilizopita</translation> -<translation id="5941711191222866238">Punguza</translation> -<translation id="6394627529324717982">Koma</translation> -<translation id="3036649622769666520">Fungua Mafaili</translation> -<translation id="8328145009876646418">Ncha ya Kushoto</translation> -<translation id="7372005818821648611">Sekunde <ph name="NUMBER_TWO"/></translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_ta.xtb b/chromium/ui/base/strings/ui_strings_ta.xtb deleted file mode 100644 index 2032880a820..00000000000 --- a/chromium/ui/base/strings/ui_strings_ta.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="ta"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942">இன்னும் <ph name="NUMBER_FEW"/> வினாடிகள் உள்ளன</translation> -<translation id="9213479837033539041">இன்னும் <ph name="NUMBER_MANY"/> நொடிகள் உள்ளன</translation> -<translation id="1209866192426315618">இன்னும் <ph name="NUMBER_DEFAULT"/> நிமிடங்கள் உள்ளன</translation> -<translation id="1801827354178857021">முற்றுப்புள்ளி</translation> -<translation id="1190609913194133056">அறிவிப்பு மையம்</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> நிமிடங்கள் உள்ளன</translation> -<translation id="5613020302032141669">இடது அம்பு</translation> -<translation id="4971687151119236543">ஊடகத்தின் முந்தைய டிராக்</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/>கோப்பு(.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> வினாடிகள்</translation> -<translation id="7511635910912978956">இன்னும் <ph name="NUMBER_FEW"/> மணிநேரம் உள்ளது</translation> -<translation id="8717309436826820190"><ph name="SOURCE_OF_NOTIFICATIONS"/> இலிருந்து மேலும் <ph name="NUMBER_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">ரத்துசெய்</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> பை</translation> -<translation id="3660179305079774227">மேல்நோக்கிய அம்பு</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> மெ.பை/வி</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> மணி நேரம்</translation> -<translation id="3990502903496589789">வலது விளிம்பு</translation> -<translation id="9038489124413477075">பெயரிடப்படாதக் கோப்புறை</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> நிமிடங்கள்</translation> -<translation id="3520476450377425184">இன்னும் <ph name="NUMBER_MANY"/> நாட்கள் உள்ளன</translation> -<translation id="932327136139879170">முகப்பு</translation> -<translation id="5600907569873192868">இன்னும் <ph name="NUMBER_MANY"/> நிமிடங்கள் உள்ளன</translation> -<translation id="8666066831007952346">இன்னும் <ph name="NUMBER_TWO"/> நாட்கள் உள்ளன</translation> -<translation id="6390842777729054533">இன்னும் <ph name="NUMBER_ZERO"/> வினாடிகள் உள்ளன</translation> -<translation id="3909791450649380159">வெட்&டு</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> நிமிடங்கள் உள்ளன</translation> -<translation id="688711909580084195">தலைப்பிடாத வலைப்பக்கம்</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">&ஒட்டு</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> டெ.பை</translation> -<translation id="364720409959344976">பதிவேற்றுவதற்குக் கோப்புறையைத் தேர்ந்தெடு</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">கீழ்நோக்கிய அம்பு</translation> -<translation id="3087734570205094154">கீழே</translation> -<translation id="5935630983280450497">இன்னும் <ph name="NUMBER_ONE"/> நிமிடம் உள்ளது</translation> -<translation id="1860796786778352021">அறிவிப்பை மூடு</translation> -<translation id="6364916375976753737">இடப்புறம் உருட்டு</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> hour ago</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> நிமிடங்கள்</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> mins ago</translation> -<translation id="6945221475159498467">தேர்ந்தெடு</translation> -<translation id="6620110761915583480">கோப்பைச் சேமி</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> வினாடிகள்</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> நிமிடம் உள்ளது</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> நிமிடம்</translation> -<translation id="8210608804940886430">பக்கத்தின் கீழே</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> நாட்கள்</translation> -<translation id="7163503212501929773">இன்னும் <ph name="NUMBER_MANY"/> மணிநேரம் உள்ளது</translation> -<translation id="5329858601952122676">&நீக்கு</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> நொடிகள்</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> கி.பை.</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> நிமிடங்கள்</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">நேற்று</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> நிமிடங்கள்</translation> -<translation id="50960180632766478">இன்னும் <ph name="NUMBER_FEW"/> நிமிடங்கள் உள்ளன</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> மெ.பை</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> days ago</translation> -<translation id="8428213095426709021">அமைப்புகள்</translation> -<translation id="2497284189126895209">அனைத்து கோப்புகளும்</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> நிமிடங்கள் உள்ளன</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> day ago</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> நொடி</translation> -<translation id="7814458197256864873">&நகலெடு</translation> -<translation id="3889424535448813030">வலது அம்பு</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> sec ago</translation> -<translation id="2544782972264605588">இன்னும் <ph name="NUMBER_DEFAULT"/> வினாடிகள் உள்ளன</translation> -<translation id="6829324100069873704">அறிவிப்புகளுக்குச் செல்</translation> -<translation id="6528179044667508675">தொந்தரவு செய்ய வேண்டாம்</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> வினாடிகள்</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> நிமிடங்கள்</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">பின்வருபவற்றிலிருந்து வரும் அறிவிப்புகளை அனுமதி:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> மணி நேரம்</translation> -<translation id="1398853756734560583">பெரிதாக்கு</translation> -<translation id="4250229828105606438">ஸ்கிரீன் ஷாட்</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> மணி நேரம்</translation> -<translation id="5260878308685146029">இன்னும் <ph name="NUMBER_TWO"/> நிமிடங்கள் உள்ளன</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">அ&னைத்தையும் தேர்ந்தெடு</translation> -<translation id="2168039046890040389">பக்கத்தின் மேலே</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> நாட்கள்</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> நிமிடங்கள்</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> நிமிடம்</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">பார்க்க இங்கு எதுவுமில்லை, தொடரவும்.</translation> -<translation id="2482878487686419369">அறிவிக்கைகள்</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">இங்கே உருட்டு</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> மணிநேரம்</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> கி.பை./வி</translation> -<translation id="8394908167088220973">ஊடகத்தை இயக்கு/இடைநிறுத்து</translation> -<translation id="2148716181193084225">இன்று</translation> -<translation id="7960078400008666149">ஒரு மணிநேரத்திற்குத் தொந்தரவு செய்ய வேண்டாம்</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> நாட்கள்</translation> -<translation id="2190355936436201913">(காலி)</translation> -<translation id="1164369517022005061">இன்னும் <ph name="NUMBER_DEFAULT"/> மணிநேரம் உள்ளது</translation> -<translation id="152482086482215392">இன்னும் <ph name="NUMBER_ONE"/> நொடிகள் உள்ளன</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">வலப்புறம் உருட்டு</translation> -<translation id="7414887922320653780">இன்னும் <ph name="NUMBER_ONE"/> மணிநேரம் உள்ளது</translation> -<translation id="1413622004203049571"><ph name="NOTIFIER_NAME"/> இடமிருந்து வரும் அறிவிப்புகளை முடக்கு</translation> -<translation id="2666092431469916601">மேலே</translation> -<translation id="8331626408530291785">மேலே உருட்டு</translation> -<translation id="7907591526440419938">கோப்பைத் திற</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> hours ago</translation> -<translation id="815598010540052116">கீழே உருட்டு</translation> -<translation id="6808150112686056157">ஊடகத்தை நிறுத்து</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">மீட்டமை</translation> -<translation id="1243314992276662751">பதிவேற்று</translation> -<translation id="50030952220075532">இன்னும் <ph name="NUMBER_ONE"/> நாட்கள் உள்ளன</translation> -<translation id="8179976553408161302">உள்ளிடு</translation> -<translation id="945522503751344254">பின்னூட்டம் அனுப்புக</translation> -<translation id="9170848237812810038">&செயல்தவிர்</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">ஒவ்வொரு பயனருக்கும் பின்வருபவையிலிருந்து அறிவிப்புகளை அனுமதி:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> வினாடி</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> நிமிடங்கள் உள்ளன</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> பெ.பை</translation> -<translation id="2983818520079887040">அமைப்புகள்...</translation> -<translation id="6845383723252244143">கோப்புறையைத் தேர்ந்தெடு</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> வினாடிகள்</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> நொடிகள்</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> நாட்கள்</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> மணி நேரம்</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> min ago</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> ஜி.பை/வி</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> நாள்</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> secs ago</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> வினாடிகள் உள்ளன</translation> -<translation id="4570886800634958009">அறிவிப்பை விரிவாக்கு</translation> -<translation id="436869212180315161">அழுத்து</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> டெ.பை/வி</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> நிமிடங்கள்</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> நிமிடங்கள் உள்ளன</translation> -<translation id="6040143037577758943">மூடு</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> பை/வி</translation> -<translation id="7649070708921625228">உதவி</translation> -<translation id="6699343763173986273">ஊடகத்தின் அடுத்த டிராக்</translation> -<translation id="8226233771743600312">ஒரு நாள் தொந்தரவு செய்ய வேண்டாம்</translation> -<translation id="7457942297256758195">அனைத்தையும் அழி</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> நிமிடங்கள்</translation> -<translation id="1963692530539281474">இன்னும் <ph name="NUMBER_DEFAULT"/> நாட்கள் உள்ளன</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> நிமிடங்கள்</translation> -<translation id="5906719743126878045">இன்னும் <ph name="NUMBER_TWO"/> மணிநேரம் உள்ளது</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> நொடிகள்</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> நொடிகள்</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> வினாடிகள்</translation> -<translation id="3759876923365568382">இன்னும் <ph name="NUMBER_FEW"/> நாட்கள் உள்ளன</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> பெ.பை/வி</translation> -<translation id="2743387203779672305">கிளிப்போர்டுக்கு நகலெடு</translation> -<translation id="8371695176452482769">இப்போது பேசுக</translation> -<translation id="6965382102122355670">சரி</translation> -<translation id="7850320739366109486">தொந்தரவு செய்ய வேண்டாம்</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">சிறிதாக்கு</translation> -<translation id="6394627529324717982">கமா</translation> -<translation id="3036649622769666520">கோப்புகளைத் திற</translation> -<translation id="8328145009876646418">இடதுபுற முனை</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> வினாடிகள்</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_te.xtb b/chromium/ui/base/strings/ui_strings_te.xtb deleted file mode 100644 index eede4c10b8d..00000000000 --- a/chromium/ui/base/strings/ui_strings_te.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="te"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">ముగింపు</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> సెకన్లు మిగిలి ఉన్నాయి</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> సెకన్లు మిగిలి ఉన్నాయి</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> నిమిషాలు మిగిలి ఉన్నాయి</translation> -<translation id="1801827354178857021">సమయం</translation> -<translation id="1190609913194133056">నోటిఫికేషన్ కేంద్రం</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> నిమిషాలు మిగిలి ఉన్నాయి</translation> -<translation id="5613020302032141669">ఎడమ బాణం</translation> -<translation id="4971687151119236543">మీడియా మునుపటి ట్రాక్</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> ఫైల్ (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> సెకన్లు</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> గంటలు మిగిలి ఉన్నాయి</translation> -<translation id="8717309436826820190"><ph name="SOURCE_OF_NOTIFICATIONS"/> నుండి మరో <ph name="NUMBER_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">రద్దు చెయ్యి</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">ఎగువ బాణం</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> గంటలు</translation> -<translation id="3990502903496589789">కుడి సరిహద్దు</translation> -<translation id="9038489124413477075">పేరులేని ఫోల్డర్</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> నిమిషాలు</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> రోజులు మిగిలి ఉన్నాయి</translation> -<translation id="932327136139879170">హోమ్</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> నిమిషాలు మిగిలాయి</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> రోజులు మిగిలి ఉన్నాయి</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> సెకన్లు మిగిలి ఉన్నాయి</translation> -<translation id="3909791450649380159">క&త్తిరించు</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> నిమిషాలు మిగిలి ఉన్నాయి</translation> -<translation id="688711909580084195">శీర్షికలేని వెబ్పేజీ</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">&అతికించు</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">అప్లోడ్ చేయడానికి ఫోల్డర్ని ఎంచుకోండి</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">క్రింది బాణం</translation> -<translation id="3087734570205094154">దిగువ</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> నిమిషాలు మిగిలి ఉన్నాయి</translation> -<translation id="1860796786778352021">నోటిఫికేషన్ను మూసివేయి</translation> -<translation id="6364916375976753737">ఎడమకి స్క్రోల్ చేయి</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> hour ago</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> నిమిషాలు</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> mins ago</translation> -<translation id="6945221475159498467">ఎంచుకోండి</translation> -<translation id="6620110761915583480">ఫైల్ను సేవ్ చేయి</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> సెకన్లు</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> నిమిషం మిగిలి ఉంది</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> నిమిషం</translation> -<translation id="8210608804940886430">పేజీ క్రిందికి</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> రోజులు</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> గంటలు మిగిలి ఉన్నాయి</translation> -<translation id="5329858601952122676">&తొలగించు</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> సెకన్లు</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> నిమిషాలు</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">నిన్న</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> నిమిషాలు</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> నిమిషాలు మిగిలిలాయి</translation> -<translation id="6659594942844771486">టాబ్</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> days ago</translation> -<translation id="8428213095426709021">సెట్టింగ్లు</translation> -<translation id="2497284189126895209">మొత్తం ఫైళ్లు</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> నిమిషాలు మిగిలి ఉన్నాయి</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> day ago</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> సెకను</translation> -<translation id="7814458197256864873">&కాపీ</translation> -<translation id="3889424535448813030">కుడి బాణం</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> sec ago</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> సెకన్లు మిగిలాయి</translation> -<translation id="6829324100069873704">నోటిఫికేషన్లకు తిరిగి వెళ్లు</translation> -<translation id="6528179044667508675">అంతరాయం కలిగించవద్దు</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> సెకన్లు</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> నిమిషాలు</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">వీటి నుండి నోటిఫికేషన్లను అనుమతించు:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> గంటలు</translation> -<translation id="1398853756734560583">గరిష్ఠీకరించు</translation> -<translation id="4250229828105606438">స్క్రీన్షాట్</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> గంటలు</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> నిమిషాలు మిగిలాయి</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">&అన్నీ ఎంచుకోండి</translation> -<translation id="2168039046890040389">పేజీ పైకి</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> రోజులు</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> నిమిషాలు</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> నిమిషం</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">ఇక్కడ చూడటానికి ఏమీ లేదు, కొనసాగండి.</translation> -<translation id="2482878487686419369">ప్రకటనలు</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">ఇక్కడ స్క్రోల్ చెయ్యండి</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> గంటలు</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/సె</translation> -<translation id="8394908167088220973">మీడియా ప్లే/పాజ్</translation> -<translation id="2148716181193084225">ఈ రోజు</translation> -<translation id="7960078400008666149">ఒక గంటపాటు అంతరాయం కలిగించవద్దు</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> రోజులు</translation> -<translation id="2190355936436201913">(ఖాళీ)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> గంటలు మిగిలాయి</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> సెకన్లు మిగిలి ఉన్నాయి</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">కుడికి స్క్రోల్ చెయ్యి</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> గంటలు మిగిలా యి</translation> -<translation id="1413622004203049571"><ph name="NOTIFIER_NAME"/> నుండి వచ్చే నోటిఫికేషన్లను నిలిపివేయి</translation> -<translation id="2666092431469916601">పైన</translation> -<translation id="8331626408530291785">పైకి స్క్రోల్ చెయ్యి</translation> -<translation id="7907591526440419938">ఫైల్ను తెరువు</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> hours ago</translation> -<translation id="815598010540052116">క్రిందికి స్క్రోల్ చేయి</translation> -<translation id="6808150112686056157">మీడియా ఆపివేయి</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">పునరుద్ధరించు</translation> -<translation id="1243314992276662751">అప్లోడ్ చేయి</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> రోజులు మిగిలి ఉన్నాయి</translation> -<translation id="8179976553408161302">నమోదు చేయండి</translation> -<translation id="945522503751344254">అభిప్రాయాన్ని పంపండి</translation> -<translation id="9170848237812810038">&అన్డు</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">ప్రతి వినియోగదారు కోసం కింది వారి నుండి నోటిఫికేషన్లను అనుమతించు:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> సెకను</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> నిమిషాలు మిగిలి ఉన్నాయి</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">సెట్టింగ్లు...</translation> -<translation id="6845383723252244143">ఫోల్డర్ను ఎంచుకో</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> సెకన్లు</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> సెకన్లు</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> రోజులు</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> గంట</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> min ago</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> రోజు</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> secs ago</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> సెకన్లు మిగిలి ఉన్నాయి</translation> -<translation id="4570886800634958009">నోటిఫికేషన్ను విస్తరించు</translation> -<translation id="436869212180315161">నొక్కు</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> నిమిషాలు</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> నిమిషాలు మిగిలి ఉన్నాయి</translation> -<translation id="6040143037577758943">మూసివేయి</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">సహాయం</translation> -<translation id="6699343763173986273">మీడియా తదుపరి ట్రాక్</translation> -<translation id="8226233771743600312">ఒక రోజుపాటు అంతరాయం కలిగించవద్దు</translation> -<translation id="7457942297256758195">అన్నీ క్లియర్ చేయి</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> నిమిషాలు</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> రోజులు మిగిలాయి</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> నిమిషాలు</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> గంటలు మిగిలి ఉన్నాయి</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> సెకన్లు</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> సెకన్లు</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> సెకన్లు</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> రోజులు మిగిలాయి</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">క్లిప్బోర్డ్కు కాపీ చేయి</translation> -<translation id="8371695176452482769">ఇప్పుడు మాట్లాడండి</translation> -<translation id="6965382102122355670">సరే</translation> -<translation id="7850320739366109486">అంతరాయం కలిగించవద్దు</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">కనిష్టీకరించు</translation> -<translation id="6394627529324717982">కామా</translation> -<translation id="3036649622769666520">ఫైళ్ళను తెరువు</translation> -<translation id="8328145009876646418">ఎడమ హద్దు</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> సెకన్లు</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_th.xtb b/chromium/ui/base/strings/ui_strings_th.xtb deleted file mode 100644 index 8f9debf1091..00000000000 --- a/chromium/ui/base/strings/ui_strings_th.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="th"> -<translation id="4820616160060340806">คำสั่ง+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> ชั่วโมงที่ผ่านมา</translation> -<translation id="6310545596129886942">เหลือ <ph name="NUMBER_FEW"/> วินาที</translation> -<translation id="9213479837033539041">เหลือ <ph name="NUMBER_MANY"/> วินาที</translation> -<translation id="1209866192426315618">เหลือ <ph name="NUMBER_DEFAULT"/> นาที</translation> -<translation id="1801827354178857021">มหัพภาค</translation> -<translation id="1190609913194133056">ศูนย์การแจ้งเตือน</translation> -<translation id="7470933019269157899">เหลือ <ph name="NUMBER_DEFAULT"/> นาที</translation> -<translation id="5613020302032141669">ลูกศรซ้าย</translation> -<translation id="4971687151119236543">แทร็กก่อนหน้าของสื่อ</translation> -<translation id="8602707065186045623">ไฟล์ <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> วินาที</translation> -<translation id="7511635910912978956">เหลือ <ph name="NUMBER_FEW"/> ชั่วโมง</translation> -<translation id="8717309436826820190">อีก <ph name="NUMBER_OF_NOTIFICATIONS"/> รายการจาก <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">ยกเลิก</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">ลูกศรขึ้น</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/วินาที</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> ชั่วโมง</translation> -<translation id="3990502903496589789">ขอบขวา</translation> -<translation id="9038489124413477075">โฟลเดอร์ที่ไม่มีชื่อ</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> นาที</translation> -<translation id="3520476450377425184">เหลือ <ph name="NUMBER_MANY"/> วัน</translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868">เหลือ <ph name="NUMBER_MANY"/> นาที</translation> -<translation id="8666066831007952346">เหลือ <ph name="NUMBER_TWO"/> วัน</translation> -<translation id="6390842777729054533">เหลือ <ph name="NUMBER_ZERO"/> วินาที</translation> -<translation id="3909791450649380159">&ตัด</translation> -<translation id="2560788951337264832">เหลือ <ph name="NUMBER_ZERO"/> นาที</translation> -<translation id="688711909580084195">หน้าเว็บที่ไม่มีชื่อ</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> วันที่ผ่านมา</translation> -<translation id="5076340679995252485">&วาง</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">เลือกโฟลเดอร์เพื่ออัปโหลด</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> นาทีที่ผ่านมา</translation> -<translation id="3234408098842461169">ลูกศรลง</translation> -<translation id="3087734570205094154">ด้านล่าง</translation> -<translation id="5935630983280450497">เหลือ <ph name="NUMBER_ONE"/> นาที</translation> -<translation id="1860796786778352021">ปิดการแจ้งเตือน</translation> -<translation id="6364916375976753737">เลื่อนทางซ้าย</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> ชั่วโมงที่ผ่านมา</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> นาที</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> นาทีที่ผ่านมา</translation> -<translation id="6945221475159498467">เลือก</translation> -<translation id="6620110761915583480">บันทึกไฟล์</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> seconds</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">เหลือ <ph name="NUMBER_ONE"/> นาที</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> นาที</translation> -<translation id="8210608804940886430">เลื่อนหน้าลง</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> วัน</translation> -<translation id="7163503212501929773">เหลือ <ph name="NUMBER_MANY"/> ชั่วโมง</translation> -<translation id="5329858601952122676">&ลบ</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> วินาที</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> วินาทีที่ผ่านมา</translation> -<translation id="7781829728241885113">เมื่อวานนี้</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutes</translation> -<translation id="50960180632766478">เหลือ <ph name="NUMBER_FEW"/> นาที</translation> -<translation id="6659594942844771486">แท็บ</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> วันที่ผ่านมา</translation> -<translation id="8428213095426709021">การตั้งค่า</translation> -<translation id="2497284189126895209">ไฟล์ทั้งหมด</translation> -<translation id="7487278341251176613">เหลือ <ph name="NUMBER_TWO"/> นาที</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> วันที่ผ่านมา</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> วินาที</translation> -<translation id="7814458197256864873">&คัดลอก</translation> -<translation id="3889424535448813030">ลูกศรขวา</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> วินาทีที่ผ่านมา</translation> -<translation id="2544782972264605588">เหลือ <ph name="NUMBER_DEFAULT"/> วินาที</translation> -<translation id="6829324100069873704">กลับไปที่การแจ้งเตือน</translation> -<translation id="6528179044667508675">ห้ามรบกวน</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> วินาที</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> นาที</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">อนุญาตให้มีการแจ้งเตือนจากรายการต่อไปนี้</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> ชั่วโมง</translation> -<translation id="1398853756734560583">ย่อ</translation> -<translation id="4250229828105606438">ภาพหน้าจอ</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> ชั่วโมง</translation> -<translation id="5260878308685146029">เหลือ <ph name="NUMBER_TWO"/> นาที</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">เลือก&ทั้งหมด</translation> -<translation id="2168039046890040389">เลื่อนหน้าขึ้น</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> วัน</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> นาที</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> นาที</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> วินาทีที่ผ่านมา</translation> -<translation id="4927753642311223124">ที่นี่ไม่มีอะไรต้องดู ไปต่อได้</translation> -<translation id="2482878487686419369">การแจ้งเตือน</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">เลื่อนมาที่นี่</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> ชั่วโมง</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/วินาที</translation> -<translation id="8394908167088220973">เล่น/หยุดสื่อชั่วคราว</translation> -<translation id="2148716181193084225">วันนี้</translation> -<translation id="7960078400008666149">ห้ามรบกวนเป็นเวลาหนึ่งชั่วโมง</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> นาทีที่ผ่านมา</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> วัน</translation> -<translation id="2190355936436201913">(ว่างเปล่า)</translation> -<translation id="1164369517022005061">เหลือ <ph name="NUMBER_DEFAULT"/> ชั่วโมง</translation> -<translation id="152482086482215392">เหลือ <ph name="NUMBER_ONE"/> วินาที</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">เลื่อนทางขวา</translation> -<translation id="7414887922320653780">เหลือ <ph name="NUMBER_ONE"/> ชั่วโมง</translation> -<translation id="1413622004203049571">ปิดการแจ้งเตือนจาก <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">ด้านบน</translation> -<translation id="8331626408530291785">เลื่อนขึ้น</translation> -<translation id="7907591526440419938">เปิดไฟล์</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> ชั่วโมงที่ผ่านมา</translation> -<translation id="815598010540052116">เลื่อนลง</translation> -<translation id="6808150112686056157">หยุดสื่อ</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">คืนค่า</translation> -<translation id="1243314992276662751">อัปโหลด</translation> -<translation id="50030952220075532">เหลือ <ph name="NUMBER_ONE"/> วัน</translation> -<translation id="8179976553408161302">เข้าใช้</translation> -<translation id="945522503751344254">ส่งความคิดเห็น</translation> -<translation id="9170848237812810038">เ&ลิกทำ</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> ชั่วโมงที่ผ่านมา</translation> -<translation id="6918245111648057970">อนุญาตให้มีการแจ้งเตือนจากรายการต่อไปนี้สำหรับผู้ใช้แต่ละคน:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> วินาที</translation> -<translation id="3994835489895548312">เหลือ <ph name="NUMBER_MANY"/> นาที</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> วินาทีที่ผ่านมา</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">การตั้งค่า...</translation> -<translation id="6845383723252244143">เลือกโฟลเดอร์</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> seconds</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> วินาที</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> วันที่ผ่านมา</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> วัน</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> ชั่วโมง</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> นาทีที่ผ่านมา</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/วินาที</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> วัน</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> วินาทีที่ผ่านมา</translation> -<translation id="494645311413743213">เหลือ <ph name="NUMBER_TWO"/> วินาที</translation> -<translation id="4570886800634958009">ขยายการแจ้งเตือน</translation> -<translation id="436869212180315161">กด</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> วินาทีที่ผ่านมา</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/วินาที</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minutes</translation> -<translation id="1858722859751911017">เหลือ <ph name="NUMBER_FEW"/> นาที</translation> -<translation id="6040143037577758943">ปิด</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> นาทีที่ผ่านมา</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/วินาที</translation> -<translation id="7649070708921625228">ช่วยเหลือ</translation> -<translation id="6699343763173986273">แทร็กถัดไปของสื่อ</translation> -<translation id="8226233771743600312">ห้ามรบกวนเป็นเวลาหนึ่งวัน</translation> -<translation id="7457942297256758195">ล้างทั้งหมด</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> วันที่ผ่านมา</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> นาที</translation> -<translation id="1963692530539281474">เหลือ <ph name="NUMBER_DEFAULT"/> วัน</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minutes</translation> -<translation id="5906719743126878045">เหลือ <ph name="NUMBER_TWO"/> ชั่วโมง</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> ชั่วโมงที่ผ่านมา</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> วินาที</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> วินาที</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> seconds</translation> -<translation id="3759876923365568382">เหลือ <ph name="NUMBER_FEW"/> วัน</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/วินาที</translation> -<translation id="2743387203779672305">คัดลอกไว้ที่คลิปบอร์ด</translation> -<translation id="8371695176452482769">พูดเดี๋ยวนี้</translation> -<translation id="6965382102122355670">ตกลง</translation> -<translation id="7850320739366109486">ห้ามรบกวน</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">ย่อ</translation> -<translation id="6394627529324717982">จุลภาค</translation> -<translation id="3036649622769666520">เปิดไฟล์</translation> -<translation id="8328145009876646418">ขอบซ้าย</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> seconds</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_tr.xtb b/chromium/ui/base/strings/ui_strings_tr.xtb deleted file mode 100644 index 4879d395d23..00000000000 --- a/chromium/ui/base/strings/ui_strings_tr.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="tr"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> saat önce</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> saniye kaldı</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> saniye kaldı</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> dakika kaldı</translation> -<translation id="1801827354178857021">Nokta</translation> -<translation id="1190609913194133056">Bildirim Merkezi</translation> -<translation id="7470933019269157899"><ph name="NUMBER_DEFAULT"/> dakika kaldı</translation> -<translation id="5613020302032141669">Sol Ok</translation> -<translation id="4971687151119236543">Medya Önceki Parça</translation> -<translation id="8602707065186045623">Dosyayı <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> saniye</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> saat kaldı</translation> -<translation id="8717309436826820190"><ph name="SOURCE_OF_NOTIFICATIONS"/> kaynağından <ph name="NUMBER_OF_NOTIFICATIONS"/> bildirim daha</translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">İptal</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Yukarı Ok</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/sn</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> saat</translation> -<translation id="3990502903496589789">Sağ Kenar</translation> -<translation id="9038489124413477075">Adsız Klasör</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> dakika</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> gün kaldı</translation> -<translation id="932327136139879170">Ana Sayfa</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> dakika kaldı</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> gün kaldı</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> saniye kaldı</translation> -<translation id="3909791450649380159">&Kes</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> dakika kaldı</translation> -<translation id="688711909580084195">Başlıksız Web Sayfası</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> gün önce</translation> -<translation id="5076340679995252485">&Yapıştır</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Yüklenecek Klasörü Seçin</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> dakika önce</translation> -<translation id="3234408098842461169">Aşağı Ok</translation> -<translation id="3087734570205094154">Alt</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> dakika kaldı</translation> -<translation id="1860796786778352021">Bildirimi kapat</translation> -<translation id="6364916375976753737">Sola Kaydır</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> saat önce</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> dakika</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> dakika önce</translation> -<translation id="6945221475159498467">Seç</translation> -<translation id="6620110761915583480">Dosyayı Kaydet</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> seconds</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868"><ph name="NUMBER_ONE"/> dakika kaldı</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> dakika</translation> -<translation id="8210608804940886430">Page Down</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> gün</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> saat kaldı</translation> -<translation id="5329858601952122676">&Sil</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> saniye</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> saniye önce</translation> -<translation id="7781829728241885113">Dün</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutes</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> dakika kaldı</translation> -<translation id="6659594942844771486">Sekme</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> gün önce</translation> -<translation id="8428213095426709021">Ayarlar</translation> -<translation id="2497284189126895209">Tüm Dosyalar</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> dakika kaldı</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> gün önce</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> saniye</translation> -<translation id="7814458197256864873">K&opyala</translation> -<translation id="3889424535448813030">Sağ Ok</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> saniye önce</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> saniye kaldı</translation> -<translation id="6829324100069873704">Bildirimlere geri dön</translation> -<translation id="6528179044667508675">Rahatsız etmeyin</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> saniye</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> dakika</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Şunlardan gelen bildirimlere izin ver:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> saat</translation> -<translation id="1398853756734560583">Büyüt</translation> -<translation id="4250229828105606438">Ekran görüntüsü</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> saat</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> dakika kaldı</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Tümünü &seç</translation> -<translation id="2168039046890040389">Page Up</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> gün</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> dakika</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> minute</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> saniye önce</translation> -<translation id="4927753642311223124">Burada görülecek bir şey yok, devam edin.</translation> -<translation id="2482878487686419369">Bildirimler</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Buraya Kaydır</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> saat</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/sn</translation> -<translation id="8394908167088220973">Medyayı Oynat/Duraklat</translation> -<translation id="2148716181193084225">Bugün</translation> -<translation id="7960078400008666149">Bir saat süreyle rahatsız etmeyin</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> dakika önce</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> gün</translation> -<translation id="2190355936436201913">(boş)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> saat kaldı</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> saniye kaldı</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Sağa Kaydır</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> saat kaldı</translation> -<translation id="1413622004203049571"><ph name="NOTIFIER_NAME"/> bildirimlerini devre dışı bırak</translation> -<translation id="2666092431469916601">Üst</translation> -<translation id="8331626408530291785">Yukarı Kaydır</translation> -<translation id="7907591526440419938">Dosya Aç</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> saat önce</translation> -<translation id="815598010540052116">Aşağı Kaydır</translation> -<translation id="6808150112686056157">Medyayı Durdur</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Geri yükle</translation> -<translation id="1243314992276662751">Yükle</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> gün kaldı</translation> -<translation id="8179976553408161302">Giriş</translation> -<translation id="945522503751344254">Geri bildirim gönder</translation> -<translation id="9170848237812810038">&Geri al</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> saat önce</translation> -<translation id="6918245111648057970">Her bir kullanıcı için şunlardan gelen bildirimlere izin ver:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> second</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> dakika kaldı</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> saniye önce</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Ayarlar...</translation> -<translation id="6845383723252244143">Klasörü Seçin</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> seconds</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> saniye</translation> -<translation id="5583640892426849032">Geri al tuşu</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> gün önce</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> gün</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> saat</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> dakika önce</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/sn</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> gün</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> saniye önce</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> saniye kaldı</translation> -<translation id="4570886800634958009">Bildirimi genişlet</translation> -<translation id="436869212180315161">Basın</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> saniye önce</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/sn</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minutes</translation> -<translation id="1858722859751911017"><ph name="NUMBER_FEW"/> dakika kaldı</translation> -<translation id="6040143037577758943">Kapat</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> dakika önce</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/sn</translation> -<translation id="7649070708921625228">Yardım</translation> -<translation id="6699343763173986273">Medya Sonraki Parça</translation> -<translation id="8226233771743600312">Bir gün süreyle rahatsız etmeyin</translation> -<translation id="7457942297256758195">Tümünü Temizle</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> gün önce</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> dakika</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> gün kaldı</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> minutes</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> saat kaldı</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> saat önce</translation> -<translation id="8400147561352026160">ÜstKrkt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> saniye</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> saniye</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> seconds</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> gün kaldı</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/sn</translation> -<translation id="2743387203779672305">Panoya kopyala</translation> -<translation id="8371695176452482769">Şimdi konuşun</translation> -<translation id="6965382102122355670">Tamam</translation> -<translation id="7850320739366109486">Rahatsız Etmeyin</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Simge durumuna küçült</translation> -<translation id="6394627529324717982">Virgül</translation> -<translation id="3036649622769666520">Dosya Aç</translation> -<translation id="8328145009876646418">Sol Kenar</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> seconds</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_uk.xtb b/chromium/ui/base/strings/ui_strings_uk.xtb deleted file mode 100644 index 3510dafc804..00000000000 --- a/chromium/ui/base/strings/ui_strings_uk.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="uk"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> сек. залишилось</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> secs left</translation> -<translation id="1209866192426315618">Залишилось <ph name="NUMBER_DEFAULT"/> хв.</translation> -<translation id="1801827354178857021">Крапка</translation> -<translation id="1190609913194133056">Центр сповіщень</translation> -<translation id="7470933019269157899">Залишилося <ph name="NUMBER_DEFAULT"/> хвилини</translation> -<translation id="5613020302032141669">Курсор ліворуч</translation> -<translation id="4971687151119236543">Попередня композиція</translation> -<translation id="8602707065186045623">файл <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> secs</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> годин залишилось</translation> -<translation id="8717309436826820190">Ще <ph name="NUMBER_OF_NOTIFICATIONS"/> з <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Скасувати</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> б</translation> -<translation id="3660179305079774227">Курсор угору</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> Мб/сек.</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> годин</translation> -<translation id="3990502903496589789">Правий край</translation> -<translation id="9038489124413477075">Папка без назви</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> хв.</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> days left</translation> -<translation id="932327136139879170">Home</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> mins left</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> days left</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> secs left</translation> -<translation id="3909791450649380159">Вирізат&и</translation> -<translation id="2560788951337264832"><ph name="NUMBER_ZERO"/> minutes left</translation> -<translation id="688711909580084195">Веб-сторінка без назви</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> дн. тому</translation> -<translation id="5076340679995252485">&Вставити</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> Тб</translation> -<translation id="364720409959344976">Виберіть папку для завантаження</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">Курсор униз</translation> -<translation id="3087734570205094154">Низ</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> хв. залишилась</translation> -<translation id="1860796786778352021">Закрити сповіщення</translation> -<translation id="6364916375976753737">Прокрутка вліво</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> год. тому</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> хв</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> хв. тому</translation> -<translation id="6945221475159498467">Вибрати</translation> -<translation id="6620110761915583480">Зберегти файл</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> seconds</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Залишилася <ph name="NUMBER_ONE"/> хвилина</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> хв.</translation> -<translation id="8210608804940886430">Сторінка вниз</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> days</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> hours left</translation> -<translation id="5329858601952122676">&Видалити</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> secs</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> Кб</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> minutes</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">Учора</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> minutes</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> хв. залишилось</translation> -<translation id="6659594942844771486">Вкладка</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> Мб</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> дн. тому</translation> -<translation id="8428213095426709021">Налаштування</translation> -<translation id="2497284189126895209">Усі файли</translation> -<translation id="7487278341251176613"><ph name="NUMBER_TWO"/> minutes left</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> день тому</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> сек.</translation> -<translation id="7814458197256864873">&Копіювати</translation> -<translation id="3889424535448813030">Курсор праворуч</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> сек. тому</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> сек. залишилось</translation> -<translation id="6829324100069873704">Повернутися до сповіщень</translation> -<translation id="6528179044667508675">Не турбувати</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> с</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> mins</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Дозволити сповіщення з перелічених нижче джерел.</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> годин</translation> -<translation id="1398853756734560583">Збільшити</translation> -<translation id="4250229828105606438">Знімок екрана</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> hours</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> mins left</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> Гб</translation> -<translation id="1901303067676059328">Вибрати &всі</translation> -<translation id="2168039046890040389">Сторінка вгору</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> днів</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> mins</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> хвилина</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">Сповіщень немає.</translation> -<translation id="2482878487686419369">Сповіщення</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Прокрутка до цього місця</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> годин</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> Кб/сек.</translation> -<translation id="8394908167088220973">Відтворити чи призупинити</translation> -<translation id="2148716181193084225">Сьогодні</translation> -<translation id="7960078400008666149">Не турбувати впродовж однієї години</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> хв. тому</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> days</translation> -<translation id="2190355936436201913">(пусто)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> годин залишилось</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> сек. залишилась</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">Прокрутка вправо</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> година залишилась</translation> -<translation id="1413622004203049571">Вимкнути сповіщення від <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Верх</translation> -<translation id="8331626408530291785">Прокрутка вгору</translation> -<translation id="7907591526440419938">Відкрити файл</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> год. тому</translation> -<translation id="815598010540052116">Прокрутка вниз</translation> -<translation id="6808150112686056157">Зупинити</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Відновити</translation> -<translation id="1243314992276662751">Завантажити</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> день залишився</translation> -<translation id="8179976553408161302">Увійти</translation> -<translation id="945522503751344254">Надіслати відгук</translation> -<translation id="9170848237812810038">&Скасувати</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> год. тому</translation> -<translation id="6918245111648057970">Дозволити сповіщення для кожного користувача:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> секунда</translation> -<translation id="3994835489895548312"><ph name="NUMBER_MANY"/> minutes left</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> Пб</translation> -<translation id="2983818520079887040">Налаштування...</translation> -<translation id="6845383723252244143">Вибір папки</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> секунди</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> сек.</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> днів</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> година</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> хв. тому</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> Гб/сек.</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> день</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> сек. тому</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> secs left</translation> -<translation id="4570886800634958009">Розгорнути сповіщення</translation> -<translation id="436869212180315161">Натиснути</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> сек. тому</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> Тб/сек.</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> minutes</translation> -<translation id="1858722859751911017">Залишилося <ph name="NUMBER_FEW"/> хвилини</translation> -<translation id="6040143037577758943">Закрити</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> б/сек.</translation> -<translation id="7649070708921625228">Довідка</translation> -<translation id="6699343763173986273">Наступна композиція</translation> -<translation id="8226233771743600312">Не турбувати впродовж одного дня</translation> -<translation id="7457942297256758195">Очистити все</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> хв.</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> днів залишилось</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> хвилини</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> hours left</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> сек.</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> secs</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> seconds</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> днів залишилось</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> Пб/сек.</translation> -<translation id="2743387203779672305">Копіювати в буфер</translation> -<translation id="8371695176452482769">Диктуйте</translation> -<translation id="6965382102122355670">ОК</translation> -<translation id="7850320739366109486">Не турбувати</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Зменшити</translation> -<translation id="6394627529324717982">Кома</translation> -<translation id="3036649622769666520">Відкрити файли</translation> -<translation id="8328145009876646418">Лівий край</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> seconds</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_vi.xtb b/chromium/ui/base/strings/ui_strings_vi.xtb deleted file mode 100644 index 53474a9d342..00000000000 --- a/chromium/ui/base/strings/ui_strings_vi.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="vi"> -<translation id="4820616160060340806">Command+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> hours ago</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> giây còn lại</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> giây còn lại</translation> -<translation id="1209866192426315618"><ph name="NUMBER_DEFAULT"/> phút còn lại</translation> -<translation id="1801827354178857021">Dấu chấm</translation> -<translation id="1190609913194133056">Trung tâm thông báo</translation> -<translation id="7470933019269157899">Còn lại <ph name="NUMBER_DEFAULT"/> phút</translation> -<translation id="5613020302032141669">Mũi tên Trái</translation> -<translation id="4971687151119236543">Bản nhạc trước của trình phát phương tiện</translation> -<translation id="8602707065186045623">Tệp <ph name="SAVEAS_EXTENSION_TYPE"/> (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> giây</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> giờ còn lại</translation> -<translation id="8717309436826820190"><ph name="NUMBER_OF_NOTIFICATIONS"/> thông báo khác từ <ph name="SOURCE_OF_NOTIFICATIONS"/></translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">Hủy</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">Phím mũi tên Lên</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/giây</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> giờ</translation> -<translation id="3990502903496589789">Cạnh bên Phải</translation> -<translation id="9038489124413477075">Thư mục không có tên</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> phút</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> ngày còn lại</translation> -<translation id="932327136139879170">Trang chủ</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> phút còn lại</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> ngày còn lại</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> giây còn lại</translation> -<translation id="3909791450649380159">Cắ&t</translation> -<translation id="2560788951337264832">Còn lại <ph name="NUMBER_ZERO"/> phút</translation> -<translation id="688711909580084195">Trang web không có tiêu đề</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> days ago</translation> -<translation id="5076340679995252485">&Dán</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">Chọn thư mục để tải lên</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> mins ago</translation> -<translation id="3234408098842461169">Phím mũi tên Xuống</translation> -<translation id="3087734570205094154">Bên dưới</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> phút còn lại</translation> -<translation id="1860796786778352021">Đóng thông báo</translation> -<translation id="6364916375976753737">Cuộn qua Trái</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> hour ago</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> phút</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> phút trước</translation> -<translation id="6945221475159498467">Chọn</translation> -<translation id="6620110761915583480">Lưu Tệp</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> giây</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">Còn lại <ph name="NUMBER_ONE"/> phút</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> phút</translation> -<translation id="8210608804940886430">Trang Dưới</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> ngày</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> giờ còn lại</translation> -<translation id="5329858601952122676">&Xoá</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> giây</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> phút</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> secs ago</translation> -<translation id="7781829728241885113">Hôm qua</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> phút</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> phút còn lại</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> ngày trước</translation> -<translation id="8428213095426709021">Cài đặt</translation> -<translation id="2497284189126895209">Tất cả Tệp tin</translation> -<translation id="7487278341251176613">Còn lại <ph name="NUMBER_TWO"/> phút</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> day ago</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> giây</translation> -<translation id="7814458197256864873">Sao &chép</translation> -<translation id="3889424535448813030">Phím mũi tên Phải</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> sec ago</translation> -<translation id="2544782972264605588"><ph name="NUMBER_DEFAULT"/> giây còn lại</translation> -<translation id="6829324100069873704">Quay lại thông báo</translation> -<translation id="6528179044667508675">Không làm phiền</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> giây</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> phút</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">Cho phép thông báo từ:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> giờ</translation> -<translation id="1398853756734560583">Phóng to</translation> -<translation id="4250229828105606438">Ảnh chụp màn hình</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> giờ</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> phút còn lại</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">Chọn &tất cả</translation> -<translation id="2168039046890040389">Page Up</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> ngày</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> phút</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> phút</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> secs ago</translation> -<translation id="4927753642311223124">Không có nội dung nào để xem ở đây, hãy tiếp tục.</translation> -<translation id="2482878487686419369">Thông báo</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">Cuộn tới Đây</translation> -<translation id="4552416320897244156">Trang Dưới</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> giờ</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">Phát/Tạm dừng trình phát phương tiện</translation> -<translation id="2148716181193084225">Hôm nay</translation> -<translation id="7960078400008666149">Không làm phiền trong một giờ</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> mins ago</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> ngày</translation> -<translation id="2190355936436201913">(trống)</translation> -<translation id="1164369517022005061"><ph name="NUMBER_DEFAULT"/> giờ còn lại</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> giây còn lại</translation> -<translation id="8447116497070723931">Trang Trên</translation> -<translation id="4588090240171750605">Cuộn qua Phải</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> giờ còn lại</translation> -<translation id="1413622004203049571">Tắt thông báo từ <ph name="NOTIFIER_NAME"/></translation> -<translation id="2666092431469916601">Hàng đầu</translation> -<translation id="8331626408530291785">Cuộn Lên</translation> -<translation id="7907591526440419938">Mở Tệp</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Thoát</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> giờ trước</translation> -<translation id="815598010540052116">Cuộn Xuống</translation> -<translation id="6808150112686056157">Dừng trình phát phương tiện</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">Khôi phục</translation> -<translation id="1243314992276662751">Tải lên</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> ngày còn lại</translation> -<translation id="8179976553408161302">Vào</translation> -<translation id="945522503751344254">Gửi phản hồi</translation> -<translation id="9170848237812810038">H&oàn tác</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> hours ago</translation> -<translation id="6918245111648057970">Cho phép thông báo từ mục sau đối với mỗi người dùng:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> giây</translation> -<translation id="3994835489895548312">Còn lại <ph name="NUMBER_MANY"/> phút</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> secs ago</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">Cài đặt...</translation> -<translation id="6845383723252244143">Chọn Thư mục</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> giây</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> giây</translation> -<translation id="5583640892426849032">Backspace</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> days ago</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> ngày</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> giờ</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> min ago</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/giây</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> ngày</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> giây trước</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> giây còn lại</translation> -<translation id="4570886800634958009">Mở rộng thông báo</translation> -<translation id="436869212180315161">Nhấp vào</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> secs ago</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/giây</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> phút</translation> -<translation id="1858722859751911017">Còn lại <ph name="NUMBER_FEW"/> phút</translation> -<translation id="6040143037577758943">Đóng</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> mins ago</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/giây</translation> -<translation id="7649070708921625228">Trợ giúp</translation> -<translation id="6699343763173986273">Bản nhạc tiếp theo của trình phát phương tiện</translation> -<translation id="8226233771743600312">Không làm phiền trong một ngày</translation> -<translation id="7457942297256758195">Xóa tất cả</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> days ago</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> phút</translation> -<translation id="1963692530539281474"><ph name="NUMBER_DEFAULT"/> ngày còn lại</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> phút</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> giờ còn lại</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> hours ago</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> giây</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> giây</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> giây</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> ngày còn lại</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/giây</translation> -<translation id="2743387203779672305">Sao chép vào khay nhớ tạm</translation> -<translation id="8371695176452482769">Nói ngay bây giờ</translation> -<translation id="6965382102122355670">OK</translation> -<translation id="7850320739366109486">Không làm phiền</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">Thu nhỏ</translation> -<translation id="6394627529324717982">Dấu phẩy</translation> -<translation id="3036649622769666520">Mở Tệp</translation> -<translation id="8328145009876646418">Cạnh Bên trái</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> giây</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_zh-CN.xtb b/chromium/ui/base/strings/ui_strings_zh-CN.xtb deleted file mode 100644 index 0046e94645b..00000000000 --- a/chromium/ui/base/strings/ui_strings_zh-CN.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="zh-CN"> -<translation id="4820616160060340806">命令键 + <ph name="KEY_COMBO_NAME"/></translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">End</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> 小时前</translation> -<translation id="6310545596129886942"><ph name="NUMBER_FEW"/> secs left</translation> -<translation id="9213479837033539041"><ph name="NUMBER_MANY"/> secs left</translation> -<translation id="1209866192426315618">还有 <ph name="NUMBER_DEFAULT"/> 分钟</translation> -<translation id="1801827354178857021">句号</translation> -<translation id="1190609913194133056">通知中心</translation> -<translation id="7470933019269157899">还剩 <ph name="NUMBER_DEFAULT"/> 分钟</translation> -<translation id="5613020302032141669">向左箭头</translation> -<translation id="4971687151119236543">媒体上一曲</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> 文件 (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> secs</translation> -<translation id="7511635910912978956"><ph name="NUMBER_FEW"/> hours left</translation> -<translation id="8717309436826820190">另外还有<ph name="NUMBER_OF_NOTIFICATIONS"/>条<ph name="SOURCE_OF_NOTIFICATIONS"/>通知</translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">取消</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">向上箭头</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/s</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> 小时</translation> -<translation id="3990502903496589789">右边缘</translation> -<translation id="9038489124413477075">未命名的文件夹</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> 分钟</translation> -<translation id="3520476450377425184"><ph name="NUMBER_MANY"/> days left</translation> -<translation id="932327136139879170">主页</translation> -<translation id="5600907569873192868"><ph name="NUMBER_MANY"/> mins left</translation> -<translation id="8666066831007952346"><ph name="NUMBER_TWO"/> days left</translation> -<translation id="6390842777729054533"><ph name="NUMBER_ZERO"/> secs left</translation> -<translation id="3909791450649380159">剪切(&T)</translation> -<translation id="2560788951337264832">还剩 <ph name="NUMBER_ZERO"/> 分钟</translation> -<translation id="688711909580084195">无标题网页</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> 天前</translation> -<translation id="5076340679995252485">粘贴(&P)</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">选择要上传的文件夹</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> 分钟前</translation> -<translation id="3234408098842461169">向下箭头</translation> -<translation id="3087734570205094154">底部</translation> -<translation id="5935630983280450497"><ph name="NUMBER_ONE"/> min left</translation> -<translation id="1860796786778352021">关闭通知</translation> -<translation id="6364916375976753737">向左滚动</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> 小时前</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> 分钟</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> 分钟前</translation> -<translation id="6945221475159498467">选择</translation> -<translation id="6620110761915583480">保存文件</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> 秒</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">还剩 <ph name="NUMBER_ONE"/> 分钟</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> min</translation> -<translation id="8210608804940886430">向下翻页</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> days</translation> -<translation id="7163503212501929773"><ph name="NUMBER_MANY"/> hours left</translation> -<translation id="5329858601952122676">删除(&D)</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> secs</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> 分钟</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> 秒前</translation> -<translation id="7781829728241885113">昨天</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> 分钟</translation> -<translation id="50960180632766478"><ph name="NUMBER_FEW"/> mins left</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> 天前</translation> -<translation id="8428213095426709021">设置</translation> -<translation id="2497284189126895209">所有文件</translation> -<translation id="7487278341251176613">还剩 <ph name="NUMBER_TWO"/> 分钟</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> 天前</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> sec</translation> -<translation id="7814458197256864873">复制(&C)</translation> -<translation id="3889424535448813030">向右箭头</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> 秒前</translation> -<translation id="2544782972264605588">还有 <ph name="NUMBER_DEFAULT"/> 秒</translation> -<translation id="6829324100069873704">返回通知</translation> -<translation id="6528179044667508675">请勿打扰</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> 秒</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> mins</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">允许以下来源的通知:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> hours</translation> -<translation id="1398853756734560583">最大化</translation> -<translation id="4250229828105606438">屏幕截图</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> hours</translation> -<translation id="5260878308685146029"><ph name="NUMBER_TWO"/> mins left</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">全选(&A)</translation> -<translation id="2168039046890040389">向上翻页</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> 天</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> mins</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> 分钟</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> 秒前</translation> -<translation id="4927753642311223124">这里没有任何通知,往前走吧。</translation> -<translation id="2482878487686419369">通知</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">滚动到此处</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> hours</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/s</translation> -<translation id="8394908167088220973">媒体播放/暂停</translation> -<translation id="2148716181193084225">今天</translation> -<translation id="7960078400008666149">1 小时内请勿打扰</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> 分钟前</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> days</translation> -<translation id="2190355936436201913">(空)</translation> -<translation id="1164369517022005061">还有 <ph name="NUMBER_DEFAULT"/> 小时</translation> -<translation id="152482086482215392"><ph name="NUMBER_ONE"/> sec left</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">向右滚动</translation> -<translation id="7414887922320653780"><ph name="NUMBER_ONE"/> hour left</translation> -<translation id="1413622004203049571">停用来自“<ph name="NOTIFIER_NAME"/>”的通知</translation> -<translation id="2666092431469916601">顶部</translation> -<translation id="8331626408530291785">向上滚动</translation> -<translation id="7907591526440419938">打开文件</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> 小时前</translation> -<translation id="815598010540052116">向下滚动</translation> -<translation id="6808150112686056157">媒体停止</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">恢复</translation> -<translation id="1243314992276662751">上传</translation> -<translation id="50030952220075532"><ph name="NUMBER_ONE"/> day left</translation> -<translation id="8179976553408161302">进入</translation> -<translation id="945522503751344254">发送反馈</translation> -<translation id="9170848237812810038">撤消(&U)</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> 小时前</translation> -<translation id="6918245111648057970">对于每位用户,允许接收下列源发出的通知:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> 秒</translation> -<translation id="3994835489895548312">还剩 <ph name="NUMBER_MANY"/> 分钟</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> 秒前</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">设置...</translation> -<translation id="6845383723252244143">选择文件夹</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> 秒</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> secs</translation> -<translation id="5583640892426849032">退格</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> 天前</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> days</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> hour</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> 分钟前</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/s</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> day</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> 秒前</translation> -<translation id="494645311413743213"><ph name="NUMBER_TWO"/> secs left</translation> -<translation id="4570886800634958009">展开通知</translation> -<translation id="436869212180315161">按</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> 秒前</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/s</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> 分钟</translation> -<translation id="1858722859751911017">还剩 <ph name="NUMBER_FEW"/> 分钟</translation> -<translation id="6040143037577758943">关闭</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> 分钟前</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/s</translation> -<translation id="7649070708921625228">帮助</translation> -<translation id="6699343763173986273">媒体下一曲</translation> -<translation id="8226233771743600312">1 天内请勿打扰</translation> -<translation id="7457942297256758195">全部清除</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> 天前</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> mins</translation> -<translation id="1963692530539281474">还有 <ph name="NUMBER_DEFAULT"/> 天</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> 分钟</translation> -<translation id="5906719743126878045"><ph name="NUMBER_TWO"/> hours left</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> 小时前</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> secs</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> secs</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> 秒</translation> -<translation id="3759876923365568382"><ph name="NUMBER_FEW"/> days left</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/s</translation> -<translation id="2743387203779672305">复制到剪贴板</translation> -<translation id="8371695176452482769">请开始说话</translation> -<translation id="6965382102122355670">确定</translation> -<translation id="7850320739366109486">请勿打扰</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">最小化</translation> -<translation id="6394627529324717982">逗号</translation> -<translation id="3036649622769666520">打开文件</translation> -<translation id="8328145009876646418">左边缘</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> 秒</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/strings/ui_strings_zh-TW.xtb b/chromium/ui/base/strings/ui_strings_zh-TW.xtb deleted file mode 100644 index 8ff676ec383..00000000000 --- a/chromium/ui/base/strings/ui_strings_zh-TW.xtb +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE translationbundle> -<translationbundle lang="zh-TW"> -<translation id="4820616160060340806">Command + <ph name="KEY_COMBO_NAME"/> 鍵</translation> -<translation id="1871244248791675517">Ins</translation> -<translation id="6135826906199951471">Del</translation> -<translation id="528468243742722775">結束</translation> -<translation id="5341849548509163798"><ph name="NUMBER_MANY"/> 小時前</translation> -<translation id="6310545596129886942">剩下 <ph name="NUMBER_FEW"/> 秒</translation> -<translation id="9213479837033539041">剩下 <ph name="NUMBER_MANY"/> 秒</translation> -<translation id="1209866192426315618">剩下 <ph name="NUMBER_DEFAULT"/> 分鐘</translation> -<translation id="1801827354178857021">句號</translation> -<translation id="1190609913194133056">通知中心</translation> -<translation id="7470933019269157899">剩下 <ph name="NUMBER_DEFAULT"/> 分鐘</translation> -<translation id="5613020302032141669">向左鍵</translation> -<translation id="4971687151119236543">上一首媒體曲目</translation> -<translation id="8602707065186045623"><ph name="SAVEAS_EXTENSION_TYPE"/> 檔案 (.<ph name="SAVEAS_EXTENSION_NAME"/>)</translation> -<translation id="542155483965056918"><ph name="NUMBER_ZERO"/> mins ago</translation> -<translation id="7121570032414343252"><ph name="NUMBER_TWO"/> 秒</translation> -<translation id="7511635910912978956">剩下 <ph name="NUMBER_FEW"/> 小時</translation> -<translation id="8717309436826820190">還有 <ph name="NUMBER_OF_NOTIFICATIONS"/> 個來自 <ph name="SOURCE_OF_NOTIFICATIONS"/> 的通知</translation> -<translation id="5948410903763073882">Alt+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7658239707568436148">取消</translation> -<translation id="7222373446505536781">F11</translation> -<translation id="1761785978543082658"><ph name="QUANTITY"/> B</translation> -<translation id="3660179305079774227">向上鍵</translation> -<translation id="1809410197924942083"><ph name="QUANTITY"/> MB/秒</translation> -<translation id="5608669887400696928"><ph name="NUMBER_DEFAULT"/> 小時</translation> -<translation id="3990502903496589789">右邊緣</translation> -<translation id="9038489124413477075">未命名的資料夾</translation> -<translation id="8507996248087185956"><ph name="NUMBER_DEFAULT"/> 分鐘</translation> -<translation id="3520476450377425184">剩下 <ph name="NUMBER_MANY"/> 天</translation> -<translation id="932327136139879170">首頁</translation> -<translation id="5600907569873192868">剩下 <ph name="NUMBER_MANY"/> 分鐘</translation> -<translation id="8666066831007952346">剩下 <ph name="NUMBER_TWO"/> 天</translation> -<translation id="6390842777729054533">剩下 <ph name="NUMBER_ZERO"/> 秒</translation> -<translation id="3909791450649380159">剪下(&T)</translation> -<translation id="2560788951337264832">剩下 <ph name="NUMBER_ZERO"/> 分鐘</translation> -<translation id="688711909580084195">無標題網頁</translation> -<translation id="3353284378027041011"><ph name="NUMBER_FEW"/> 天前</translation> -<translation id="5076340679995252485">貼上(&P)</translation> -<translation id="7460907917090416791"><ph name="QUANTITY"/> TB</translation> -<translation id="364720409959344976">選取要上傳的資料夾</translation> -<translation id="4999762576397546063">Ctrl+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="7770995925463083016"><ph name="NUMBER_TWO"/> 分鐘前</translation> -<translation id="3234408098842461169">向下鍵</translation> -<translation id="3087734570205094154">置底</translation> -<translation id="5935630983280450497">剩下 <ph name="NUMBER_ONE"/> 分鐘</translation> -<translation id="1860796786778352021">通知關閉</translation> -<translation id="6364916375976753737">向左捲動</translation> -<translation id="2629089419211541119"><ph name="NUMBER_ONE"/> 小時前</translation> -<translation id="2994641463185352298"><ph name="NUMBER_DEFAULT"/> 分鐘</translation> -<translation id="6982279413068714821"><ph name="NUMBER_DEFAULT"/> 分鐘前</translation> -<translation id="6945221475159498467">選取</translation> -<translation id="6620110761915583480">儲存檔案</translation> -<translation id="4349181486102621992"><ph name="NUMBER_ZERO"/> 秒</translation> -<translation id="6719684875142564568"><ph name="NUMBER_ZERO"/> hours</translation> -<translation id="7836361698254323868">剩下 <ph name="NUMBER_ONE"/> 分鐘</translation> -<translation id="2953767478223974804"><ph name="NUMBER_ONE"/> 分鐘</translation> -<translation id="8210608804940886430">向下翻頁</translation> -<translation id="1572103024875503863"><ph name="NUMBER_MANY"/> 天</translation> -<translation id="7163503212501929773">剩下 <ph name="NUMBER_MANY"/> 小時</translation> -<translation id="5329858601952122676">刪除(&D)</translation> -<translation id="8088823334188264070"><ph name="NUMBER_MANY"/> 秒</translation> -<translation id="8901569739625249689"><ph name="QUANTITY"/> KB</translation> -<translation id="7712011264267466734"><ph name="NUMBER_MANY"/> 分鐘</translation> -<translation id="7275974018215686543"><ph name="NUMBER_MANY"/> 秒前</translation> -<translation id="7781829728241885113">昨天</translation> -<translation id="3424538384153559412"><ph name="NUMBER_TWO"/> 分鐘</translation> -<translation id="50960180632766478">剩下 <ph name="NUMBER_FEW"/> 分鐘</translation> -<translation id="6659594942844771486">Tab</translation> -<translation id="3049748772180311791"><ph name="QUANTITY"/> MB</translation> -<translation id="4988273303304146523"><ph name="NUMBER_DEFAULT"/> 天前</translation> -<translation id="8428213095426709021">設定</translation> -<translation id="2497284189126895209">所有檔案</translation> -<translation id="7487278341251176613">剩下 <ph name="NUMBER_TWO"/> 分鐘</translation> -<translation id="5110450810124758964"><ph name="NUMBER_ONE"/> 天前</translation> -<translation id="2820806154655529776"><ph name="NUMBER_ONE"/> 秒</translation> -<translation id="7814458197256864873">複製(&C)</translation> -<translation id="3889424535448813030">向右鍵</translation> -<translation id="4229495110203539533"><ph name="NUMBER_ONE"/> 秒前</translation> -<translation id="2544782972264605588">剩下 <ph name="NUMBER_DEFAULT"/> 秒</translation> -<translation id="6829324100069873704">返回通知</translation> -<translation id="6528179044667508675">請勿打擾</translation> -<translation id="5066177358602611309"><ph name="NUMBER_DEFAULT"/> 秒</translation> -<translation id="290555789621781773"><ph name="NUMBER_TWO"/> 分鐘</translation> -<translation id="5149131957118398098"><ph name="NUMBER_ZERO"/> hours left</translation> -<translation id="7135556860107312402">允許接收下列來源發出的通知:</translation> -<translation id="8112886015144590373"><ph name="NUMBER_FEW"/> 小時</translation> -<translation id="1398853756734560583">放到最大</translation> -<translation id="4250229828105606438">螢幕擷取畫面</translation> -<translation id="6690744523875189208"><ph name="NUMBER_TWO"/> 小時</translation> -<translation id="5260878308685146029">剩下 <ph name="NUMBER_TWO"/> 分鐘</translation> -<translation id="3757388668994797779"><ph name="QUANTITY"/> GB</translation> -<translation id="1901303067676059328">選取全部(&A)</translation> -<translation id="2168039046890040389">向上翻頁</translation> -<translation id="7363290921156020669"><ph name="NUMBER_ZERO"/> mins</translation> -<translation id="9107059250669762581"><ph name="NUMBER_DEFAULT"/> 天</translation> -<translation id="6463061331681402734"><ph name="NUMBER_MANY"/> 分鐘</translation> -<translation id="7634624804467787019"><ph name="NUMBER_ONE"/> 分鐘</translation> -<translation id="8448317557906454022"><ph name="NUMBER_ZERO"/> 秒前</translation> -<translation id="4927753642311223124">這裡沒有任何通知訊息,以後再來看看吧!</translation> -<translation id="2482878487686419369">通知</translation> -<translation id="6357135709975569075"><ph name="NUMBER_ZERO"/> days</translation> -<translation id="3183922693828471536">捲動至此</translation> -<translation id="4552416320897244156">PgDwn</translation> -<translation id="7052633198403197513">F1 鍵</translation> -<translation id="2052389551707911401"><ph name="NUMBER_MANY"/> 小時</translation> -<translation id="8677655579646609597"><ph name="QUANTITY"/> KB/秒</translation> -<translation id="8394908167088220973">媒體播放/暫停</translation> -<translation id="2148716181193084225">今天</translation> -<translation id="7960078400008666149">1 小時內請勿打擾</translation> -<translation id="4373894838514502496"><ph name="NUMBER_FEW"/> 分鐘前</translation> -<translation id="4115153316875436289"><ph name="NUMBER_TWO"/> 天</translation> -<translation id="2190355936436201913">(空白)</translation> -<translation id="1164369517022005061">剩下 <ph name="NUMBER_DEFAULT"/> 小時</translation> -<translation id="152482086482215392">剩下 <ph name="NUMBER_ONE"/> 秒</translation> -<translation id="8447116497070723931">PgUp</translation> -<translation id="4588090240171750605">向右捲動</translation> -<translation id="7414887922320653780">剩下 <ph name="NUMBER_ONE"/> 小時</translation> -<translation id="1413622004203049571">停用「<ph name="NOTIFIER_NAME"/>」的通知</translation> -<translation id="2666092431469916601">置頂</translation> -<translation id="8331626408530291785">向上捲動</translation> -<translation id="7907591526440419938">開啟檔案</translation> -<translation id="2864069933652346933"><ph name="NUMBER_ZERO"/> days left</translation> -<translation id="1293699935367580298">Esc</translation> -<translation id="2797524280730715045"><ph name="NUMBER_DEFAULT"/> 小時前</translation> -<translation id="815598010540052116">向下捲動</translation> -<translation id="6808150112686056157">停止媒體播放</translation> -<translation id="1308727876662951186"><ph name="NUMBER_ZERO"/> mins left</translation> -<translation id="3157931365184549694">還原</translation> -<translation id="1243314992276662751">上傳</translation> -<translation id="50030952220075532">剩下 <ph name="NUMBER_ONE"/> 天</translation> -<translation id="8179976553408161302">進入</translation> -<translation id="945522503751344254">提供意見</translation> -<translation id="9170848237812810038">取消(&U)</translation> -<translation id="1285266685456062655"><ph name="NUMBER_FEW"/> 小時前</translation> -<translation id="6918245111648057970">允許接收下列使用者發出的通知:</translation> -<translation id="5489830104927132166"><ph name="NUMBER_ONE"/> 秒</translation> -<translation id="3994835489895548312">剩下 <ph name="NUMBER_MANY"/> 分鐘</translation> -<translation id="6358975074282722691"><ph name="NUMBER_TWO"/> 秒前</translation> -<translation id="520299402983819650"><ph name="QUANTITY"/> PB</translation> -<translation id="2983818520079887040">設定...</translation> -<translation id="6845383723252244143">選取資料夾</translation> -<translation id="7600770490873519066"><ph name="NUMBER_FEW"/> 秒</translation> -<translation id="1095623615273566396"><ph name="NUMBER_FEW"/> 秒</translation> -<translation id="5583640892426849032">Backspace 鍵</translation> -<translation id="5263972071113911534"><ph name="NUMBER_MANY"/> 天前</translation> -<translation id="8355915647418390920"><ph name="NUMBER_FEW"/> 天</translation> -<translation id="5116333507878097773"><ph name="NUMBER_ONE"/> 小時</translation> -<translation id="2679312662830811292"><ph name="NUMBER_ONE"/> 分鐘前</translation> -<translation id="8788572795284305350"><ph name="NUMBER_ZERO"/> hours ago</translation> -<translation id="3740362395218339114"><ph name="QUANTITY"/> GB/秒</translation> -<translation id="6644971472240498405"><ph name="NUMBER_ONE"/> 天</translation> -<translation id="9098468523912235228"><ph name="NUMBER_DEFAULT"/> 秒前</translation> -<translation id="494645311413743213">剩下 <ph name="NUMBER_TWO"/> 秒</translation> -<translation id="4570886800634958009">通知展開</translation> -<translation id="436869212180315161">按下</translation> -<translation id="4860787810836767172"><ph name="NUMBER_FEW"/> 秒前</translation> -<translation id="2297836609126180313"><ph name="QUANTITY"/> TB/秒</translation> -<translation id="6956540737482608074"><ph name="NUMBER_ZERO"/> 分鐘</translation> -<translation id="1858722859751911017">剩下 <ph name="NUMBER_FEW"/> 分鐘</translation> -<translation id="6040143037577758943">關閉</translation> -<translation id="1101671447232096497"><ph name="NUMBER_MANY"/> 分鐘前</translation> -<translation id="6142413573757616983"><ph name="QUANTITY"/> B/秒</translation> -<translation id="7649070708921625228">說明</translation> -<translation id="6699343763173986273">下一首媒體曲目</translation> -<translation id="8226233771743600312">1 天內請勿打擾</translation> -<translation id="7457942297256758195">全部清除</translation> -<translation id="822618367988303761"><ph name="NUMBER_TWO"/> 天前</translation> -<translation id="4745438305783437565"><ph name="NUMBER_FEW"/> 分鐘</translation> -<translation id="1963692530539281474">剩下 <ph name="NUMBER_DEFAULT"/> 天</translation> -<translation id="7509440305564869263"><ph name="NUMBER_FEW"/> 分鐘</translation> -<translation id="5906719743126878045">剩下 <ph name="NUMBER_TWO"/> 小時</translation> -<translation id="8959208747503200525"><ph name="NUMBER_TWO"/> 小時前</translation> -<translation id="8400147561352026160">Shift+<ph name="KEY_COMBO_NAME"/></translation> -<translation id="8421864404045570940"><ph name="NUMBER_DEFAULT"/> 秒</translation> -<translation id="4197700912384709145"><ph name="NUMBER_ZERO"/> 秒</translation> -<translation id="27199337101878275"><ph name="NUMBER_MANY"/> 秒</translation> -<translation id="3759876923365568382">剩下 <ph name="NUMBER_FEW"/> 天</translation> -<translation id="6907759265145635167"><ph name="QUANTITY"/> PB/秒</translation> -<translation id="2743387203779672305">複製到剪貼簿</translation> -<translation id="8371695176452482769">請說話</translation> -<translation id="6965382102122355670">確定</translation> -<translation id="7850320739366109486">請勿打擾</translation> -<translation id="6978839998405419496"><ph name="NUMBER_ZERO"/> days ago</translation> -<translation id="5941711191222866238">縮到最小</translation> -<translation id="6394627529324717982">逗號</translation> -<translation id="3036649622769666520">開啟檔案</translation> -<translation id="8328145009876646418">左邊緣</translation> -<translation id="7372005818821648611"><ph name="NUMBER_TWO"/> 秒</translation> -</translationbundle>
\ No newline at end of file diff --git a/chromium/ui/base/text/bytes_formatting.h b/chromium/ui/base/text/bytes_formatting.h index 0e818183385..46de51c7549 100644 --- a/chromium/ui/base/text/bytes_formatting.h +++ b/chromium/ui/base/text/bytes_formatting.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" #include "base/strings/string16.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { @@ -16,12 +16,12 @@ namespace ui { // Simple call to return a byte quantity as a string in human-readable format. // Ex: FormatBytes(512) => "512 B" // Ex: FormatBytes(101479) => "99.1 kB" -UI_EXPORT base::string16 FormatBytes(int64 bytes); +UI_BASE_EXPORT base::string16 FormatBytes(int64 bytes); // Simple call to return a speed as a string in human-readable format. // Ex: FormatSpeed(512) => "512 B/s" // Ex: FormatSpeed(101479) => "99.1 kB/s" -UI_EXPORT base::string16 FormatSpeed(int64 bytes); +UI_BASE_EXPORT base::string16 FormatSpeed(int64 bytes); // Less-Simple API ------------------------------------------------------------- @@ -37,15 +37,15 @@ enum DataUnits { // Return the unit type that is appropriate for displaying the amount of bytes // passed in. Most of the time, an explicit call to this isn't necessary; just // use FormatBytes()/FormatSpeed() above. -UI_EXPORT DataUnits GetByteDisplayUnits(int64 bytes); +UI_BASE_EXPORT DataUnits GetByteDisplayUnits(int64 bytes); // Return a byte quantity as a string in human-readable format with an optional // unit suffix. Specify in the |units| argument the units to be used. // Ex: FormatBytes(512, DATA_UNITS_KIBIBYTE, true) => "0.5 kB" // Ex: FormatBytes(10*1024, DATA_UNITS_MEBIBYTE, false) => "0.1" -UI_EXPORT base::string16 FormatBytesWithUnits(int64 bytes, - DataUnits units, - bool show_units); +UI_BASE_EXPORT base::string16 FormatBytesWithUnits(int64 bytes, + DataUnits units, + bool show_units); // As above, but with "/s" units for speed values. // Ex: FormatSpeed(512, DATA_UNITS_KIBIBYTE, true) => "0.5 kB/s" diff --git a/chromium/ui/base/text/bytes_formatting_unittest.cc b/chromium/ui/base/text/bytes_formatting_unittest.cc index 357abc756a5..b2a03f97e9a 100644 --- a/chromium/ui/base/text/bytes_formatting_unittest.cc +++ b/chromium/ui/base/text/bytes_formatting_unittest.cc @@ -69,9 +69,9 @@ TEST(BytesFormattingTest, FormatBytes) { }; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) { - EXPECT_EQ(ASCIIToUTF16(cases[i].expected), + EXPECT_EQ(base::ASCIIToUTF16(cases[i].expected), FormatBytesWithUnits(cases[i].bytes, cases[i].units, false)); - EXPECT_EQ(ASCIIToUTF16(cases[i].expected_with_units), + EXPECT_EQ(base::ASCIIToUTF16(cases[i].expected_with_units), FormatBytesWithUnits(cases[i].bytes, cases[i].units, true)); } } diff --git a/chromium/ui/base/theme_provider.h b/chromium/ui/base/theme_provider.h index d12e2656235..defdf145370 100644 --- a/chromium/ui/base/theme_provider.h +++ b/chromium/ui/base/theme_provider.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/base/layout.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #if defined(OS_MACOSX) #ifdef __OBJC__ @@ -20,9 +20,6 @@ class NSColor; class NSGradient; class NSImage; #endif // __OBJC__ -#elif !defined(OS_WIN) -typedef struct _GdkColor GdkColor; -typedef struct _GdkPixbuf GdkPixbuf; #endif // OS_* class SkBitmap; @@ -46,10 +43,14 @@ namespace ui { // //////////////////////////////////////////////////////////////////////////////// -class UI_EXPORT ThemeProvider { +class UI_BASE_EXPORT ThemeProvider { public: virtual ~ThemeProvider(); + // Whether we're using the system theme (which may or may not be the + // same as the default theme). + virtual bool UsingSystemTheme() const = 0; + // Get the image specified by |id|. An implementation of ThemeProvider should // have its own source of ids (e.g. an enum, or external resource bundle). virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const = 0; @@ -92,18 +93,6 @@ class UI_EXPORT ThemeProvider { // Gets the NSGradient with the specified |id|. virtual NSGradient* GetNSGradient(int id) const = 0; -#elif defined(OS_POSIX) && !defined(TOOLKIT_VIEWS) && !defined(OS_ANDROID) - // Gets the GdkPixbuf with the specified |id|. Returns a pointer to a shared - // instance of the GdkPixbuf. This shared GdkPixbuf is owned by the theme - // provider and should not be freed. - // - // The bitmap is assumed to exist. This function will log in release, and - // assert in debug mode if it does not. On failure, this will return a - // pointer to a shared empty placeholder bitmap so it will be visible what - // is missing. - - // As above, but flips it in RTL locales. - virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const = 0; #endif }; diff --git a/chromium/ui/base/touch/touch_device.h b/chromium/ui/base/touch/touch_device.h index b06c56462e6..fd75ebcc9c6 100644 --- a/chromium/ui/base/touch/touch_device.h +++ b/chromium/ui/base/touch/touch_device.h @@ -5,17 +5,17 @@ #ifndef UI_BASE_TOUCH_TOUCH_DEVICE_H_ #define UI_BASE_TOUCH_TOUCH_DEVICE_H_ -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" + +#if defined(OS_ANDROID) +#include <jni.h> +#endif -namespace ui { -// TODO(sblom): This is non-standard, and should be removed before -// RuntimeEnabledFlags::PointerEventsMaxTouchPoints is marked stable. -// Tracked by: http://crbug.com/308649 -const int kMaxTouchPointsUnknown = -1; +namespace ui { // Returns true if a touch device is available. -UI_EXPORT bool IsTouchDevicePresent(); +UI_BASE_EXPORT bool IsTouchDevicePresent(); // Returns the maximum number of simultaneous touch contacts supported // by the device. In the case of devices with multiple digitizers (e.g. @@ -24,7 +24,11 @@ UI_EXPORT bool IsTouchDevicePresent(); // For example, suppose a device has 3 touchscreens, which support 2, 5, // and 10 simultaneous touch contacts, respectively. This returns 10. // http://www.w3.org/TR/pointerevents/#widl-Navigator-maxTouchPoints -UI_EXPORT int MaxTouchPoints(); +UI_BASE_EXPORT int MaxTouchPoints(); + +#if defined(OS_ANDROID) +bool RegisterTouchDeviceAndroid(JNIEnv* env); +#endif } // namespace ui diff --git a/chromium/ui/base/touch/touch_device_android.cc b/chromium/ui/base/touch/touch_device_android.cc index 2b359c0e3dd..604306c8bb3 100644 --- a/chromium/ui/base/touch/touch_device_android.cc +++ b/chromium/ui/base/touch/touch_device_android.cc @@ -4,23 +4,23 @@ #include "ui/base/touch/touch_device.h" +#include "jni/TouchDevice_jni.h" + namespace ui { bool IsTouchDevicePresent() { return true; } -// Looks like the best we can do here is detect 1, 2+, or 5+ by -// feature detecting: -// FEATURE_TOUCHSCREEN (1), -// FEATURE_TOUCHSCREEN_MULTITOUCH (2), -// FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT (2+), or -// FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHANDS (5+) -// -// Probably start from the biggest and detect down the list until we -// find one that's supported and return its value. int MaxTouchPoints() { - return kMaxTouchPointsUnknown; + JNIEnv* env = base::android::AttachCurrentThread(); + jobject context = base::android::GetApplicationContext(); + jint max_touch_points = Java_TouchDevice_maxTouchPoints(env, context); + return static_cast<int>(max_touch_points); +} + +bool RegisterTouchDeviceAndroid(JNIEnv* env) { + return RegisterNativesImpl(env); } } // namespace ui diff --git a/chromium/ui/base/touch/touch_editing_controller.h b/chromium/ui/base/touch/touch_editing_controller.h index 2c94f0a7534..9c0298efd10 100644 --- a/chromium/ui/base/touch/touch_editing_controller.h +++ b/chromium/ui/base/touch/touch_editing_controller.h @@ -13,8 +13,11 @@ namespace ui { // An interface implemented by widget that has text that can be selected/edited // using touch. -class UI_EXPORT TouchEditable : public ui::SimpleMenuModel::Delegate { +class UI_BASE_EXPORT TouchEditable : public ui::SimpleMenuModel::Delegate { public: + // TODO(mohsen): Consider switching from local coordinates to screen + // coordinates in this interface and see if it will simplify things. + // Select everything between start and end (points are in view's local // coordinate system). |start| is the logical start and |end| is the logical // end of selection. Visually, |start| may lie after |end|. @@ -24,7 +27,8 @@ class UI_EXPORT TouchEditable : public ui::SimpleMenuModel::Delegate { virtual void MoveCaretTo(const gfx::Point& point) = 0; // Gets the end points of the current selection. The end points p1 and p2 must - // be the cursor rect for the start and end of selection: + // be the cursor rect for the start and end of selection (in local + // coordinates): // ____________________________________ // | textfield with |selected text| | // ------------------------------------ @@ -34,11 +38,11 @@ class UI_EXPORT TouchEditable : public ui::SimpleMenuModel::Delegate { // visually, p1 could be to the right of p2 in the figure above. virtual void GetSelectionEndPoints(gfx::Rect* p1, gfx::Rect* p2) = 0; - // Gets the bounds of the client view in parent's coordinates. + // Gets the bounds of the client view in its local coordinates. virtual gfx::Rect GetBounds() = 0; // Gets the NativeView hosting the client. - virtual gfx::NativeView GetNativeView() = 0; + virtual gfx::NativeView GetNativeView() const = 0; // Converts a point to/from screen coordinates from/to client view. virtual void ConvertPointToScreen(gfx::Point* point) = 0; @@ -51,13 +55,17 @@ class UI_EXPORT TouchEditable : public ui::SimpleMenuModel::Delegate { // Tells the editable to open context menu. virtual void OpenContextMenu(const gfx::Point& anchor) = 0; + // Tells the editable to end touch editing and destroy touch selection + // controller it owns. + virtual void DestroyTouchSelection() = 0; + protected: virtual ~TouchEditable() {} }; // This defines the callback interface for other code to be notified of changes // in the state of a TouchEditable. -class UI_EXPORT TouchSelectionController { +class UI_BASE_EXPORT TouchSelectionController { public: virtual ~TouchSelectionController() {} @@ -70,9 +78,13 @@ class UI_EXPORT TouchSelectionController { // Returns true if the user is currently dragging one of the handles. virtual bool IsHandleDragInProgress() = 0; + + // Hides visible handles. According to the value of |quick|, handles might + // fade out quickly or slowly. + virtual void HideHandles(bool quick) = 0; }; -class UI_EXPORT TouchSelectionControllerFactory { +class UI_BASE_EXPORT TouchSelectionControllerFactory { public: static void SetInstance(TouchSelectionControllerFactory* instance); diff --git a/chromium/ui/base/touch/touch_enabled.h b/chromium/ui/base/touch/touch_enabled.h index 4155674ddb6..88837d7856c 100644 --- a/chromium/ui/base/touch/touch_enabled.h +++ b/chromium/ui/base/touch/touch_enabled.h @@ -5,13 +5,13 @@ #ifndef UI_BASE_TOUCH_TOUCH_ENABLED_H_ #define UI_BASE_TOUCH_TOUCH_ENABLED_H_ -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { // Returns true if the touch-enabled flag is enabled, or if it is set to auto // and a touch device is present. -UI_EXPORT bool AreTouchEventsEnabled(); +UI_BASE_EXPORT bool AreTouchEventsEnabled(); } // namespace ui diff --git a/chromium/ui/base/ui_base.gyp b/chromium/ui/base/ui_base.gyp new file mode 100644 index 00000000000..e5ddcd77aea --- /dev/null +++ b/chromium/ui/base/ui_base.gyp @@ -0,0 +1,644 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'variables': { + 'chromium_code': 1, + }, + 'targets': [ + { + 'target_name': 'ui_base', + 'type': '<(component)', + 'dependencies': [ + '../../base/base.gyp:base', + '../../base/base.gyp:base_i18n', + '../../base/base.gyp:base_static', + '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + '../../net/net.gyp:net', + '../../skia/skia.gyp:skia', + '../../third_party/icu/icu.gyp:icui18n', + '../../third_party/icu/icu.gyp:icuuc', + '../../url/url.gyp:url_lib', + '../events/events.gyp:events_base', + '../events/platform/events_platform.gyp:events_platform', + '../gfx/gfx.gyp:gfx', + '../gfx/gfx.gyp:gfx_geometry', + '../resources/ui_resources.gyp:ui_resources', + '../strings/ui_strings.gyp:ui_strings', + ], + 'defines': [ + 'UI_BASE_IMPLEMENTATION', + ], + 'export_dependent_settings': [ + '../../net/net.gyp:net', + '../gfx/gfx.gyp:gfx', + ], + 'sources' : [ + 'accelerators/accelerator.cc', + 'accelerators/accelerator.h', + 'accelerators/accelerator_manager.cc', + 'accelerators/accelerator_manager.h', + 'accelerators/menu_label_accelerator_util_linux.cc', + 'accelerators/menu_label_accelerator_util_linux.h', + 'accelerators/platform_accelerator.h', + 'accelerators/platform_accelerator_cocoa.h', + 'accelerators/platform_accelerator_cocoa.mm', + 'android/ui_base_jni_registrar.cc', + 'android/ui_base_jni_registrar.h', + 'android/view_android.cc', + 'android/view_android.h', + 'android/window_android.cc', + 'android/window_android.h', + 'android/window_android_compositor.h', + 'android/window_android_observer.h', + 'base_window.cc', + 'base_window.h', + 'clipboard/clipboard.cc', + 'clipboard/clipboard.h', + 'clipboard/clipboard_android.cc', + 'clipboard/clipboard_android_initialization.h', + 'clipboard/clipboard_aura.cc', + 'clipboard/clipboard_aurax11.cc', + 'clipboard/clipboard_constants.cc', + 'clipboard/clipboard_mac.mm', + 'clipboard/clipboard_types.h', + 'clipboard/clipboard_util_win.cc', + 'clipboard/clipboard_util_win.h', + 'clipboard/clipboard_win.cc', + 'clipboard/custom_data_helper.cc', + 'clipboard/custom_data_helper.h', + 'clipboard/custom_data_helper_linux.cc', + 'clipboard/custom_data_helper_mac.mm', + 'clipboard/scoped_clipboard_writer.cc', + 'clipboard/scoped_clipboard_writer.h', + 'cocoa/animation_utils.h', + 'cocoa/appkit_utils.h', + 'cocoa/appkit_utils.mm', + 'cocoa/base_view.h', + 'cocoa/base_view.mm', + 'cocoa/cocoa_base_utils.h', + 'cocoa/cocoa_base_utils.mm', + 'cocoa/controls/blue_label_button.h', + 'cocoa/controls/blue_label_button.mm', + 'cocoa/controls/hover_image_menu_button.h', + 'cocoa/controls/hover_image_menu_button.mm', + 'cocoa/controls/hover_image_menu_button_cell.h', + 'cocoa/controls/hover_image_menu_button_cell.mm', + 'cocoa/controls/hyperlink_button_cell.h', + 'cocoa/controls/hyperlink_button_cell.mm', + 'cocoa/find_pasteboard.h', + 'cocoa/find_pasteboard.mm', + 'cocoa/flipped_view.h', + 'cocoa/flipped_view.mm', + 'cocoa/focus_tracker.h', + 'cocoa/focus_tracker.mm', + 'cocoa/focus_window_set.h', + 'cocoa/focus_window_set.mm', + 'cocoa/fullscreen_window_manager.h', + 'cocoa/fullscreen_window_manager.mm', + 'cocoa/hover_button.h', + 'cocoa/hover_button.mm', + 'cocoa/hover_image_button.h', + 'cocoa/hover_image_button.mm', + 'cocoa/menu_controller.h', + 'cocoa/menu_controller.mm', + 'cocoa/nib_loading.h', + 'cocoa/nib_loading.mm', + 'cocoa/nsgraphics_context_additions.h', + 'cocoa/nsgraphics_context_additions.mm', + 'cocoa/tracking_area.h', + 'cocoa/tracking_area.mm', + 'cocoa/underlay_opengl_hosting_window.h', + 'cocoa/underlay_opengl_hosting_window.mm', + 'cocoa/view_description.h', + 'cocoa/view_description.mm', + 'cocoa/window_size_constants.h', + 'cocoa/window_size_constants.mm', + 'cursor/cursor.cc', + 'cursor/cursor.h', + 'cursor/cursor_android.cc', + 'cursor/cursor_loader.h', + 'cursor/cursor_loader_ozone.cc', + 'cursor/cursor_loader_ozone.h', + 'cursor/cursor_loader_win.cc', + 'cursor/cursor_loader_win.h', + 'cursor/cursor_loader_x11.cc', + 'cursor/cursor_loader_x11.h', + 'cursor/cursor_ozone.cc', + 'cursor/cursor_util.cc', + 'cursor/cursor_util.h', + 'cursor/cursor_win.cc', + 'cursor/cursor_x11.cc', + 'cursor/cursors_aura.cc', + 'cursor/cursors_aura.h', + 'cursor/image_cursors.cc', + 'cursor/image_cursors.h', + 'cursor/ozone/bitmap_cursor_factory_ozone.cc', + 'cursor/ozone/bitmap_cursor_factory_ozone.h', + 'default_theme_provider.cc', + 'default_theme_provider.h', + 'default_theme_provider_mac.mm', + 'device_form_factor_android.cc', + 'device_form_factor_android.h', + 'device_form_factor_desktop.cc', + 'device_form_factor_ios.mm', + 'device_form_factor.h', + 'dragdrop/cocoa_dnd_util.h', + 'dragdrop/cocoa_dnd_util.mm', + 'dragdrop/drag_drop_types.h', + 'dragdrop/drag_drop_types_win.cc', + 'dragdrop/drag_source_win.cc', + 'dragdrop/drag_source_win.h', + 'dragdrop/drag_utils.cc', + 'dragdrop/drag_utils.h', + 'dragdrop/drag_utils_aura.cc', + 'dragdrop/drag_utils_mac.mm', + 'dragdrop/drag_utils_win.cc', + 'dragdrop/drop_target_event.cc', + 'dragdrop/drop_target_event.h', + 'dragdrop/drop_target_win.cc', + 'dragdrop/drop_target_win.h', + 'dragdrop/file_info.cc', + 'dragdrop/file_info.h', + 'dragdrop/os_exchange_data.cc', + 'dragdrop/os_exchange_data.h', + 'dragdrop/os_exchange_data_provider_aura.cc', + 'dragdrop/os_exchange_data_provider_aura.h', + 'dragdrop/os_exchange_data_provider_aurax11.cc', + 'dragdrop/os_exchange_data_provider_aurax11.h', + 'dragdrop/os_exchange_data_provider_mac.h', + 'dragdrop/os_exchange_data_provider_mac.mm', + 'dragdrop/os_exchange_data_provider_win.cc', + 'dragdrop/os_exchange_data_provider_win.h', + 'hit_test.h', + 'l10n/formatter.cc', + 'l10n/formatter.h', + 'l10n/l10n_font_util.cc', + 'l10n/l10n_font_util.h', + 'l10n/l10n_util.cc', + 'l10n/l10n_util.h', + 'l10n/l10n_util_android.cc', + 'l10n/l10n_util_android.h', + 'l10n/l10n_util_collator.h', + 'l10n/l10n_util_mac.h', + 'l10n/l10n_util_mac.mm', + 'l10n/l10n_util_plurals.cc', + 'l10n/l10n_util_plurals.h', + 'l10n/l10n_util_posix.cc', + 'l10n/l10n_util_win.cc', + 'l10n/l10n_util_win.h', + 'l10n/time_format.cc', + 'l10n/time_format.h', + 'layout.cc', + 'layout.h', + 'layout_mac.mm', + 'models/button_menu_item_model.cc', + 'models/button_menu_item_model.h', + 'models/combobox_model.cc', + 'models/combobox_model.h', + 'models/combobox_model_observer.h', + 'models/dialog_model.cc', + 'models/dialog_model.h', + 'models/list_model.h', + 'models/list_model_observer.h', + 'models/list_selection_model.cc', + 'models/list_selection_model.h', + 'models/menu_model.cc', + 'models/menu_model.h', + 'models/menu_model_delegate.h', + 'models/menu_separator_types.h', + 'models/simple_combobox_model.cc', + 'models/simple_combobox_model.h', + 'models/simple_menu_model.cc', + 'models/simple_menu_model.h', + 'models/table_model.cc', + 'models/table_model.h', + 'models/table_model_observer.h', + 'models/tree_model.cc', + 'models/tree_model.h', + 'models/tree_node_iterator.h', + 'models/tree_node_model.h', + 'nine_image_painter_factory.cc', + 'nine_image_painter_factory.h', + 'resource/data_pack.cc', + 'resource/data_pack.h', + 'resource/resource_bundle.cc', + 'resource/resource_bundle.h', + 'resource/resource_bundle_android.cc', + 'resource/resource_bundle_auralinux.cc', + 'resource/resource_bundle_ios.mm', + 'resource/resource_bundle_mac.mm', + 'resource/resource_bundle_win.cc', + 'resource/resource_bundle_win.h', + 'resource/resource_data_dll_win.cc', + 'resource/resource_data_dll_win.h', + 'resource/resource_handle.h', + 'text/bytes_formatting.cc', + 'text/bytes_formatting.h', + 'theme_provider.cc', + 'theme_provider.h', + 'touch/touch_device.cc', + 'touch/touch_device.h', + 'touch/touch_device_android.cc', + 'touch/touch_device_aurax11.cc', + 'touch/touch_device_ozone.cc', + 'touch/touch_device_win.cc', + 'touch/touch_editing_controller.cc', + 'touch/touch_editing_controller.h', + 'touch/touch_enabled.cc', + 'touch/touch_enabled.h', + 'ui_base_export.h', + 'ui_base_exports.cc', + 'ui_base_paths.cc', + 'ui_base_paths.h', + 'ui_base_switches.cc', + 'ui_base_switches.h', + 'ui_base_switches_util.cc', + 'ui_base_switches_util.h', + 'ui_base_types.cc', + 'ui_base_types.h', + 'view_prop.cc', + 'view_prop.h', + 'webui/jstemplate_builder.cc', + 'webui/jstemplate_builder.h', + 'webui/web_ui_util.cc', + 'webui/web_ui_util.h', + 'win/accessibility_ids_win.h', + 'win/accessibility_misc_utils.cc', + 'win/accessibility_misc_utils.h', + 'win/atl_module.h', + 'win/dpi_setup.cc', + 'win/dpi_setup.h', + 'win/foreground_helper.cc', + 'win/foreground_helper.h', + 'win/hidden_window.cc', + 'win/hidden_window.h', + 'win/hwnd_subclass.cc', + 'win/hwnd_subclass.h', + 'win/internal_constants.cc', + 'win/internal_constants.h', + 'win/lock_state.cc', + 'win/lock_state.h', + 'win/message_box_win.cc', + 'win/message_box_win.h', + 'win/mouse_wheel_util.cc', + 'win/mouse_wheel_util.h', + 'win/scoped_ole_initializer.cc', + 'win/scoped_ole_initializer.h', + 'win/shell.cc', + 'win/shell.h', + 'win/touch_input.cc', + 'win/touch_input.h', + 'win/window_event_target.cc', + 'win/window_event_target.h', + 'window_open_disposition.cc', + 'window_open_disposition.h', + 'work_area_watcher_observer.h', + 'x/selection_owner.cc', + 'x/selection_owner.h', + 'x/selection_requestor.cc', + 'x/selection_requestor.h', + 'x/selection_utils.cc', + 'x/selection_utils.h', + 'x/x11_menu_list.cc', + 'x/x11_menu_list.h', + 'x/x11_util.cc', + 'x/x11_util.h', + 'x/x11_util_internal.h', + ], + 'target_conditions': [ + ['OS == "ios"', { + 'sources/': [ + ['include', '^l10n/l10n_util_mac\\.mm$'], + ], + }], + ], + 'conditions': [ + ['OS!="ios"', { + 'includes': [ + 'ime/ime.gypi', + ], + }, { # OS=="ios" + # iOS only uses a subset of UI. + 'sources/': [ + ['exclude', '\\.(cc|mm)$'], + ['include', '_ios\\.(cc|mm)$'], + ['include', '(^|/)ios/'], + ['include', '^l10n/'], + ['include', '^layout'], + ['include', '^resource/'], + ['include', '^ui_base_'], + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework', + ], + }, + }], + ['toolkit_views==1', { + 'dependencies': [ + '../events/events.gyp:events', + ], + }], + ['use_aura==1', { + 'sources/': [ + ['exclude', 'clipboard/clipboard_mac.mm'], + ['exclude', 'layout_mac.mm'], + ['exclude', 'work_area_watcher_observer.h'], + ], + 'dependencies': [ + '../events/events.gyp:events', + ], + }, { # use_aura!=1 + 'sources!': [ + 'cursor/cursor.cc', + 'cursor/cursor.h', + 'cursor/cursor_loader_x11.cc', + 'cursor/cursor_loader_x11.h', + 'cursor/cursor_win.cc', + 'cursor/cursor_x11.cc', + 'x/selection_owner.cc', + 'x/selection_owner.h', + 'x/selection_requestor.cc', + 'x/selection_requestor.h', + 'x/selection_utils.cc', + 'x/selection_utils.h', + ] + }], + ['use_aura==0 or OS!="linux"', { + 'sources!': [ + 'resource/resource_bundle_auralinux.cc', + ], + }], + ['use_ozone==1', { + 'dependencies': [ + '../ozone/ozone.gyp:ozone_base', + ], + }], + ['use_aura==1 and OS=="win"', { + 'sources/': [ + ['exclude', 'dragdrop/drag_utils_aura.cc'], + ], + }], + ['use_glib == 1', { + 'dependencies': [ + '../../build/linux/system.gyp:fontconfig', + '../../build/linux/system.gyp:glib', + ], + }], + ['desktop_linux == 1 or chromeos == 1', { + 'conditions': [ + ['toolkit_views==0 and use_aura==0', { + # Note: because of gyp predence rules this has to be defined as + # 'sources/' rather than 'sources!'. + 'sources/': [ + ['exclude', '^dragdrop/drag_utils.cc'], + ['exclude', '^dragdrop/drag_utils.h'], + ], + }, { + 'sources/': [ + ['include', '^dragdrop/os_exchange_data.cc'], + ['include', '^dragdrop/os_exchange_data.h'], + ['include', '^nine_image_painter_factory.cc'], + ['include', '^nine_image_painter_factory.h'], + ], + }], + ], + }], + ['use_pango==1', { + 'dependencies': [ + '../../build/linux/system.gyp:pangocairo', + ], + }], + ['OS=="win" or use_clipboard_aurax11==1', { + 'sources!': [ + 'clipboard/clipboard_aura.cc', + ], + }, { + 'sources!': [ + 'clipboard/clipboard_aurax11.cc', + ], + }], + ['chromeos==1 or (use_aura==1 and OS=="linux" and use_x11==0)', { + 'sources!': [ + 'dragdrop/os_exchange_data_provider_aurax11.cc', + 'touch/touch_device.cc', + ], + }, { + 'sources!': [ + 'dragdrop/os_exchange_data_provider_aura.cc', + 'dragdrop/os_exchange_data_provider_aura.h', + 'touch/touch_device_aurax11.cc', + ], + }], + ['OS=="win"', { + 'sources!': [ + 'touch/touch_device.cc', + ], + 'include_dirs': [ + '../..', + '../../third_party/wtl/include', + ], + # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int + # C4324 is structure was padded due to __declspec(align()), which is + # uninteresting. + 'msvs_disabled_warnings': [ 4267, 4324 ], + 'msvs_settings': { + 'VCLinkerTool': { + 'DelayLoadDLLs': [ + 'd2d1.dll', + 'd3d10_1.dll', + 'dwmapi.dll', + ], + 'AdditionalDependencies': [ + 'd2d1.lib', + 'd3d10_1.lib', + 'dwmapi.lib', + ], + }, + }, + 'link_settings': { + 'libraries': [ + '-limm32.lib', + '-ld2d1.lib', + '-ldwmapi.lib', + '-loleacc.lib', + ], + }, + },{ # OS!="win" + 'conditions': [ + ['use_aura==0', { + 'sources!': [ + 'view_prop.cc', + 'view_prop.h', + ], + }], + ], + }], + ['OS=="mac"', { + 'dependencies': [ + '../../third_party/mozilla/mozilla.gyp:mozilla', + ], + 'sources!': [ + 'cursor/image_cursors.cc', + 'cursor/image_cursors.h', + 'dragdrop/drag_utils.cc', + 'dragdrop/drag_utils.h', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework', + '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework', + '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework', + ], + }, + }], + ['use_x11==1', { + 'all_dependent_settings': { + 'ldflags': [ + '-L<(PRODUCT_DIR)', + ], + }, + 'dependencies': [ + '../../build/linux/system.gyp:x11', + '../../build/linux/system.gyp:xcursor', + '../../build/linux/system.gyp:xext', + '../../build/linux/system.gyp:xfixes', + '../../build/linux/system.gyp:xrender', # For XRender* function calls in x11_util.cc. + '../events/platform/x11/x11_events_platform.gyp:x11_events_platform', + ], + }], + ['toolkit_views==0', { + 'sources!': [ + 'dragdrop/drag_drop_types.h', + 'dragdrop/drop_target_event.cc', + 'dragdrop/drop_target_event.h', + 'dragdrop/os_exchange_data.cc', + 'dragdrop/os_exchange_data.h', + 'nine_image_painter_factory.cc', + 'nine_image_painter_factory.h', + ], + }], + ['OS=="android"', { + 'sources!': [ + 'cursor/image_cursors.cc', + 'cursor/image_cursors.h', + 'default_theme_provider.cc', + 'dragdrop/drag_utils.cc', + 'dragdrop/drag_utils.h', + 'l10n/l10n_font_util.cc', + 'models/button_menu_item_model.cc', + 'models/dialog_model.cc', + 'theme_provider.cc', + 'touch/touch_device.cc', + 'touch/touch_editing_controller.cc', + 'ui_base_types.cc', + ], + 'dependencies': [ + 'ui_base_jni_headers', + ], + 'link_settings': { + 'libraries': [ + '-ljnigraphics', + ], + }, + }], + ['OS=="android" and android_webview_build==0', { + 'dependencies': [ + '../android/ui_android.gyp:ui_java', + ], + }], + ['OS=="android" and use_aura==0', { + 'sources!': [ + 'cursor/cursor_android.cc' + ], + }], + ['OS=="android" and use_aura==1', { + 'sources!': [ + 'clipboard/clipboard_aura.cc' + ], + }], + ['OS=="android" or OS=="ios"', { + 'sources!': [ + 'device_form_factor_desktop.cc' + ], + }], + ['OS=="linux"', { + 'libraries': [ + '-ldl', + ], + }], + ['use_system_icu==1', { + # When using the system icu, the icu targets generate shim headers + # which are included by public headers in the ui target, so we need + # ui to be a hard dependency for all its users. + 'hard_dependency': 1, + }], + ], + }, + { + 'target_name': 'ui_base_test_support', + 'dependencies': [ + '../../base/base.gyp:base', + '../../skia/skia.gyp:skia', + '../../testing/gtest.gyp:gtest', + '../gfx/gfx.gyp:gfx', + '../gfx/gfx.gyp:gfx_geometry', + ], + 'sources': [ + 'test/ui_controls.h', + 'test/ui_controls_aura.cc', + 'test/ui_controls_internal_win.cc', + 'test/ui_controls_internal_win.h', + 'test/ui_controls_mac.mm', + 'test/ui_controls_win.cc', + ], + 'include_dirs': [ + '../..', + ], + 'conditions': [ + ['OS!="ios"', { + 'type': 'static_library', + 'includes': [ 'ime/ime_test_support.gypi' ], + }, { # OS=="ios" + # None of the sources in this target are built on iOS, resulting in + # link errors when building targets that depend on this target + # because the static library isn't found. If this target is changed + # to have sources that are built on iOS, the target should be changed + # to be of type static_library on all platforms. + 'type': 'none', + }], + ['use_aura==1', { + 'sources!': [ + 'test/ui_controls_mac.mm', + 'test/ui_controls_win.cc', + ], + }], + ], + }, + ], + 'conditions': [ + ['OS=="android"' , { + 'targets': [ + { + 'target_name': 'ui_base_jni_headers', + 'type': 'none', + 'sources': [ + '../android/java/src/org/chromium/ui/base/Clipboard.java', + '../android/java/src/org/chromium/ui/base/DeviceFormFactor.java', + '../android/java/src/org/chromium/ui/base/LocalizationUtils.java', + '../android/java/src/org/chromium/ui/base/SelectFileDialog.java', + '../android/java/src/org/chromium/ui/base/TouchDevice.java', + '../android/java/src/org/chromium/ui/base/ViewAndroid.java', + '../android/java/src/org/chromium/ui/base/WindowAndroid.java', + ], + 'variables': { + 'jni_gen_package': 'ui', + }, + 'includes': [ '../../build/jni_generator.gypi' ], + }, + ], + }], + ], +} diff --git a/chromium/ui/base/ui_base_export.h b/chromium/ui/base/ui_base_export.h new file mode 100644 index 00000000000..dba9b898029 --- /dev/null +++ b/chromium/ui/base/ui_base_export.h @@ -0,0 +1,37 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_UI_BASE_EXPORT_H_ +#define UI_BASE_UI_BASE_EXPORT_H_ + +// Defines UI_BASE_EXPORT so that functionality implemented by the UI module +// can be exported to consumers. + +#if defined(COMPONENT_BUILD) + +#if defined(WIN32) + +#if defined(UI_BASE_IMPLEMENTATION) +#define UI_BASE_EXPORT __declspec(dllexport) +#else +#define UI_BASE_EXPORT __declspec(dllimport) +#endif + +#else // !defined(WIN32) + +#if defined(UI_BASE_IMPLEMENTATION) +#define UI_BASE_EXPORT __attribute__((visibility("default"))) +#else +#define UI_BASE_EXPORT +#endif + +#endif + +#else // !defined(COMPONENT_BUILD) + +#define UI_BASE_EXPORT + +#endif + +#endif // UI_BASE_UI_BASE_EXPORT_H_ diff --git a/chromium/ui/base/ui_base_paths.cc b/chromium/ui/base/ui_base_paths.cc index ee7566ef438..4cdf7c18e1d 100644 --- a/chromium/ui/base/ui_base_paths.cc +++ b/chromium/ui/base/ui_base_paths.cc @@ -23,7 +23,7 @@ bool PathProvider(int key, base::FilePath* result) { base::FilePath cur; switch (key) { - case ui::DIR_LOCALES: + case DIR_LOCALES: if (!PathService::Get(base::DIR_MODULE, &cur)) return false; #if defined(OS_MACOSX) @@ -32,7 +32,7 @@ bool PathProvider(int key, base::FilePath* result) { cur = cur.DirName(); cur = cur.Append(FILE_PATH_LITERAL("Resources")); #elif defined(OS_ANDROID) - if (!PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &cur)) + if (!PathService::Get(DIR_RESOURCE_PAKS_ANDROID, &cur)) return false; #else cur = cur.Append(FILE_PATH_LITERAL("locales")); @@ -42,22 +42,28 @@ bool PathProvider(int key, base::FilePath* result) { // The following are only valid in the development environment, and // will fail if executed from an installed executable (because the // generated path won't exist). - case ui::DIR_TEST_DATA: + case UI_DIR_TEST_DATA: if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) return false; - cur = cur.Append(FILE_PATH_LITERAL("app")); + cur = cur.Append(FILE_PATH_LITERAL("ui")); + cur = cur.Append(FILE_PATH_LITERAL("base")); cur = cur.Append(FILE_PATH_LITERAL("test")); cur = cur.Append(FILE_PATH_LITERAL("data")); if (!base::PathExists(cur)) // we don't want to create this return false; break; #if defined(OS_ANDROID) - case ui::DIR_RESOURCE_PAKS_ANDROID: + case DIR_RESOURCE_PAKS_ANDROID: if (!PathService::Get(base::DIR_ANDROID_APP_DATA, &cur)) return false; cur = cur.Append(FILE_PATH_LITERAL("paks")); break; #endif + case UI_TEST_PAK: + if (!PathService::Get(base::DIR_MODULE, &cur)) + return false; + cur = cur.AppendASCII("ui_test.pak"); + break; default: return false; } diff --git a/chromium/ui/base/ui_base_paths.h b/chromium/ui/base/ui_base_paths.h index 2b61723493a..cf5e0041e6f 100644 --- a/chromium/ui/base/ui_base_paths.h +++ b/chromium/ui/base/ui_base_paths.h @@ -6,10 +6,10 @@ #define UI_BASE_UI_BASE_PATHS_H_ #include "build/build_config.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" -// This file declares path keys for the app module. These can be used with -// the PathService to access various special directories and files. +// This file declares path keys for various special directories. These can be +// used with the PathService to access these directories and files. namespace ui { @@ -19,17 +19,19 @@ enum { DIR_LOCALES, // Directory where locale resources are stored. // Valid only in development environment; TODO(darin): move this - DIR_TEST_DATA, // Directory where unit test data resides. + UI_DIR_TEST_DATA, // Directory where unit test data resides. #if defined(OS_ANDROID) DIR_RESOURCE_PAKS_ANDROID, #endif + UI_TEST_PAK, + PATH_END }; // Call once to register the provider for the path keys defined above. -UI_EXPORT void RegisterPathProvider(); +UI_BASE_EXPORT void RegisterPathProvider(); } // namespace ui diff --git a/chromium/ui/base/ui_base_switches.cc b/chromium/ui/base/ui_base_switches.cc index 8adac9966e2..9bacd0a71c2 100644 --- a/chromium/ui/base/ui_base_switches.cc +++ b/chromium/ui/base/ui_base_switches.cc @@ -6,9 +6,17 @@ namespace switches { +#if defined(OS_MACOSX) && !defined(OS_IOS) +// Disable use of CoreAnimation to draw on the Mac. +const char kDisableCoreAnimation[] = "disable-core-animation"; +#endif + // Disables use of DWM composition for top level windows. const char kDisableDwmComposition[] = "disable-dwm-composition"; +// Disables an experimental focus manager to track text input clients. +const char kDisableTextInputFocusManager[] = "disable-text-input-focus-manager"; + // Disables touch adjustment. const char kDisableTouchAdjustment[] = "disable-touch-adjustment"; @@ -18,57 +26,21 @@ const char kDisableTouchDragDrop[] = "disable-touch-drag-drop"; // Disables controls that support touch base text editing. const char kDisableTouchEditing[] = "disable-touch-editing"; +// Enables an experimental focus manager to track text input clients. +const char kEnableTextInputFocusManager[] = "enable-text-input-focus-manager"; + // Enables touch event based drag and drop. const char kEnableTouchDragDrop[] = "enable-touch-drag-drop"; // Enables controls that support touch base text editing. const char kEnableTouchEditing[] = "enable-touch-editing"; -// If a resource is requested at a scale factor at which it is not available -// or the resource is the incorrect size (based on the size of the 1x resource), -// generates the missing resource and applies a red mask to the generated -// resource. Resources for which hidpi is not supported because of software -// reasons will show up pixelated. -const char kHighlightMissingScaledResources[] = - "highlight-missing-scaled-resources"; - // The language file that we want to try to open. Of the form // language[-country] where language is the 2 letter code from ISO-639. const char kLang[] = "lang"; -// Load the locale resources from the given path. When running on Mac/Unix the -// path should point to a locale.pak file. -const char kLocalePak[] = "locale_pak"; - // Disable ui::MessageBox. This is useful when running as part of scripts that // do not have a user interface. const char kNoMessageBox[] = "no-message-box"; -// Enables UI changes that make it easier to use with a touchscreen. -// WARNING: Do not check this flag directly when deciding what UI to draw, -// instead you must call ui::GetDisplayLayout -const char kTouchOptimizedUI[] = "touch-optimized-ui"; - -// The values the kTouchOptimizedUI switch may have, as in -// "--touch-optimized-ui=disabled". -// auto: Enabled on monitors which have touchscreen support (default). -const char kTouchOptimizedUIAuto[] = "auto"; -// enabled: always optimized for touch (even if no touch support). -const char kTouchOptimizedUIEnabled[] = "enabled"; -// disabled: never optimized for touch. -const char kTouchOptimizedUIDisabled[] = "disabled"; - -// Enables touch events on the side bezels. -const char kTouchSideBezels[] = "touch-side-bezels"; - -#if defined(OS_ANDROID) -// Uses the tablet specific UI components when available. -const char kTabletUI[] = "tablet-ui"; -#endif - -#if defined(USE_XI2_MT) -// The calibration factors given as "<left>,<right>,<top>,<bottom>". -const char kTouchCalibration[] = "touch-calibration"; -#endif - } // namespace switches diff --git a/chromium/ui/base/ui_base_switches.h b/chromium/ui/base/ui_base_switches.h index 4e1b7e028f3..b638ae85a96 100644 --- a/chromium/ui/base/ui_base_switches.h +++ b/chromium/ui/base/ui_base_switches.h @@ -8,33 +8,24 @@ #define UI_BASE_UI_BASE_SWITCHES_H_ #include "base/compiler_specific.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace switches { -UI_EXPORT extern const char kDisableDwmComposition[]; -UI_EXPORT extern const char kDisableTouchAdjustment[]; -UI_EXPORT extern const char kDisableTouchDragDrop[]; -UI_EXPORT extern const char kDisableTouchEditing[]; -UI_EXPORT extern const char kEnableTouchDragDrop[]; -UI_EXPORT extern const char kEnableTouchEditing[]; -UI_EXPORT extern const char kHighlightMissingScaledResources[]; -UI_EXPORT extern const char kLang[]; -UI_EXPORT extern const char kLocalePak[]; -UI_EXPORT extern const char kNoMessageBox[]; -UI_EXPORT extern const char kTouchOptimizedUI[]; -UI_EXPORT extern const char kTouchOptimizedUIAuto[]; -UI_EXPORT extern const char kTouchOptimizedUIDisabled[]; -UI_EXPORT extern const char kTouchOptimizedUIEnabled[]; -UI_EXPORT extern const char kTouchSideBezels[]; - -#if defined(OS_ANDROID) -UI_EXPORT extern const char kTabletUI[]; +#if defined(OS_MACOSX) && !defined(OS_IOS) +UI_BASE_EXPORT extern const char kDisableCoreAnimation[]; #endif -#if defined(USE_XI2_MT) -UI_EXPORT extern const char kTouchCalibration[]; -#endif +UI_BASE_EXPORT extern const char kDisableDwmComposition[]; +UI_BASE_EXPORT extern const char kDisableTextInputFocusManager[]; +UI_BASE_EXPORT extern const char kDisableTouchAdjustment[]; +UI_BASE_EXPORT extern const char kDisableTouchDragDrop[]; +UI_BASE_EXPORT extern const char kDisableTouchEditing[]; +UI_BASE_EXPORT extern const char kEnableTextInputFocusManager[]; +UI_BASE_EXPORT extern const char kEnableTouchDragDrop[]; +UI_BASE_EXPORT extern const char kEnableTouchEditing[]; +UI_BASE_EXPORT extern const char kLang[]; +UI_BASE_EXPORT extern const char kNoMessageBox[]; } // namespace switches diff --git a/chromium/ui/base/ui_base_switches_util.cc b/chromium/ui/base/ui_base_switches_util.cc index 3089607af86..ba20e53f7fa 100644 --- a/chromium/ui/base/ui_base_switches_util.cc +++ b/chromium/ui/base/ui_base_switches_util.cc @@ -9,6 +9,11 @@ namespace switches { +bool IsTextInputFocusManagerEnabled() { + return CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableTextInputFocusManager); +} + bool IsTouchDragDropEnabled() { #if defined(OS_CHROMEOS) return !CommandLine::ForCurrentProcess()->HasSwitch( @@ -20,7 +25,7 @@ bool IsTouchDragDropEnabled() { } bool IsTouchEditingEnabled() { -#if defined(OS_CHROMEOS) +#if defined(USE_AURA) return !CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableTouchEditing); #else diff --git a/chromium/ui/base/ui_base_switches_util.h b/chromium/ui/base/ui_base_switches_util.h index c64da8f6e3c..8dbc408f377 100644 --- a/chromium/ui/base/ui_base_switches_util.h +++ b/chromium/ui/base/ui_base_switches_util.h @@ -5,13 +5,13 @@ #ifndef UI_BASE_UI_BASE_SWITCHES_UTIL_H_ #define UI_BASE_UI_BASE_SWITCHES_UTIL_H_ -#include "base/compiler_specific.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace switches { -UI_EXPORT bool IsTouchDragDropEnabled(); -UI_EXPORT bool IsTouchEditingEnabled(); +UI_BASE_EXPORT bool IsTextInputFocusManagerEnabled(); +UI_BASE_EXPORT bool IsTouchDragDropEnabled(); +UI_BASE_EXPORT bool IsTouchEditingEnabled(); } // namespace switches diff --git a/chromium/ui/base/ui_base_types.h b/chromium/ui/base/ui_base_types.h index 3b8ee9c7a52..fc4ed95bab1 100644 --- a/chromium/ui/base/ui_base_types.h +++ b/chromium/ui/base/ui_base_types.h @@ -5,7 +5,7 @@ #ifndef UI_BASE_UI_BASE_TYPES_H_ #define UI_BASE_UI_BASE_TYPES_H_ -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { @@ -48,9 +48,10 @@ enum MenuSourceType { MENU_SOURCE_KEYBOARD = 2, MENU_SOURCE_TOUCH = 3, MENU_SOURCE_TOUCH_EDIT_MENU = 4, + MENU_SOURCE_TYPE_LAST = MENU_SOURCE_TOUCH_EDIT_MENU }; -UI_EXPORT MenuSourceType GetMenuSourceTypeForEvent(const ui::Event& event); +UI_BASE_EXPORT MenuSourceType GetMenuSourceTypeForEvent(const ui::Event& event); } // namespace ui diff --git a/chromium/ui/base/ui_export.h b/chromium/ui/base/ui_export.h deleted file mode 100644 index ba05e33ec60..00000000000 --- a/chromium/ui/base/ui_export.h +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_UI_EXPORT_H_ -#define UI_UI_EXPORT_H_ - -// Defines UI_EXPORT so that functionality implemented by the UI module can be -// exported to consumers. - -#if defined(COMPONENT_BUILD) -#if defined(WIN32) - -#if defined(UI_IMPLEMENTATION) -#define UI_EXPORT __declspec(dllexport) -#else -#define UI_EXPORT __declspec(dllimport) -#endif // defined(UI_IMPLEMENTATION) - -#else // defined(WIN32) -#if defined(UI_IMPLEMENTATION) -#define UI_EXPORT __attribute__((visibility("default"))) -#else -#define UI_EXPORT -#endif -#endif - -#else // defined(COMPONENT_BUILD) -#define UI_EXPORT -#endif - -#endif // UI_UI_EXPORT_H_ diff --git a/chromium/ui/base/view_prop.h b/chromium/ui/base/view_prop.h index eae6792b845..3ce14ba5d95 100644 --- a/chromium/ui/base/view_prop.h +++ b/chromium/ui/base/view_prop.h @@ -7,10 +7,10 @@ #include "base/basictypes.h" #include "base/memory/ref_counted.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/native_widget_types.h" -#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(USE_AURA)) +#if !defined(OS_WIN) && !defined(USE_AURA) #error view_prop.h is only for windows and aura builds. #endif @@ -20,7 +20,7 @@ namespace ui { // designed as a replacement for the Win32's SetProp, but does not make use of // window manager memory. ViewProp shares similar semantics as SetProp, the // value for a particular view/key pair comes from the last ViewProp created. -class UI_EXPORT ViewProp { +class UI_BASE_EXPORT ViewProp { public: // Associates data with a view/key pair. If a ViewProp has already been // created for the specified pair |data| replaces the current value. diff --git a/chromium/ui/base/webui/jstemplate_builder.h b/chromium/ui/base/webui/jstemplate_builder.h index 66b265a0476..1ad15c36392 100644 --- a/chromium/ui/base/webui/jstemplate_builder.h +++ b/chromium/ui/base/webui/jstemplate_builder.h @@ -16,7 +16,7 @@ #include <string> #include "base/strings/string_piece.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace base { class DictionaryValue; @@ -27,7 +27,7 @@ namespace webui { // While an object of this class is in scope, the template builder will output // version 2 html. Version 2 uses load_time_data.js and i18n_template2.js, and // should soon become the default. -class UI_EXPORT UseVersion2 { +class UI_BASE_EXPORT UseVersion2 { public: UseVersion2(); ~UseVersion2(); @@ -39,52 +39,55 @@ class UI_EXPORT UseVersion2 { // A helper function that generates a string of HTML to be loaded. The // string includes the HTML and the javascript code necessary to generate the // full page with support for JsTemplates. -UI_EXPORT std::string GetTemplateHtml(const base::StringPiece& html_template, - const base::DictionaryValue* json, - const base::StringPiece& template_id); +UI_BASE_EXPORT std::string GetTemplateHtml( + const base::StringPiece& html_template, + const base::DictionaryValue* json, + const base::StringPiece& template_id); // A helper function that generates a string of HTML to be loaded. The // string includes the HTML and the javascript code necessary to generate the // full page with support for i18n Templates. -UI_EXPORT std::string GetI18nTemplateHtml( +UI_BASE_EXPORT std::string GetI18nTemplateHtml( const base::StringPiece& html_template, const base::DictionaryValue* json); // A helper function that generates a string of HTML to be loaded. The // string includes the HTML and the javascript code necessary to generate the // full page with support for both i18n Templates and JsTemplates. -UI_EXPORT std::string GetTemplatesHtml(const base::StringPiece& html_template, - const base::DictionaryValue* json, - const base::StringPiece& template_id); +UI_BASE_EXPORT std::string GetTemplatesHtml( + const base::StringPiece& html_template, + const base::DictionaryValue* json, + const base::StringPiece& template_id); // The following functions build up the different parts that the above // templates use. // Appends a script tag with a variable name |templateData| that has the JSON // assigned to it. -UI_EXPORT void AppendJsonHtml(const base::DictionaryValue* json, - std::string* output); +UI_BASE_EXPORT void AppendJsonHtml(const base::DictionaryValue* json, + std::string* output); // Same as AppendJsonHtml(), except does not include the <script></script> // tag wrappers. -UI_EXPORT void AppendJsonJS(const base::DictionaryValue* json, - std::string* output); +UI_BASE_EXPORT void AppendJsonJS(const base::DictionaryValue* json, + std::string* output); // Appends the source for JsTemplates in a script tag. -UI_EXPORT void AppendJsTemplateSourceHtml(std::string* output); +UI_BASE_EXPORT void AppendJsTemplateSourceHtml(std::string* output); // Appends the code that processes the JsTemplate with the JSON. You should // call AppendJsTemplateSourceHtml and AppendJsonHtml before calling this. -UI_EXPORT void AppendJsTemplateProcessHtml(const base::StringPiece& template_id, - std::string* output); +UI_BASE_EXPORT void AppendJsTemplateProcessHtml( + const base::StringPiece& template_id, + std::string* output); // Appends the source for i18n Templates in a script tag. -UI_EXPORT void AppendI18nTemplateSourceHtml(std::string* output); +UI_BASE_EXPORT void AppendI18nTemplateSourceHtml(std::string* output); // Appends the code that processes the i18n Template with the JSON. You // should call AppendJsTemplateSourceHtml and AppendJsonHtml before calling // this. -UI_EXPORT void AppendI18nTemplateProcessHtml(std::string* output); +UI_BASE_EXPORT void AppendI18nTemplateProcessHtml(std::string* output); } // namespace webui diff --git a/chromium/ui/base/webui/web_ui_util.cc b/chromium/ui/base/webui/web_ui_util.cc index d901491300b..e2f1786069f 100644 --- a/chromium/ui/base/webui/web_ui_util.cc +++ b/chromium/ui/base/webui/web_ui_util.cc @@ -76,8 +76,8 @@ WindowOpenDisposition GetDispositionFromClick(const base::ListValue* args, } bool ParseScaleFactor(const base::StringPiece& identifier, - ui::ScaleFactor* scale_factor) { - *scale_factor = ui::SCALE_FACTOR_100P; + float* scale_factor) { + *scale_factor = 1.0f; if (identifier.empty()) { LOG(WARNING) << "Invalid scale factor format: " << identifier; return false; @@ -95,25 +95,24 @@ bool ParseScaleFactor(const base::StringPiece& identifier, LOG(WARNING) << "Invalid scale factor format: " << identifier; return false; } - - *scale_factor = ui::GetSupportedScaleFactor(static_cast<float>(scale)); + *scale_factor = scale; return true; } void ParsePathAndScale(const GURL& url, std::string* path, - ui::ScaleFactor* scale_factor) { + float* scale_factor) { *path = net::UnescapeURLComponent(url.path().substr(1), (net::UnescapeRule::URL_SPECIAL_CHARS | net::UnescapeRule::SPACES)); if (scale_factor) - *scale_factor = ui::SCALE_FACTOR_100P; + *scale_factor = 1.0f; // Detect and parse resource string ending in @<scale>x. std::size_t pos = path->rfind('@'); if (pos != std::string::npos) { base::StringPiece stripped_path(*path); - ui::ScaleFactor factor; + float factor; if (ParseScaleFactor(stripped_path.substr( pos + 1, stripped_path.length() - pos - 1), &factor)) { @@ -140,9 +139,9 @@ void SetFontAndTextDirection(base::DictionaryValue* localized_strings) { std::string font_family = l10n_util::GetStringUTF8(web_font_family_id); -#if defined(TOOLKIT_GTK) - // Use the system font on Linux/GTK. Keep the hard-coded font families as - // backup in case for some crazy reason this one isn't available. +// TODO(dnicoara) Remove Ozone check when PlatformFont support is introduced +// into Ozone: crbug.com/320050 +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(USE_OZONE) font_family = ui::ResourceBundle::GetSharedInstance().GetFont( ui::ResourceBundle::BaseFont).GetFontName() + ", " + font_family; #endif diff --git a/chromium/ui/base/webui/web_ui_util.h b/chromium/ui/base/webui/web_ui_util.h index 72afec68543..85f5fd90043 100644 --- a/chromium/ui/base/webui/web_ui_util.h +++ b/chromium/ui/base/webui/web_ui_util.h @@ -9,8 +9,7 @@ #include "base/strings/string_piece.h" #include "base/values.h" -#include "ui/base/layout.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/base/window_open_disposition.h" class GURL; @@ -20,7 +19,7 @@ namespace webui { // Convenience routine to convert SkBitmap object to data url // so that it can be used in WebUI. -UI_EXPORT std::string GetBitmapDataUrl(const SkBitmap& bitmap); +UI_BASE_EXPORT std::string GetBitmapDataUrl(const SkBitmap& bitmap); // Convenience routine to get data url that corresponds to given // resource_id as a bitmap. This function does not check if the @@ -28,31 +27,27 @@ UI_EXPORT std::string GetBitmapDataUrl(const SkBitmap& bitmap); // caller's responsibility to make sure the resource is indeed a // bitmap. Returns empty string if a resource does not exist for given // |resource_id|. -UI_EXPORT std::string GetBitmapDataUrlFromResource(int resource_id); +UI_BASE_EXPORT std::string GetBitmapDataUrlFromResource(int resource_id); // Extracts a disposition from click event arguments. |args| should contain // an integer button and booleans alt key, ctrl key, meta key, and shift key // (in that order), starting at |start_index|. -UI_EXPORT WindowOpenDisposition GetDispositionFromClick( - const base::ListValue* args, - int start_index); +UI_BASE_EXPORT WindowOpenDisposition + GetDispositionFromClick(const base::ListValue* args, int start_index); -// Given a scale factor such as "1x", "2x" or "1.99x", sets |scale_factor| to -// the closest ScaleFactor enum value for this scale factor. If string can not -// be parsed, then |scale_factor| is set to SCALE_FACTOR_100P, and false is -// returned. -UI_EXPORT bool ParseScaleFactor(const base::StringPiece&identifier, - ui::ScaleFactor* scale_factor); +// Pares a formatted scale factor string into float and sets to |scale_factor|. +UI_BASE_EXPORT bool ParseScaleFactor(const base::StringPiece& identifier, + float* scale_factor); // Parses a URL containing some path @{scale}x. If it does not contain a scale // factor then the default scale factor is returned. -UI_EXPORT void ParsePathAndScale(const GURL& url, - std::string* path, - ui::ScaleFactor* scale_factor); +UI_BASE_EXPORT void ParsePathAndScale(const GURL& url, + std::string* path, + float* scale_factor); // Helper function to set the font family, size, and text direction into the // given dictionary. -UI_EXPORT void SetFontAndTextDirection( +UI_BASE_EXPORT void SetFontAndTextDirection( base::DictionaryValue* localized_strings); } // namespace webui diff --git a/chromium/ui/base/webui/web_ui_util_unittest.cc b/chromium/ui/base/webui/web_ui_util_unittest.cc index 59ed4a5d21d..792895c9b24 100644 --- a/chromium/ui/base/webui/web_ui_util_unittest.cc +++ b/chromium/ui/base/webui/web_ui_util_unittest.cc @@ -8,48 +8,47 @@ #include "url/gurl.h" TEST(WebUIUtilTest, ParsePathAndScale) { - std::vector<ui::ScaleFactor> supported_scale_factors; - supported_scale_factors.push_back(ui::SCALE_FACTOR_100P); - supported_scale_factors.push_back(ui::SCALE_FACTOR_140P); - supported_scale_factors.push_back(ui::SCALE_FACTOR_200P); - ui::test::ScopedSetSupportedScaleFactors scoped_supported( - supported_scale_factors); - std::string path; - ui::ScaleFactor factor; + float factor = 0; GURL url("http://some/random/username@email/and/more"); webui::ParsePathAndScale(url, &path, &factor); EXPECT_EQ("random/username@email/and/more", path); - EXPECT_EQ(ui::SCALE_FACTOR_100P, factor); + EXPECT_EQ(1.0f, factor); + factor = 0; GURL url2("http://some/random/username/and/more"); webui::ParsePathAndScale(url2, &path, &factor); EXPECT_EQ("random/username/and/more", path); - EXPECT_EQ(ui::SCALE_FACTOR_100P, factor); + EXPECT_EQ(1.0f, factor); + factor = 0; GURL url3("http://some/random/username/and/more@2ax"); webui::ParsePathAndScale(url3, &path, &factor); EXPECT_EQ("random/username/and/more@2ax", path); - EXPECT_EQ(ui::SCALE_FACTOR_100P, factor); + EXPECT_EQ(1.0f, factor); + factor = 0; GURL url4("http://some/random/username/and/more@x"); webui::ParsePathAndScale(url4, &path, &factor); EXPECT_EQ("random/username/and/more@x", path); - EXPECT_EQ(ui::SCALE_FACTOR_100P, factor); + EXPECT_EQ(1.0f, factor); + factor = 0; GURL url5("http://some/random/username@email/and/more@2x"); webui::ParsePathAndScale(url5, &path, &factor); EXPECT_EQ("random/username@email/and/more", path); - EXPECT_EQ(ui::SCALE_FACTOR_200P, factor); + EXPECT_EQ(2.0f, factor); + factor = 0; GURL url6("http://some/random/username/and/more@1.4x"); webui::ParsePathAndScale(url6, &path, &factor); EXPECT_EQ("random/username/and/more", path); - EXPECT_EQ(ui::SCALE_FACTOR_140P, factor); + EXPECT_EQ(1.4f, factor); + factor = 0; GURL url7("http://some/random/username/and/more@1.3x"); webui::ParsePathAndScale(url7, &path, &factor); EXPECT_EQ("random/username/and/more", path); - EXPECT_EQ(ui::SCALE_FACTOR_140P, factor); + EXPECT_EQ(1.3f, factor); } diff --git a/chromium/ui/base/win/accessibility_misc_utils.cc b/chromium/ui/base/win/accessibility_misc_utils.cc index 5074ce372a7..621048ffcd8 100644 --- a/chromium/ui/base/win/accessibility_misc_utils.cc +++ b/chromium/ui/base/win/accessibility_misc_utils.cc @@ -14,7 +14,9 @@ UIATextProvider::UIATextProvider() : editable_(false) {} // static -bool UIATextProvider::CreateTextProvider(bool editable, IUnknown** provider) { +bool UIATextProvider::CreateTextProvider(const string16& value, + bool editable, + IUnknown** provider) { // Make sure ATL is initialized in this module. ui::win::CreateATLModuleIfNeeded(); @@ -23,6 +25,7 @@ bool UIATextProvider::CreateTextProvider(bool editable, IUnknown** provider) { if (SUCCEEDED(hr)) { DCHECK(text_provider); text_provider->set_editable(editable); + text_provider->set_value(value); text_provider->AddRef(); *provider = static_cast<ITextProvider*>(text_provider); return true; @@ -35,5 +38,10 @@ STDMETHODIMP UIATextProvider::get_IsReadOnly(BOOL* read_only) { return S_OK; } +STDMETHODIMP UIATextProvider::get_Value(BSTR* value) { + *value = SysAllocString(value_.c_str()); + return S_OK; +} + } // namespace win } // namespace base diff --git a/chromium/ui/base/win/accessibility_misc_utils.h b/chromium/ui/base/win/accessibility_misc_utils.h index 3789efb02b5..e17f1d3c6b0 100644 --- a/chromium/ui/base/win/accessibility_misc_utils.h +++ b/chromium/ui/base/win/accessibility_misc_utils.h @@ -9,13 +9,14 @@ #include <UIAutomationCore.h> #include "base/compiler_specific.h" -#include "ui/base/ui_export.h" +#include "base/strings/string16.h" +#include "ui/base/ui_base_export.h" namespace base { namespace win { // UIA Text provider implementation for edit controls. -class UI_EXPORT UIATextProvider +class UI_BASE_EXPORT UIATextProvider : public NON_EXPORTED_BASE(CComObjectRootEx<CComMultiThreadModel>), public IValueProvider, public ITextProvider { @@ -30,12 +31,16 @@ class UI_EXPORT UIATextProvider // Creates an instance of the UIATextProvider class. // Returns true on success - static bool CreateTextProvider(bool editable, IUnknown** provider); + static bool CreateTextProvider(const string16& value, + bool editable, + IUnknown** provider); void set_editable(bool editable) { editable_ = editable; } + void set_value(const string16& value) { value_ = value; } + // // IValueProvider methods. // @@ -48,9 +53,7 @@ class UI_EXPORT UIATextProvider return E_NOTIMPL; } - STDMETHOD(get_Value)(BSTR* value) { - return E_NOTIMPL; - } + STDMETHOD(get_Value)(BSTR* value); // // ITextProvider methods. @@ -83,6 +86,7 @@ class UI_EXPORT UIATextProvider private: bool editable_; + string16 value_; }; } // win diff --git a/chromium/ui/base/win/dpi_setup.cc b/chromium/ui/base/win/dpi_setup.cc index ad4e6e8616e..423b788132a 100644 --- a/chromium/ui/base/win/dpi_setup.cc +++ b/chromium/ui/base/win/dpi_setup.cc @@ -4,6 +4,7 @@ #include "ui/base/win/dpi_setup.h" +#include "base/command_line.h" #include "ui/base/layout.h" #include "ui/gfx/display.h" #include "ui/gfx/win/dpi.h" diff --git a/chromium/ui/base/win/dpi_setup.h b/chromium/ui/base/win/dpi_setup.h index a88584996f0..5837153d9fd 100644 --- a/chromium/ui/base/win/dpi_setup.h +++ b/chromium/ui/base/win/dpi_setup.h @@ -5,7 +5,7 @@ #ifndef UI_BASE_WIN_DPI_SETUP_H_ #define UI_BASE_WIN_DPI_SETUP_H_ -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { namespace win { @@ -14,7 +14,7 @@ namespace win { // the best available scale based on the screen's pixel density. This can be // affected (overridden) by --force-device-scale-factor=x // This function can be called only once for the lifetime of a process. -UI_EXPORT void InitDeviceScaleFactor(); +UI_BASE_EXPORT void InitDeviceScaleFactor(); } // namespace win } // namespace ui diff --git a/chromium/ui/base/win/foreground_helper.cc b/chromium/ui/base/win/foreground_helper.cc index 219b26fc1fa..72830122ac0 100644 --- a/chromium/ui/base/win/foreground_helper.cc +++ b/chromium/ui/base/win/foreground_helper.cc @@ -43,7 +43,7 @@ HRESULT ForegroundHelper::ForegroundHotKey(HWND window) { hotkey.type = INPUT_KEYBOARD; hotkey.ki.wVk = VK_F22; if (1 != SendInput(1, &hotkey, sizeof(hotkey))) { - LOG(WARNING) << "Failed to send input"; + LOG(WARNING) << "Failed to send input; GetLastError(): " << GetLastError(); return E_FAIL; } @@ -72,13 +72,9 @@ HRESULT ForegroundHelper::ForegroundHotKey(HWND window) { return S_OK; } - // Handle the registered Hotkey being pressed. -LRESULT ForegroundHelper::OnHotKey(UINT message, - WPARAM wparam, - LPARAM lparam, - BOOL& handled) { +// Handle the registered Hotkey being pressed. +void ForegroundHelper::OnHotKey(int id, UINT vcode, UINT modifiers) { SetForegroundWindow(window_); - return 1; } } // namespace ui diff --git a/chromium/ui/base/win/foreground_helper.h b/chromium/ui/base/win/foreground_helper.h index a2d9ea2a541..8387c13b7ee 100644 --- a/chromium/ui/base/win/foreground_helper.h +++ b/chromium/ui/base/win/foreground_helper.h @@ -6,7 +6,7 @@ #define UI_BASE_WIN_FOREGROUND_HELPER_H_ #include "base/logging.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/win/window_impl.h" namespace ui { @@ -18,13 +18,13 @@ namespace ui { // to be capable of moving to the foreground. // // This is probably leveraging a windows bug. -class UI_EXPORT ForegroundHelper : public gfx::WindowImpl { +class UI_BASE_EXPORT ForegroundHelper : public gfx::WindowImpl { public: ForegroundHelper() : window_(NULL) { } - BEGIN_MSG_MAP_EX(ForegroundHelper) - MESSAGE_HANDLER(WM_HOTKEY, OnHotKey) - END_MSG_MAP() + CR_BEGIN_MSG_MAP_EX(ForegroundHelper) + CR_MSG_WM_HOTKEY(OnHotKey) + CR_END_MSG_MAP() // Brings a window into the foreground. // Can be called from any window, even if the caller is not the @@ -35,7 +35,7 @@ class UI_EXPORT ForegroundHelper : public gfx::WindowImpl { HRESULT ForegroundHotKey(HWND window); // Handle the registered Hotkey being pressed. - LRESULT OnHotKey(UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); + void OnHotKey(int id, UINT vcode, UINT modifiers); HWND window_; diff --git a/chromium/ui/base/win/hidden_window.cc b/chromium/ui/base/win/hidden_window.cc index 3b21519597c..d04f2a3f7fa 100644 --- a/chromium/ui/base/win/hidden_window.cc +++ b/chromium/ui/base/win/hidden_window.cc @@ -42,9 +42,9 @@ class TempParent : public gfx::WindowImpl { void OnClose() { } - BEGIN_MSG_MAP_EX(WebContentsViewWin) - MSG_WM_CLOSE(OnClose) - END_MSG_MAP() + CR_BEGIN_MSG_MAP_EX(WebContentsViewWin) + CR_MSG_WM_CLOSE(OnClose) + CR_END_MSG_MAP() }; } // namespace diff --git a/chromium/ui/base/win/hidden_window.h b/chromium/ui/base/win/hidden_window.h index e3189a6a688..6cc2fd0dd6d 100644 --- a/chromium/ui/base/win/hidden_window.h +++ b/chromium/ui/base/win/hidden_window.h @@ -7,13 +7,13 @@ #include <windows.h> -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { // Returns an HWND that can be used as a temporary parent. The returned HWND is // never destroyed. -UI_EXPORT HWND GetHiddenWindow(); +UI_BASE_EXPORT HWND GetHiddenWindow(); } // namespace ui diff --git a/chromium/ui/base/win/hwnd_subclass.cc b/chromium/ui/base/win/hwnd_subclass.cc index 34e2bf4fad6..8628a7c2e8b 100644 --- a/chromium/ui/base/win/hwnd_subclass.cc +++ b/chromium/ui/base/win/hwnd_subclass.cc @@ -142,11 +142,8 @@ LRESULT HWNDSubclass::OnWndProc(HWND hwnd, if (GetTouchInputInfoWrapper(reinterpret_cast<HTOUCHINPUT>(l_param), 1, &point, sizeof(TOUCHINPUT))) { - POINT touch_location = { - TOUCH_COORD_TO_PIXEL(point.x) / - gfx::win::GetUndocumentedDPITouchScale(), - TOUCH_COORD_TO_PIXEL(point.y) / - gfx::win::GetUndocumentedDPITouchScale()}; + POINT touch_location = {TOUCH_COORD_TO_PIXEL(point.x), + TOUCH_COORD_TO_PIXEL(point.y)}; HWND actual_target = WindowFromPoint(touch_location); if (actual_target != hwnd) { return SendMessage(actual_target, message, w_param, l_param); diff --git a/chromium/ui/base/win/hwnd_subclass.h b/chromium/ui/base/win/hwnd_subclass.h index 834a45a376a..0a371cb2c8b 100644 --- a/chromium/ui/base/win/hwnd_subclass.h +++ b/chromium/ui/base/win/hwnd_subclass.h @@ -5,19 +5,19 @@ #ifndef UI_BASE_WIN_HWND_SUBCLASS_H_ #define UI_BASE_WIN_HWND_SUBCLASS_H_ -#include <vector> #include <windows.h> +#include <vector> #include "base/gtest_prod_util.h" #include "base/memory/scoped_ptr.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/base/view_prop.h" namespace ui { // Classes implementing this interface get the opportunity to handle and consume // messages before they are sent to their target HWND. -class UI_EXPORT HWNDMessageFilter { +class UI_BASE_EXPORT HWNDMessageFilter { public: virtual ~HWNDMessageFilter(); @@ -38,7 +38,7 @@ class UI_EXPORT HWNDMessageFilter { // An object that instance-subclasses a window. If the window has already been // instance-subclassed, that subclassing is lost. -class UI_EXPORT HWNDSubclass { +class UI_BASE_EXPORT HWNDSubclass { public: ~HWNDSubclass(); diff --git a/chromium/ui/base/win/internal_constants.cc b/chromium/ui/base/win/internal_constants.cc new file mode 100644 index 00000000000..325ab90468b --- /dev/null +++ b/chromium/ui/base/win/internal_constants.cc @@ -0,0 +1,13 @@ +// Copyright (c) 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/win/internal_constants.h" + +namespace ui { + +const wchar_t kIgnoreTouchMouseActivateForWindow[] = + L"Chrome.IgnoreMouseActivate"; + +} // namespace ui + diff --git a/chromium/ui/base/win/internal_constants.h b/chromium/ui/base/win/internal_constants.h new file mode 100644 index 00000000000..d81c34de4f1 --- /dev/null +++ b/chromium/ui/base/win/internal_constants.h @@ -0,0 +1,20 @@ +// Copyright (c) 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_WIN_INTERNAL_CONSTANTS_H_ +#define UI_BASE_WIN_INTERNAL_CONSTANTS_H_ + +#include "ui/base/ui_base_export.h" + +namespace ui { + +// This window property if set on the window does not activate the window for a +// touch based WM_MOUSEACTIVATE message. +UI_BASE_EXPORT extern const wchar_t kIgnoreTouchMouseActivateForWindow[]; + +} // namespace ui + +#endif // UI_BASE_WIN_INTERNAL_CONSTANTS_H_ + + diff --git a/chromium/ui/base/win/lock_state.h b/chromium/ui/base/win/lock_state.h index 637be034a50..be9c912678a 100644 --- a/chromium/ui/base/win/lock_state.h +++ b/chromium/ui/base/win/lock_state.h @@ -6,12 +6,12 @@ #define UI_BASE_WIN_LOCK_STATE_H_ #include "base/basictypes.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { // Returns true if the screen is currently locked. -UI_EXPORT bool IsWorkstationLocked(); +UI_BASE_EXPORT bool IsWorkstationLocked(); } // namespace ui diff --git a/chromium/ui/base/win/message_box_win.cc b/chromium/ui/base/win/message_box_win.cc index c78e98baf66..6500f986163 100644 --- a/chromium/ui/base/win/message_box_win.cc +++ b/chromium/ui/base/win/message_box_win.cc @@ -14,8 +14,8 @@ namespace ui { // RTL locale, we need to make sure that LTR strings are rendered correctly by // adding the appropriate Unicode directionality marks. int MessageBox(HWND hwnd, - const string16& text, - const string16& caption, + const base::string16& text, + const base::string16& caption, UINT flags) { if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoMessageBox)) return IDOK; @@ -24,11 +24,11 @@ int MessageBox(HWND hwnd, if (base::i18n::IsRTL()) actual_flags |= MB_RIGHT | MB_RTLREADING; - string16 localized_text = text; + base::string16 localized_text = text; base::i18n::AdjustStringForLocaleDirection(&localized_text); const wchar_t* text_ptr = localized_text.c_str(); - string16 localized_caption = caption; + base::string16 localized_caption = caption; base::i18n::AdjustStringForLocaleDirection(&localized_caption); const wchar_t* caption_ptr = localized_caption.c_str(); diff --git a/chromium/ui/base/win/message_box_win.h b/chromium/ui/base/win/message_box_win.h index a91c00f7a37..f48bec3e4fa 100644 --- a/chromium/ui/base/win/message_box_win.h +++ b/chromium/ui/base/win/message_box_win.h @@ -8,7 +8,7 @@ #include <windows.h> #include "base/strings/string16.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { @@ -16,10 +16,10 @@ namespace ui { // MessageBox function allows us to control certain RTL locale flags so that // callers don't have to worry about adding these flags when running in a // right-to-left locale. -UI_EXPORT int MessageBox(HWND hwnd, - const string16& text, - const string16& caption, - UINT flags); +UI_BASE_EXPORT int MessageBox(HWND hwnd, + const base::string16& text, + const base::string16& caption, + UINT flags); } // namespace ui diff --git a/chromium/ui/base/win/mouse_wheel_util.h b/chromium/ui/base/win/mouse_wheel_util.h index d6266d7b3e6..b9f5872b0c4 100644 --- a/chromium/ui/base/win/mouse_wheel_util.h +++ b/chromium/ui/base/win/mouse_wheel_util.h @@ -7,7 +7,7 @@ #include <windows.h> -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { @@ -17,7 +17,7 @@ class ViewProp; // We reroute the mouse wheel messages to such HWND when they are under the // mouse pointer (but are not the active window). Callers own the returned // object. -UI_EXPORT ViewProp* SetWindowSupportsRerouteMouseWheel(HWND hwnd); +UI_BASE_EXPORT ViewProp* SetWindowSupportsRerouteMouseWheel(HWND hwnd); // Forwards mouse wheel messages to the window under it. // Windows sends mouse wheel messages to the currently active window. @@ -26,8 +26,9 @@ UI_EXPORT ViewProp* SetWindowSupportsRerouteMouseWheel(HWND hwnd); // mouse wheel in order to scroll that window. This is arguably a better user // experience. The returns value says whether the mouse wheel message was // successfully redirected. -UI_EXPORT bool RerouteMouseWheel(HWND window, WPARAM w_param, - LPARAM l_param); +UI_BASE_EXPORT bool RerouteMouseWheel(HWND window, + WPARAM w_param, + LPARAM l_param); } // namespace ui diff --git a/chromium/ui/base/win/scoped_ole_initializer.h b/chromium/ui/base/win/scoped_ole_initializer.h index 6b115f9a3ab..b2e81d22c41 100644 --- a/chromium/ui/base/win/scoped_ole_initializer.h +++ b/chromium/ui/base/win/scoped_ole_initializer.h @@ -8,11 +8,11 @@ #include <ole2.h> #include "base/basictypes.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { -class UI_EXPORT ScopedOleInitializer { +class UI_BASE_EXPORT ScopedOleInitializer { public: ScopedOleInitializer(); ~ScopedOleInitializer(); diff --git a/chromium/ui/base/win/shell.cc b/chromium/ui/base/win/shell.cc index ff1a4ffec41..7866e713a88 100644 --- a/chromium/ui/base/win/shell.cc +++ b/chromium/ui/base/win/shell.cc @@ -24,7 +24,7 @@ namespace win { // Show the Windows "Open With" dialog box to ask the user to pick an app to // open the file with. -bool OpenItemWithExternalApp(const string16& full_path) { +bool OpenItemWithExternalApp(const base::string16& full_path) { SHELLEXECUTEINFO sei = { sizeof(sei) }; sei.fMask = SEE_MASK_FLAG_DDEWAIT; sei.nShow = SW_SHOWNORMAL; @@ -33,9 +33,9 @@ bool OpenItemWithExternalApp(const string16& full_path) { return (TRUE == ::ShellExecuteExW(&sei)); } -bool OpenAnyViaShell(const string16& full_path, - const string16& directory, - const string16& args, +bool OpenAnyViaShell(const base::string16& full_path, + const base::string16& directory, + const base::string16& args, DWORD mask) { SHELLEXECUTEINFO sei = { sizeof(sei) }; sei.fMask = mask; @@ -54,11 +54,11 @@ bool OpenAnyViaShell(const string16& full_path, bool OpenItemViaShell(const base::FilePath& full_path) { return OpenAnyViaShell(full_path.value(), full_path.DirName().value(), - string16(), 0); + base::string16(), 0); } bool OpenItemViaShellNoZoneCheck(const base::FilePath& full_path) { - return OpenAnyViaShell(full_path.value(), string16(), string16(), + return OpenAnyViaShell(full_path.value(), base::string16(), base::string16(), SEE_MASK_NOZONECHECKS | SEE_MASK_FLAG_DDEWAIT); } @@ -80,10 +80,10 @@ bool PreventWindowFromPinning(HWND hwnd) { // TODO(calamity): investigate moving this out of the UI thread as COM // operations may spawn nested message loops which can cause issues. -void SetAppDetailsForWindow(const string16& app_id, - const string16& app_icon, - const string16& relaunch_command, - const string16& relaunch_display_name, +void SetAppDetailsForWindow(const base::string16& app_id, + const base::string16& app_icon, + const base::string16& relaunch_command, + const base::string16& relaunch_display_name, HWND hwnd) { // This functionality is only available on Win7+. It also doesn't make sense // to do this for Chrome Metro. @@ -112,19 +112,27 @@ void SetAppDetailsForWindow(const string16& app_id, } } -void SetAppIdForWindow(const string16& app_id, HWND hwnd) { - SetAppDetailsForWindow(app_id, string16(), string16(), string16(), hwnd); +void SetAppIdForWindow(const base::string16& app_id, HWND hwnd) { + SetAppDetailsForWindow(app_id, + base::string16(), + base::string16(), + base::string16(), + hwnd); } -void SetAppIconForWindow(const string16& app_icon, HWND hwnd) { - SetAppDetailsForWindow(string16(), app_icon, string16(), string16(), hwnd); +void SetAppIconForWindow(const base::string16& app_icon, HWND hwnd) { + SetAppDetailsForWindow(base::string16(), + app_icon, + base::string16(), + base::string16(), + hwnd); } -void SetRelaunchDetailsForWindow(const string16& relaunch_command, - const string16& display_name, +void SetRelaunchDetailsForWindow(const base::string16& relaunch_command, + const base::string16& display_name, HWND hwnd) { - SetAppDetailsForWindow(string16(), - string16(), + SetAppDetailsForWindow(base::string16(), + base::string16(), relaunch_command, display_name, hwnd); diff --git a/chromium/ui/base/win/shell.h b/chromium/ui/base/win/shell.h index e85d2b43fdc..e732abf8c54 100644 --- a/chromium/ui/base/win/shell.h +++ b/chromium/ui/base/win/shell.h @@ -8,7 +8,7 @@ #include <windows.h> #include "base/strings/string16.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace base { class FilePath; @@ -21,58 +21,62 @@ namespace win { // default application registered for the file specified by 'full_path', // ask the user, via the Windows "Open With" dialog. // Returns 'true' on successful open, 'false' otherwise. -UI_EXPORT bool OpenItemViaShell(const base::FilePath& full_path); +UI_BASE_EXPORT bool OpenItemViaShell(const base::FilePath& full_path); // The download manager now writes the alternate data stream with the // zone on all downloads. This function is equivalent to OpenItemViaShell // without showing the zone warning dialog. -UI_EXPORT bool OpenItemViaShellNoZoneCheck(const base::FilePath& full_path); +UI_BASE_EXPORT bool OpenItemViaShellNoZoneCheck( + const base::FilePath& full_path); // Lower level function that allows opening of non-files like urls or GUIDs // don't use it if one of the above will do. |mask| is a valid combination // of SEE_MASK_FLAG_XXX as stated in msdn. If there is no default application // registered for the item, it behaves the same as OpenItemViaShell. -UI_EXPORT bool OpenAnyViaShell(const string16& full_path, - const string16& directory, - const string16& args, - DWORD mask); +UI_BASE_EXPORT bool OpenAnyViaShell(const base::string16& full_path, + const base::string16& directory, + const base::string16& args, + DWORD mask); // Ask the user, via the Windows "Open With" dialog, for an application to use // to open the file specified by 'full_path'. // Returns 'true' on successful open, 'false' otherwise. -bool OpenItemWithExternalApp(const string16& full_path); +bool OpenItemWithExternalApp(const base::string16& full_path); // Disables the ability of the specified window to be pinned to the taskbar or // the Start menu. This will remove "Pin this program to taskbar" from the // taskbar menu of the specified window. -UI_EXPORT bool PreventWindowFromPinning(HWND hwnd); +UI_BASE_EXPORT bool PreventWindowFromPinning(HWND hwnd); // Sets the application id, app icon, relaunch command and relaunch display name // for the given window. -UI_EXPORT void SetAppDetailsForWindow(const string16& app_id, - const string16& app_icon, - const string16& relaunch_command, - const string16& relaunch_display_name, - HWND hwnd); +UI_BASE_EXPORT void SetAppDetailsForWindow( + const base::string16& app_id, + const base::string16& app_icon, + const base::string16& relaunch_command, + const base::string16& relaunch_display_name, + HWND hwnd); // Sets the application id given as the Application Model ID for the window // specified. This method is used to insure that different web applications // do not group together on the Win7 task bar. -UI_EXPORT void SetAppIdForWindow(const string16& app_id, HWND hwnd); +UI_BASE_EXPORT void SetAppIdForWindow(const base::string16& app_id, HWND hwnd); // Sets the application icon for the window specified. -UI_EXPORT void SetAppIconForWindow(const string16& app_icon, HWND hwnd); +UI_BASE_EXPORT void SetAppIconForWindow(const base::string16& app_icon, + HWND hwnd); // Sets the relaunch command and relaunch display name for the window specified. // Windows will use this information for grouping on the taskbar, and to create // a shortcut if the window is pinned to the taskbar. -UI_EXPORT void SetRelaunchDetailsForWindow(const string16& relaunch_command, - const string16& display_name, - HWND hwnd); +UI_BASE_EXPORT void SetRelaunchDetailsForWindow( + const base::string16& relaunch_command, + const base::string16& display_name, + HWND hwnd); // Returns true if composition is available and turned on on the current // platform. -UI_EXPORT bool IsAeroGlassEnabled(); +UI_BASE_EXPORT bool IsAeroGlassEnabled(); } // namespace win } // namespace ui diff --git a/chromium/ui/base/win/touch_input.cc b/chromium/ui/base/win/touch_input.cc index a369ab1f670..0114bdd3a7f 100644 --- a/chromium/ui/base/win/touch_input.cc +++ b/chromium/ui/base/win/touch_input.cc @@ -6,10 +6,10 @@ namespace ui { -UI_EXPORT BOOL GetTouchInputInfoWrapper(HTOUCHINPUT handle, - UINT count, - PTOUCHINPUT pointer, - int size) { +BOOL GetTouchInputInfoWrapper(HTOUCHINPUT handle, + UINT count, + PTOUCHINPUT pointer, + int size) { typedef BOOL(WINAPI *GetTouchInputInfoPtr)(HTOUCHINPUT, UINT, PTOUCHINPUT, int); static GetTouchInputInfoPtr get_touch_input_info_func = diff --git a/chromium/ui/base/win/touch_input.h b/chromium/ui/base/win/touch_input.h index dd0d82916b5..f113ec5b463 100644 --- a/chromium/ui/base/win/touch_input.h +++ b/chromium/ui/base/win/touch_input.h @@ -7,16 +7,16 @@ #include <windows.h> -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { // Wrapper for GetTouchInputInfo, which is not defined before Win7. For // earlier OS's, this function returns FALSE. -UI_EXPORT BOOL GetTouchInputInfoWrapper(HTOUCHINPUT handle, - UINT count, - PTOUCHINPUT pointer, - int size); +UI_BASE_EXPORT BOOL GetTouchInputInfoWrapper(HTOUCHINPUT handle, + UINT count, + PTOUCHINPUT pointer, + int size); } // namespace ui diff --git a/chromium/ui/base/win/window_event_target.cc b/chromium/ui/base/win/window_event_target.cc new file mode 100644 index 00000000000..555cd5af333 --- /dev/null +++ b/chromium/ui/base/win/window_event_target.cc @@ -0,0 +1,16 @@ +// Copyright (c) 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/win/window_event_target.h" + +namespace ui { + +const char WindowEventTarget::kWin32InputEventTarget[] + = "Win32_InputEventTarget"; + +WindowEventTarget::WindowEventTarget() {} + +WindowEventTarget::~WindowEventTarget() {} + +} // namespace ui diff --git a/chromium/ui/base/win/window_event_target.h b/chromium/ui/base/win/window_event_target.h new file mode 100644 index 00000000000..c7bb6700d8c --- /dev/null +++ b/chromium/ui/base/win/window_event_target.h @@ -0,0 +1,71 @@ +// Copyright (c) 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_WIN_WINDOW_EVENT_TARGET_H_ +#define UI_BASE_WIN_WINDOW_EVENT_TARGET_H_ + +#include <windows.h> + +#include "base/basictypes.h" +#include "ui/base/ui_base_export.h" + +namespace ui { + +// This interface is implemented by classes who get input events forwarded to +// them from others. E.g. would be a win32 parent child relationship where the +// child forwards input events to the parent after doing minimal processing. +class UI_BASE_EXPORT WindowEventTarget { + public: + static const char kWin32InputEventTarget[]; + + // Handles mouse events like WM_MOUSEMOVE, WM_LBUTTONDOWN, etc. + // The |message| parameter identifies the message. + // The |w_param| and |l_param| values are dependent on the type of the + // message. + // Returns the result of processing the message. + virtual LRESULT HandleMouseMessage(unsigned int message, + WPARAM w_param, + LPARAM l_param) = 0; + + // Handles keyboard events like WM_KEYDOWN/WM_KEYUP, etc. + // The |message| parameter identifies the message. + // The |w_param| and |l_param| values are dependent on the type of the + // message. + // Returns the result of processing the message. + virtual LRESULT HandleKeyboardMessage(unsigned int message, + WPARAM w_param, + LPARAM l_param) = 0; + + // Handles WM_TOUCH events. + // The |message| parameter identifies the message. + // The |w_param| and |l_param| values are as per MSDN docs. + // Returns the result of processing the message. + virtual LRESULT HandleTouchMessage(unsigned int message, + WPARAM w_param, + LPARAM l_param) = 0; + + // Handles scroll messages like WM_VSCROLL and WM_HSCROLL. + // The |message| parameter identifies the scroll message. + // The |w_param| and |l_param| values are dependent on the type of scroll. + virtual LRESULT HandleScrollMessage(unsigned int message, + WPARAM w_param, + LPARAM l_param) = 0; + + // Handles the WM_NCHITTEST message + // The |message| parameter identifies the message. + // The |w_param| and |l_param| values are as per MSDN docs. + // Returns the result of processing the message. + virtual LRESULT HandleNcHitTestMessage(unsigned int message, + WPARAM w_param, + LPARAM l_param) = 0; + protected: + WindowEventTarget(); + virtual ~WindowEventTarget(); +}; + +} // namespace ui + +#endif // UI_BASE_WIN_WINDOW_EVENT_TARGET_H_ + + diff --git a/chromium/ui/base/window_open_disposition.h b/chromium/ui/base/window_open_disposition.h index 8d9662947f1..fe96aac5f07 100644 --- a/chromium/ui/base/window_open_disposition.h +++ b/chromium/ui/base/window_open_disposition.h @@ -5,7 +5,7 @@ #ifndef UI_BASE_WINDOW_OPEN_DISPOSITION_H_ #define UI_BASE_WINDOW_OPEN_DISPOSITION_H_ -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" enum WindowOpenDisposition { @@ -20,16 +20,16 @@ namespace ui { // Translates event flags from a click on a link into the user's desired // window disposition. For example, a middle click would mean to open // a background tab. -UI_EXPORT WindowOpenDisposition DispositionFromClick(bool middle_button, - bool alt_key, - bool ctrl_key, - bool meta_key, - bool shift_key); +UI_BASE_EXPORT WindowOpenDisposition DispositionFromClick(bool middle_button, + bool alt_key, + bool ctrl_key, + bool meta_key, + bool shift_key); // Translates event flags into what kind of disposition they represents. // For example, a middle click would mean to open a background tab. // event_flags are the flags as understood by ui::MouseEvent. -UI_EXPORT WindowOpenDisposition DispositionFromEventFlags(int event_flags); +UI_BASE_EXPORT WindowOpenDisposition DispositionFromEventFlags(int event_flags); } // namespace ui diff --git a/chromium/ui/base/window_open_disposition_list.h b/chromium/ui/base/window_open_disposition_list.h index f7676f118e3..1d3c97b37e4 100644 --- a/chromium/ui/base/window_open_disposition_list.h +++ b/chromium/ui/base/window_open_disposition_list.h @@ -17,3 +17,5 @@ WINDOW_OPEN_DISPOSITION(NEW_WINDOW, 7) WINDOW_OPEN_DISPOSITION(SAVE_TO_DISK, 8) WINDOW_OPEN_DISPOSITION(OFF_THE_RECORD, 9) WINDOW_OPEN_DISPOSITION(IGNORE_ACTION, 10) +// Update when adding a new disposition. +WINDOW_OPEN_DISPOSITION(WINDOW_OPEN_DISPOSITION_LAST, 10) diff --git a/chromium/ui/base/work_area_watcher_observer.h b/chromium/ui/base/work_area_watcher_observer.h index 63fbf87d7e0..341eda0b9e6 100644 --- a/chromium/ui/base/work_area_watcher_observer.h +++ b/chromium/ui/base/work_area_watcher_observer.h @@ -5,14 +5,14 @@ #ifndef UI_BASE_WORK_AREA_WATCHER_OBSERVER_H_ #define UI_BASE_WORK_AREA_WATCHER_OBSERVER_H_ -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { // This interface should be implemented by classes that want to be notified // when the work area has changed due to something like screen resolution or // taskbar changes. -class UI_EXPORT WorkAreaWatcherObserver { +class UI_BASE_EXPORT WorkAreaWatcherObserver { public: virtual void WorkAreaChanged() = 0; diff --git a/chromium/ui/base/x/active_window_watcher_x.cc b/chromium/ui/base/x/active_window_watcher_x.cc deleted file mode 100644 index 9d3e791fd53..00000000000 --- a/chromium/ui/base/x/active_window_watcher_x.cc +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/x/active_window_watcher_x.h" - -#include <gdk/gdk.h> -#include <gdk/gdkx.h> - -#include "base/memory/singleton.h" -#include "ui/base/x/active_window_watcher_x_observer.h" -#include "ui/base/x/root_window_property_watcher_x.h" -#include "ui/base/x/x11_util.h" -#include "ui/gfx/gdk_compat.h" -#include "ui/gfx/gtk_compat.h" - -namespace ui { - -static const char* const kNetActiveWindow = "_NET_ACTIVE_WINDOW"; - -// static -ActiveWindowWatcherX* ActiveWindowWatcherX::GetInstance() { - return Singleton<ActiveWindowWatcherX>::get(); -} - -// static -void ActiveWindowWatcherX::AddObserver(ActiveWindowWatcherXObserver* observer) { - // Ensure that RootWindowPropertyWatcherX exists. - internal::RootWindowPropertyWatcherX::GetInstance(); - GetInstance()->observers_.AddObserver(observer); -} - -// static -void ActiveWindowWatcherX::RemoveObserver( - ActiveWindowWatcherXObserver* observer) { - GetInstance()->observers_.RemoveObserver(observer); -} - -// static -Atom ActiveWindowWatcherX::GetPropertyAtom() { - return GetAtom(kNetActiveWindow); -} - -// static -void ActiveWindowWatcherX::Notify() { - GetInstance()->NotifyActiveWindowChanged(); -} - -// static -bool ActiveWindowWatcherX::WMSupportsActivation() { - return gdk_x11_screen_supports_net_wm_hint( - gdk_screen_get_default(), - gdk_atom_intern_static_string(kNetActiveWindow)); -} - -ActiveWindowWatcherX::ActiveWindowWatcherX() { -} - -ActiveWindowWatcherX::~ActiveWindowWatcherX() { -} - -void ActiveWindowWatcherX::NotifyActiveWindowChanged() { - // We don't use gdk_screen_get_active_window() because it caches - // whether or not the window manager supports _NET_ACTIVE_WINDOW. - // This causes problems at startup for chromiumos. - Atom type = None; - int format = 0; // size in bits of each item in 'property' - long unsigned int num_items = 0, remaining_bytes = 0; - unsigned char* property = NULL; - - XGetWindowProperty(gdk_x11_get_default_xdisplay(), - GDK_WINDOW_XID(gdk_get_default_root_window()), - GetAtom(kNetActiveWindow), - 0, // offset into property data to read - 1, // length to get in 32-bit quantities - False, // deleted - AnyPropertyType, - &type, - &format, - &num_items, - &remaining_bytes, - &property); - - // Check that the property was set and contained a single 32-bit item (we - // don't check that remaining_bytes is 0, though, as XFCE's window manager - // seems to actually store two values in the property for some unknown - // reason.) - if (format == 32 && num_items == 1) { - int xid = *reinterpret_cast<int*>(property); - GdkDisplay* display = gdk_display_get_default(); - GdkWindow* active_window = gdk_x11_window_lookup_for_display(display, xid); - FOR_EACH_OBSERVER(ActiveWindowWatcherXObserver, observers_, - ActiveWindowChanged(active_window)); - } - if (property) - XFree(property); -} - -} // namespace ui diff --git a/chromium/ui/base/x/active_window_watcher_x.h b/chromium/ui/base/x/active_window_watcher_x.h deleted file mode 100644 index 9e0ae134e15..00000000000 --- a/chromium/ui/base/x/active_window_watcher_x.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_X_ACTIVE_WINDOW_WATCHER_X_H_ -#define UI_BASE_X_ACTIVE_WINDOW_WATCHER_X_H_ - -#include "base/basictypes.h" -#include "base/observer_list.h" -#include "ui/base/ui_export.h" -#include "ui/base/x/x11_util.h" - -template <typename T> struct DefaultSingletonTraits; - -namespace ui { - -class ActiveWindowWatcherXObserver; - -namespace internal { -class RootWindowPropertyWatcherX; -} - -// This is a helper class that is used to keep track of which window the X -// window manager thinks is active. Add an Observer to listen for changes to -// the active window. -class UI_EXPORT ActiveWindowWatcherX { - public: - static ActiveWindowWatcherX* GetInstance(); - static void AddObserver(ActiveWindowWatcherXObserver* observer); - static void RemoveObserver(ActiveWindowWatcherXObserver* observer); - - // Checks if the WM supports the active window property. Note that the return - // value can change, especially during system startup. - static bool WMSupportsActivation(); - - private: - friend struct DefaultSingletonTraits<ActiveWindowWatcherX>; - friend class ui::internal::RootWindowPropertyWatcherX; - - ActiveWindowWatcherX(); - ~ActiveWindowWatcherX(); - - // Gets the atom for the default display for the property this class is - // watching for. - static Atom GetPropertyAtom(); - - // Notify observers that the active window has changed. - static void Notify(); - - // Instance method that implements Notify(). - void NotifyActiveWindowChanged(); - - ObserverList<ActiveWindowWatcherXObserver> observers_; - - DISALLOW_COPY_AND_ASSIGN(ActiveWindowWatcherX); -}; - -} // namespace ui - -#endif // UI_BASE_X_ACTIVE_WINDOW_WATCHER_X_H_ diff --git a/chromium/ui/base/x/active_window_watcher_x_observer.h b/chromium/ui/base/x/active_window_watcher_x_observer.h deleted file mode 100644 index e4c71eae47d..00000000000 --- a/chromium/ui/base/x/active_window_watcher_x_observer.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_X_ACTIVE_WINDOW_WATCHER_X_OBSERVER_H_ -#define UI_BASE_X_ACTIVE_WINDOW_WATCHER_X_OBSERVER_H_ - -#include <gdk/gdk.h> - -#include "ui/base/ui_export.h" - -namespace ui { - -class UI_EXPORT ActiveWindowWatcherXObserver { - public: - // |active_window| will be NULL if the active window isn't one of Chrome's. - virtual void ActiveWindowChanged(GdkWindow* active_window) = 0; - - protected: - virtual ~ActiveWindowWatcherXObserver() {} -}; - -} // namespace ui - -#endif // UI_BASE_X_ACTIVE_WINDOW_WATCHER_X_OBSERVER_H_ diff --git a/chromium/ui/base/x/root_window_property_watcher_x.cc b/chromium/ui/base/x/root_window_property_watcher_x.cc deleted file mode 100644 index dec47e2a1db..00000000000 --- a/chromium/ui/base/x/root_window_property_watcher_x.cc +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/x/root_window_property_watcher_x.h" - -#include <gdk/gdk.h> -#include <gdk/gdkx.h> - -#include "base/memory/singleton.h" -#include "ui/base/x/active_window_watcher_x.h" -#include "ui/base/x/work_area_watcher_x.h" - -namespace ui { - -namespace internal { - -// static -RootWindowPropertyWatcherX* RootWindowPropertyWatcherX::GetInstance() { - return Singleton<RootWindowPropertyWatcherX>::get(); -} - -RootWindowPropertyWatcherX::RootWindowPropertyWatcherX() { - GdkWindow* root = gdk_get_default_root_window(); - - // Set up X Event filter to listen for PropertyChange X events. - // Don't use XSelectInput directly here, as gdk internally seems to cache the - // mask and reapply XSelectInput after this, resetting any mask we set here. - gdk_window_set_events(root, - static_cast<GdkEventMask>(gdk_window_get_events(root) | - GDK_PROPERTY_CHANGE_MASK)); - gdk_window_add_filter(root, - &RootWindowPropertyWatcherX::OnWindowXEventThunk, - this); -} - -RootWindowPropertyWatcherX::~RootWindowPropertyWatcherX() { - gdk_window_remove_filter(NULL, - &RootWindowPropertyWatcherX::OnWindowXEventThunk, - this); -} - -GdkFilterReturn RootWindowPropertyWatcherX::OnWindowXEvent( - GdkXEvent* xevent, GdkEvent* event) { - XEvent* xev = static_cast<XEvent*>(xevent); - - if (xev->xany.type == PropertyNotify) { - if (xev->xproperty.atom == ActiveWindowWatcherX::GetPropertyAtom()) - ActiveWindowWatcherX::Notify(); - else if (xev->xproperty.atom == WorkAreaWatcherX::GetPropertyAtom()) - WorkAreaWatcherX::Notify(); - } - - return GDK_FILTER_CONTINUE; -} - -} // namespace internal - -} // namespace ui diff --git a/chromium/ui/base/x/root_window_property_watcher_x.h b/chromium/ui/base/x/root_window_property_watcher_x.h deleted file mode 100644 index 76090162f7f..00000000000 --- a/chromium/ui/base/x/root_window_property_watcher_x.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_X_ROOT_WINDOW_PROPERTY_WATCHER_X_H_ -#define UI_BASE_X_ROOT_WINDOW_PROPERTY_WATCHER_X_H_ - -#include <gdk/gdk.h> - -#include "base/basictypes.h" -#include "ui/base/gtk/gtk_signal.h" - -template <typename T> struct DefaultSingletonTraits; - -namespace ui { -namespace internal { - -// This class keeps track of changes to properties on the root window. This is -// not to be used directly. Implement a watcher for the specific property you're -// interested in. -class RootWindowPropertyWatcherX { - public: - static RootWindowPropertyWatcherX* GetInstance(); - - private: - friend struct DefaultSingletonTraits<RootWindowPropertyWatcherX>; - - RootWindowPropertyWatcherX(); - ~RootWindowPropertyWatcherX(); - - // Callback for PropertyChange XEvents. - CHROMEG_CALLBACK_1(RootWindowPropertyWatcherX, GdkFilterReturn, - OnWindowXEvent, GdkXEvent*, GdkEvent*); - - DISALLOW_COPY_AND_ASSIGN(RootWindowPropertyWatcherX); -}; - -} // namespace internal -} // namespace ui - -#endif // UI_BASE_X_ROOT_WINDOW_PROPERTY_WATCHER_X_H_ diff --git a/chromium/ui/base/x/selection_owner.cc b/chromium/ui/base/x/selection_owner.cc index 54f59a162d4..c30187e1991 100644 --- a/chromium/ui/base/x/selection_owner.cc +++ b/chromium/ui/base/x/selection_owner.cc @@ -9,20 +9,67 @@ #include "base/logging.h" #include "ui/base/x/selection_utils.h" +#include "ui/base/x/x11_util.h" namespace ui { namespace { +const char kAtomPair[] = "ATOM_PAIR"; const char kMultiple[] = "MULTIPLE"; +const char kSaveTargets[] = "SAVE_TARGETS"; const char kTargets[] = "TARGETS"; const char* kAtomsToCache[] = { + kAtomPair, kMultiple, + kSaveTargets, kTargets, NULL }; +// Gets the value of an atom pair array property. On success, true is returned +// and the value is stored in |value|. +bool GetAtomPairArrayProperty(XID window, + Atom property, + std::vector<std::pair<Atom,Atom> >* value) { + Atom type = None; + int format = 0; // size in bits of each item in 'property' + unsigned long num_items = 0; + unsigned char* properties = NULL; + unsigned long remaining_bytes = 0; + + int result = XGetWindowProperty(gfx::GetXDisplay(), + window, + property, + 0, // offset into property data to + // read + (~0L), // entire array + False, // deleted + AnyPropertyType, + &type, + &format, + &num_items, + &remaining_bytes, + &properties); + + if (result != Success) + return false; + + // GTK does not require |type| to be kAtomPair. + if (format != 32 || num_items % 2 != 0) { + XFree(properties); + return false; + } + + Atom* atom_properties = reinterpret_cast<Atom*>(properties); + value->clear(); + for (size_t i = 0; i < num_items; i+=2) + value->push_back(std::make_pair(atom_properties[i], atom_properties[i+1])); + XFree(properties); + return true; +} + } // namespace SelectionOwner::SelectionOwner(Display* x_display, @@ -35,11 +82,14 @@ SelectionOwner::SelectionOwner(Display* x_display, } SelectionOwner::~SelectionOwner() { - Clear(); + // If we are the selection owner, we need to release the selection so we + // don't receive further events. However, we don't call ClearSelectionOwner() + // because we don't want to do this indiscriminately. + if (XGetSelectionOwner(x_display_, selection_name_) == x_window_) + XSetSelectionOwner(x_display_, selection_name_, None, CurrentTime); } void SelectionOwner::RetrieveTargets(std::vector<Atom>* targets) { - targets->clear(); for (SelectionFormatMap::const_iterator it = format_map_.begin(); it != format_map_.end(); ++it) { targets->push_back(it->first); @@ -56,10 +106,8 @@ void SelectionOwner::TakeOwnershipOfSelection( } } -void SelectionOwner::Clear() { - if (XGetSelectionOwner(x_display_, selection_name_) == x_window_) - XSetSelectionOwner(x_display_, selection_name_, None, CurrentTime); - +void SelectionOwner::ClearSelectionOwner() { + XSetSelectionOwner(x_display_, selection_name_, None, CurrentTime); format_map_ = SelectionFormatMap(); } @@ -74,51 +122,93 @@ void SelectionOwner::OnSelectionRequest(const XSelectionRequestEvent& event) { reply.xselection.property = None; // Indicates failure reply.xselection.time = event.time; - // Get the proper selection. + if (event.target == atom_cache_.GetAtom(kMultiple)) { + // The contents of |event.property| should be a list of + // <target,property> pairs. + std::vector<std::pair<Atom,Atom> > conversions; + if (GetAtomPairArrayProperty(event.requestor, + event.property, + &conversions)) { + std::vector<Atom> conversion_results; + for (size_t i = 0; i < conversions.size(); ++i) { + bool conversion_successful = ProcessTarget(conversions[i].first, + event.requestor, + conversions[i].second); + conversion_results.push_back(conversions[i].first); + conversion_results.push_back( + conversion_successful ? conversions[i].second : None); + } + + // Set the property to indicate which conversions succeeded. This matches + // what GTK does. + XChangeProperty( + x_display_, + event.requestor, + event.property, + atom_cache_.GetAtom(kAtomPair), + 32, + PropModeReplace, + reinterpret_cast<const unsigned char*>(&conversion_results.front()), + conversion_results.size()); + + reply.xselection.property = event.property; + } + } else { + if (ProcessTarget(event.target, event.requestor, event.property)) + reply.xselection.property = event.property; + } + + // Send off the reply. + XSendEvent(x_display_, event.requestor, False, 0, &reply); +} + +void SelectionOwner::OnSelectionClear(const XSelectionClearEvent& event) { + DLOG(ERROR) << "SelectionClear"; + + // TODO(erg): If we receive a SelectionClear event while we're handling data, + // we need to delay clearing. +} + +bool SelectionOwner::ProcessTarget(Atom target, + ::Window requestor, + ::Atom property) { + Atom multiple_atom = atom_cache_.GetAtom(kMultiple); + Atom save_targets_atom = atom_cache_.GetAtom(kSaveTargets); Atom targets_atom = atom_cache_.GetAtom(kTargets); - if (event.target == targets_atom) { + + if (target == multiple_atom || target == save_targets_atom) + return false; + + if (target == targets_atom) { // We have been asked for TARGETS. Send an atom array back with the data // types we support. std::vector<Atom> targets; targets.push_back(targets_atom); + targets.push_back(save_targets_atom); + targets.push_back(multiple_atom); RetrieveTargets(&targets); - XChangeProperty(x_display_, event.requestor, event.property, XA_ATOM, 32, + XChangeProperty(x_display_, requestor, property, XA_ATOM, 32, PropModeReplace, reinterpret_cast<unsigned char*>(&targets.front()), targets.size()); - reply.xselection.property = event.property; - } else if (event.target == atom_cache_.GetAtom(kMultiple)) { - // TODO(erg): Theoretically, the spec claims I'm supposed to handle the - // MULTIPLE case, but I haven't seen it in the wild yet. - NOTIMPLEMENTED(); + return true; } else { // Try to find the data type in map. - SelectionFormatMap::const_iterator it = - format_map_.find(event.target); + SelectionFormatMap::const_iterator it = format_map_.find(target); if (it != format_map_.end()) { - XChangeProperty(x_display_, event.requestor, event.property, - event.target, 8, + XChangeProperty(x_display_, requestor, property, target, 8, PropModeReplace, const_cast<unsigned char*>( reinterpret_cast<const unsigned char*>( it->second->front())), it->second->size()); - reply.xselection.property = event.property; + return true; } // I would put error logging here, but GTK ignores TARGETS and spams us // looking for its own internal types. } - - // Send off the reply. - XSendEvent(x_display_, event.requestor, False, 0, &reply); -} - -void SelectionOwner::OnSelectionClear(const XSelectionClearEvent& event) { - DLOG(ERROR) << "SelectionClear"; - - // TODO(erg): If we receive a SelectionClear event while we're handling data, - // we need to delay clearing. + return false; } } // namespace ui diff --git a/chromium/ui/base/x/selection_owner.h b/chromium/ui/base/x/selection_owner.h index 8cecc621cc8..81d7e73a1f4 100644 --- a/chromium/ui/base/x/selection_owner.h +++ b/chromium/ui/base/x/selection_owner.h @@ -14,7 +14,7 @@ #include "base/basictypes.h" #include "base/callback.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/base/x/selection_utils.h" #include "ui/gfx/x/x11_atom_cache.h" @@ -25,7 +25,7 @@ namespace ui { // The selection owner object keeps track of which xwindow is the current // owner, and when its |xwindow_|, offers different data types to other // processes. -class UI_EXPORT SelectionOwner { +class UI_BASE_EXPORT SelectionOwner { public: SelectionOwner(Display* xdisplay, ::Window xwindow, @@ -35,15 +35,16 @@ class UI_EXPORT SelectionOwner { // Returns the current selection data. Useful for fast paths. const SelectionFormatMap& selection_format_map() { return format_map_; } - // Retrieves a list of types we're offering. + // Appends a list of types we're offering to |targets|. void RetrieveTargets(std::vector<Atom>* targets); // Attempts to take ownership of the selection. If we're successful, present // |data| to other windows. void TakeOwnershipOfSelection(const SelectionFormatMap& data); - // Releases the selection (if we own it) and clears any data we own. - void Clear(); + // Clears our internal format map and clears the selection owner, whether we + // own the selection or not. + void ClearSelectionOwner(); // It is our owner's responsibility to plumb X11 events on |xwindow_| to us. void OnSelectionRequest(const XSelectionRequestEvent& event); @@ -52,6 +53,11 @@ class UI_EXPORT SelectionOwner { // don't, but there were open todos in the previous implementation. private: + // Attempts to convert the selection to |target|. If the conversion is + // successful, true is returned and the result is stored in the |property| + // of |requestor|. + bool ProcessTarget(::Atom target, ::Window requestor, ::Atom property); + // Our X11 state. Display* x_display_; ::Window x_window_; diff --git a/chromium/ui/base/x/selection_requestor.cc b/chromium/ui/base/x/selection_requestor.cc index dd7a310e603..a946787d355 100644 --- a/chromium/ui/base/x/selection_requestor.cc +++ b/chromium/ui/base/x/selection_requestor.cc @@ -4,10 +4,12 @@ #include "ui/base/x/selection_requestor.h" -#include "base/message_loop/message_pump_x11.h" #include "base/run_loop.h" #include "ui/base/x/selection_utils.h" #include "ui/base/x/x11_util.h" +#include "ui/events/platform/platform_event_dispatcher.h" +#include "ui/events/platform/platform_event_source.h" +#include "ui/gfx/x/x11_types.h" namespace ui { @@ -24,10 +26,12 @@ const char* kAtomsToCache[] = { SelectionRequestor::SelectionRequestor(Display* x_display, Window x_window, - Atom selection_name) + Atom selection_name, + PlatformEventDispatcher* dispatcher) : x_display_(x_display), x_window_(x_window), selection_name_(selection_name), + dispatcher_(dispatcher), atom_cache_(x_display_, kAtomsToCache) { } @@ -39,35 +43,41 @@ bool SelectionRequestor::PerformBlockingConvertSelection( size_t* out_data_bytes, size_t* out_data_items, Atom* out_type) { - // The name of the property we're asking to be set on |x_window_|. - Atom property_to_set = atom_cache_.GetAtom(kChromeSelection); + // The name of the property that we are either: + // - Passing as a parameter with the XConvertSelection() request. + // OR + // - Asking the selection owner to set on |x_window_|. + Atom property = atom_cache_.GetAtom(kChromeSelection); XConvertSelection(x_display_, selection_name_, target, - property_to_set, + property, x_window_, CurrentTime); // Now that we've thrown our message off to the X11 server, we block waiting // for a response. - base::MessageLoopForUI* loop = base::MessageLoopForUI::current(); - base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop); - base::RunLoop run_loop(base::MessagePumpX11::Current()); - - PendingRequest pending_request(target, run_loop.QuitClosure()); - pending_requests_.push_back(&pending_request); - run_loop.Run(); - DCHECK(!pending_requests_.empty()); - DCHECK_EQ(&pending_request, pending_requests_.back()); - pending_requests_.pop_back(); - - if (pending_request.returned_property != property_to_set) - return false; + PendingRequest pending_request(target); + BlockTillSelectionNotifyForRequest(&pending_request); + + bool success = false; + if (pending_request.returned_property == property) { + success = ui::GetRawBytesOfProperty(x_window_, + pending_request.returned_property, + out_data, out_data_bytes, + out_data_items, out_type); + } + if (pending_request.returned_property != None) + XDeleteProperty(x_display_, x_window_, pending_request.returned_property); + return success; +} - return ui::GetRawBytesOfProperty(x_window_, pending_request.returned_property, - out_data, out_data_bytes, out_data_items, - out_type); +void SelectionRequestor::PerformBlockingConvertSelectionWithParameter( + Atom target, + const std::vector< ::Atom>& parameter) { + SetAtomArrayProperty(x_window_, kChromeSelection, "ATOM", parameter); + PerformBlockingConvertSelection(target, NULL, NULL, NULL, NULL); } SelectionData SelectionRequestor::RequestAndWaitForTypes( @@ -111,18 +121,62 @@ void SelectionRequestor::OnSelectionNotify(const XSelectionEvent& event) { // This event doesn't correspond to any XConvertSelection calls that we // issued in PerformBlockingConvertSelection. This shouldn't happen, but any // client can send any message, so it can happen. - if (!request_notified) + if (!request_notified) { + // ICCCM requires us to delete the property passed into SelectionNotify. If + // |request_notified| is true, the property will be deleted when the run + // loop has quit. + if (event.property != None) + XDeleteProperty(x_display_, x_window_, event.property); return; + } request_notified->returned_property = event.property; request_notified->returned = true; - request_notified->quit_closure.Run(); + + if (!request_notified->quit_closure.is_null()) + request_notified->quit_closure.Run(); +} + +void SelectionRequestor::BlockTillSelectionNotifyForRequest( + PendingRequest* request) { + pending_requests_.push_back(request); + + const int kMaxWaitTimeForClipboardResponse = 300; + if (PlatformEventSource::GetInstance()) { + base::MessageLoopForUI* loop = base::MessageLoopForUI::current(); + base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop); + base::RunLoop run_loop; + + request->quit_closure = run_loop.QuitClosure(); + loop->PostDelayedTask( + FROM_HERE, + request->quit_closure, + base::TimeDelta::FromMilliseconds(kMaxWaitTimeForClipboardResponse)); + + run_loop.Run(); + } else { + // This occurs if PerformBlockingConvertSelection() is called during + // shutdown and the PlatformEventSource has already been destroyed. + base::TimeTicks start = base::TimeTicks::Now(); + while (!request->returned) { + if (XPending(x_display_)) { + XEvent event; + XNextEvent(x_display_, &event); + dispatcher_->DispatchEvent(&event); + } + base::TimeDelta wait_time = base::TimeTicks::Now() - start; + if (wait_time.InMilliseconds() > kMaxWaitTimeForClipboardResponse) + break; + } + } + + DCHECK(!pending_requests_.empty()); + DCHECK_EQ(request, pending_requests_.back()); + pending_requests_.pop_back(); } -SelectionRequestor::PendingRequest::PendingRequest(Atom target, - base::Closure quit_closure) +SelectionRequestor::PendingRequest::PendingRequest(Atom target) : target(target), - quit_closure(quit_closure), returned_property(None), returned(false) { } diff --git a/chromium/ui/base/x/selection_requestor.h b/chromium/ui/base/x/selection_requestor.h index c045255e5c3..f142dd096cf 100644 --- a/chromium/ui/base/x/selection_requestor.h +++ b/chromium/ui/base/x/selection_requestor.h @@ -16,10 +16,11 @@ #include "base/basictypes.h" #include "base/callback.h" #include "base/memory/ref_counted_memory.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/x/x11_atom_cache.h" namespace ui { +class PlatformEventDispatcher; class SelectionData; // Requests and later receives data from the X11 server through the selection @@ -29,11 +30,12 @@ class SelectionData; // drop. This class interprets messages from the statefull selection request // API. SelectionRequestor should only deal with the X11 details; it does not // implement per-component fast-paths. -class UI_EXPORT SelectionRequestor { +class UI_BASE_EXPORT SelectionRequestor { public: SelectionRequestor(Display* xdisplay, ::Window xwindow, - ::Atom selection_name); + ::Atom selection_name, + PlatformEventDispatcher* dispatcher); ~SelectionRequestor(); // Does the work of requesting |target| from the selection we handle, @@ -48,6 +50,12 @@ class UI_EXPORT SelectionRequestor { size_t* out_data_items, ::Atom* out_type); + // Requests |target| from the selection that we handle, passing |parameter| + // as a parameter to XConvertSelection(). + void PerformBlockingConvertSelectionWithParameter( + ::Atom target, + const std::vector< ::Atom>& parameter); + // Returns the first of |types| offered by the current selection holder, or // returns NULL if none of those types are available. SelectionData RequestAndWaitForTypes(const std::vector< ::Atom>& types); @@ -57,16 +65,9 @@ class UI_EXPORT SelectionRequestor { void OnSelectionNotify(const XSelectionEvent& event); private: - // Our X11 state. - Display* x_display_; - ::Window x_window_; - - // The X11 selection that this instance communicates on. - ::Atom selection_name_; - // A request that has been issued and we are waiting for a response to. struct PendingRequest { - PendingRequest(Atom target, base::Closure quit_closure); + explicit PendingRequest(Atom target); ~PendingRequest(); // Data to the current XConvertSelection request. Used for error detection; @@ -86,6 +87,24 @@ class UI_EXPORT SelectionRequestor { bool returned; }; + // Blocks till SelectionNotify is received for the target specified in + // |request|. + void BlockTillSelectionNotifyForRequest(PendingRequest* request); + + // Our X11 state. + Display* x_display_; + ::Window x_window_; + + // The X11 selection that this instance communicates on. + ::Atom selection_name_; + + // Dispatcher which handles SelectionNotify and SelectionRequest for + // |selection_name_|. PerformBlockingConvertSelection() calls the + // dispatcher directly if PerformBlockingConvertSelection() is called after + // the PlatformEventSource is destroyed. + // Not owned. + PlatformEventDispatcher* dispatcher_; + // A list of requests for which we are waiting for responses. std::list<PendingRequest*> pending_requests_; diff --git a/chromium/ui/base/x/selection_utils.cc b/chromium/ui/base/x/selection_utils.cc index a3f8494ec87..d5ce1c03cf2 100644 --- a/chromium/ui/base/x/selection_utils.cc +++ b/chromium/ui/base/x/selection_utils.cc @@ -8,6 +8,7 @@ #include "base/i18n/icu_string_conversions.h" #include "base/logging.h" +#include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "ui/base/clipboard/clipboard.h" #include "ui/base/x/x11_util.h" @@ -18,12 +19,16 @@ namespace ui { const char kMimeTypeMozillaURL[] = "text/x-moz-url"; const char kString[] = "STRING"; const char kText[] = "TEXT"; +const char kTextPlain[] = "text/plain"; +const char kTextPlainUtf8[] = "text/plain;charset=utf-8"; const char kUtf8String[] = "UTF8_STRING"; const char* kSelectionDataAtoms[] = { Clipboard::kMimeTypeHTML, kString, kText, + kTextPlain, + kTextPlainUtf8, kUtf8String, NULL }; @@ -33,6 +38,8 @@ std::vector< ::Atom> GetTextAtomsFrom(const X11AtomCache* atom_cache) { atoms.push_back(atom_cache->GetAtom(kUtf8String)); atoms.push_back(atom_cache->GetAtom(kString)); atoms.push_back(atom_cache->GetAtom(kText)); + atoms.push_back(atom_cache->GetAtom(kTextPlain)); + atoms.push_back(atom_cache->GetAtom(kTextPlainUtf8)); return atoms; } @@ -43,6 +50,12 @@ std::vector< ::Atom> GetURLAtomsFrom(const X11AtomCache* atom_cache) { return atoms; } +std::vector< ::Atom> GetURIListAtomsFrom(const X11AtomCache* atom_cache) { + std::vector< ::Atom> atoms; + atoms.push_back(atom_cache->GetAtom(Clipboard::kMimeTypeURIList)); + return atoms; +} + void GetAtomIntersection(const std::vector< ::Atom>& desired, const std::vector< ::Atom>& offered, std::vector< ::Atom>* output) { @@ -55,13 +68,23 @@ void GetAtomIntersection(const std::vector< ::Atom>& desired, } } -void AddString16ToVector(const string16& str, +void AddString16ToVector(const base::string16& str, std::vector<unsigned char>* bytes) { const unsigned char* front = reinterpret_cast<const unsigned char*>(str.data()); bytes->insert(bytes->end(), front, front + (str.size() * 2)); } +std::vector<std::string> ParseURIList(const SelectionData& data) { + // uri-lists are newline separated file lists in URL encoding. + std::string unparsed; + data.AssignTo(&unparsed); + + std::vector<std::string> tokens; + Tokenize(unparsed, "\n", &tokens); + return tokens; +} + std::string RefCountedMemoryToString( const scoped_refptr<base::RefCountedMemory>& memory) { if (!memory.get()) { @@ -77,19 +100,19 @@ std::string RefCountedMemoryToString( return std::string(reinterpret_cast<const char*>(front), size); } -string16 RefCountedMemoryToString16( +base::string16 RefCountedMemoryToString16( const scoped_refptr<base::RefCountedMemory>& memory) { if (!memory.get()) { NOTREACHED(); - return string16(); + return base::string16(); } size_t size = memory->size(); if (!size) - return string16(); + return base::string16(); const unsigned char* front = memory->front(); - return string16(reinterpret_cast<const base::char16*>(front), size / 2); + return base::string16(reinterpret_cast<const base::char16*>(front), size / 2); } /////////////////////////////////////////////////////////////////////////////// @@ -175,9 +198,11 @@ size_t SelectionData::GetSize() const { std::string SelectionData::GetText() const { if (type_ == atom_cache_.GetAtom(kUtf8String) || - type_ == atom_cache_.GetAtom(kText)) { + type_ == atom_cache_.GetAtom(kText) || + type_ == atom_cache_.GetAtom(kTextPlainUtf8)) { return RefCountedMemoryToString(memory_); - } else if (type_ == atom_cache_.GetAtom(kString)) { + } else if (type_ == atom_cache_.GetAtom(kString) || + type_ == atom_cache_.GetAtom(kTextPlain)) { std::string result; base::ConvertToUtf8AndNormalize(RefCountedMemoryToString(memory_), base::kCodepageLatin1, @@ -191,8 +216,8 @@ std::string SelectionData::GetText() const { } } -string16 SelectionData::GetHtml() const { - string16 markup; +base::string16 SelectionData::GetHtml() const { + base::string16 markup; if (type_ == atom_cache_.GetAtom(Clipboard::kMimeTypeHTML)) { const unsigned char* data = GetData(); @@ -205,7 +230,7 @@ string16 SelectionData::GetHtml() const { markup.assign(reinterpret_cast<const uint16_t*>(data) + 1, (size / 2) - 1); } else { - UTF8ToUTF16(reinterpret_cast<const char*>(data), size, &markup); + base::UTF8ToUTF16(reinterpret_cast<const char*>(data), size, &markup); } // If there is a terminating NULL, drop it. @@ -223,7 +248,7 @@ void SelectionData::AssignTo(std::string* result) const { *result = RefCountedMemoryToString(memory_); } -void SelectionData::AssignTo(string16* result) const { +void SelectionData::AssignTo(base::string16* result) const { *result = RefCountedMemoryToString16(memory_); } diff --git a/chromium/ui/base/x/selection_utils.h b/chromium/ui/base/x/selection_utils.h index 350f383e81c..9eca5beb4ab 100644 --- a/chromium/ui/base/x/selection_utils.h +++ b/chromium/ui/base/x/selection_utils.h @@ -15,7 +15,7 @@ #include "base/basictypes.h" #include "base/memory/ref_counted_memory.h" #include "ui/base/clipboard/clipboard.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/gfx/x/x11_atom_cache.h" namespace ui { @@ -28,30 +28,38 @@ extern const char kText[]; extern const char kUtf8String[]; // Returns a list of all text atoms that we handle. -UI_EXPORT std::vector< ::Atom> GetTextAtomsFrom(const X11AtomCache* atom_cache); +UI_BASE_EXPORT std::vector< ::Atom> GetTextAtomsFrom( + const X11AtomCache* atom_cache); -UI_EXPORT std::vector< ::Atom> GetURLAtomsFrom(const X11AtomCache* atom_cache); +UI_BASE_EXPORT std::vector< ::Atom> GetURLAtomsFrom( + const X11AtomCache* atom_cache); + +UI_BASE_EXPORT std::vector< ::Atom> GetURIListAtomsFrom( + const X11AtomCache* atom_cache); // Places the intersection of |desired| and |offered| into |output|. -UI_EXPORT void GetAtomIntersection(const std::vector< ::Atom>& desired, - const std::vector< ::Atom>& offered, - std::vector< ::Atom>* output); +UI_BASE_EXPORT void GetAtomIntersection(const std::vector< ::Atom>& desired, + const std::vector< ::Atom>& offered, + std::vector< ::Atom>* output); + +// Takes the raw bytes of the base::string16 and copies them into |bytes|. +UI_BASE_EXPORT void AddString16ToVector(const base::string16& str, + std::vector<unsigned char>* bytes); -// Takes the raw bytes of the string16 and copies them into |bytes|. -UI_EXPORT void AddString16ToVector(const string16& str, - std::vector<unsigned char>* bytes); +// Tokenizes and parses the Selection Data as if it is a URI List. +UI_BASE_EXPORT std::vector<std::string> ParseURIList(const SelectionData& data); -UI_EXPORT std::string RefCountedMemoryToString( +UI_BASE_EXPORT std::string RefCountedMemoryToString( const scoped_refptr<base::RefCountedMemory>& memory); -UI_EXPORT string16 RefCountedMemoryToString16( +UI_BASE_EXPORT base::string16 RefCountedMemoryToString16( const scoped_refptr<base::RefCountedMemory>& memory); /////////////////////////////////////////////////////////////////////////////// // Represents the selection in different data formats. Binary data passed in is // assumed to be allocated with new char[], and is owned by SelectionFormatMap. -class UI_EXPORT SelectionFormatMap { +class UI_BASE_EXPORT SelectionFormatMap { public: // Our internal data store, which we only expose through iterators. typedef std::map< ::Atom, scoped_refptr<base::RefCountedMemory> > InternalMap; @@ -85,7 +93,7 @@ class UI_EXPORT SelectionFormatMap { /////////////////////////////////////////////////////////////////////////////// // A holder for data with optional X11 deletion semantics. -class UI_EXPORT SelectionData { +class UI_BASE_EXPORT SelectionData { public: // |atom_cache| is still owned by caller. SelectionData(); @@ -105,11 +113,11 @@ class UI_EXPORT SelectionData { // If |type_| is the HTML type, returns the data as a string16. This detects // guesses the character encoding of the source. - string16 GetHtml() const; + base::string16 GetHtml() const; // Assigns the raw data to the string. void AssignTo(std::string* result) const; - void AssignTo(string16* result) const; + void AssignTo(base::string16* result) const; private: ::Atom type_; diff --git a/chromium/ui/base/x/work_area_watcher_x.cc b/chromium/ui/base/x/work_area_watcher_x.cc deleted file mode 100644 index 053b4899011..00000000000 --- a/chromium/ui/base/x/work_area_watcher_x.cc +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/x/work_area_watcher_x.h" - -#include "base/memory/singleton.h" -#include "ui/base/work_area_watcher_observer.h" -#include "ui/base/x/root_window_property_watcher_x.h" -#include "ui/base/x/x11_util.h" - -namespace ui { - -static const char* const kNetWorkArea = "_NET_WORKAREA"; - -// static -WorkAreaWatcherX* WorkAreaWatcherX::GetInstance() { - return Singleton<WorkAreaWatcherX>::get(); -} - -// static -void WorkAreaWatcherX::AddObserver(WorkAreaWatcherObserver* observer) { - // Ensure that RootWindowPropertyWatcherX exists. - internal::RootWindowPropertyWatcherX::GetInstance(); - GetInstance()->observers_.AddObserver(observer); -} - -// static -void WorkAreaWatcherX::RemoveObserver(WorkAreaWatcherObserver* observer) { - GetInstance()->observers_.RemoveObserver(observer); -} - -// static -void WorkAreaWatcherX::Notify() { - GetInstance()->NotifyWorkAreaChanged(); -} - -// static -Atom WorkAreaWatcherX::GetPropertyAtom() { - return GetAtom(kNetWorkArea); -} - -WorkAreaWatcherX::WorkAreaWatcherX() { -} - -WorkAreaWatcherX::~WorkAreaWatcherX() { -} - -void WorkAreaWatcherX::NotifyWorkAreaChanged() { - FOR_EACH_OBSERVER(WorkAreaWatcherObserver, observers_, WorkAreaChanged()); -} - -} // namespace ui diff --git a/chromium/ui/base/x/work_area_watcher_x.h b/chromium/ui/base/x/work_area_watcher_x.h deleted file mode 100644 index f888ea044a7..00000000000 --- a/chromium/ui/base/x/work_area_watcher_x.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_X_WORK_AREA_WATCHER_X_H_ -#define UI_BASE_X_WORK_AREA_WATCHER_X_H_ - -#include "base/basictypes.h" -#include "base/observer_list.h" -#include "ui/base/ui_export.h" -#include "ui/base/x/x11_util.h" - -template <typename T> struct DefaultSingletonTraits; - -namespace ui { - -class WorkAreaWatcherObserver; - -namespace internal { -class RootWindowPropertyWatcherX; -} - -// This is a helper class that is used to keep track of changes to work area. -// Add an observer to track changes. -class UI_EXPORT WorkAreaWatcherX { - public: - static WorkAreaWatcherX* GetInstance(); - static void AddObserver(WorkAreaWatcherObserver* observer); - static void RemoveObserver(WorkAreaWatcherObserver* observer); - - private: - friend struct DefaultSingletonTraits<WorkAreaWatcherX>; - friend class ui::internal::RootWindowPropertyWatcherX; - - WorkAreaWatcherX(); - ~WorkAreaWatcherX(); - - // Gets the atom for the default display for the property this class is - // watching for. - static Atom GetPropertyAtom(); - - // Notify observers that the work area has changed. - static void Notify(); - - // Instance method that implements Notify(). - void NotifyWorkAreaChanged(); - - ObserverList<WorkAreaWatcherObserver> observers_; - - DISALLOW_COPY_AND_ASSIGN(WorkAreaWatcherX); -}; - -} // namespace ui - -#endif // UI_BASE_X_WORK_AREA_WATCHER_X_H_ diff --git a/chromium/ui/base/x/x11_menu_list.cc b/chromium/ui/base/x/x11_menu_list.cc new file mode 100644 index 00000000000..3396e57840e --- /dev/null +++ b/chromium/ui/base/x/x11_menu_list.cc @@ -0,0 +1,46 @@ +// Copyright (c) 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/x/x11_menu_list.h" + +#include "base/memory/singleton.h" +#include "ui/base/x/x11_util.h" + +namespace ui { + +// static +XMenuList* XMenuList::GetInstance() { + return Singleton<XMenuList>::get(); +} + +XMenuList::XMenuList() + : menu_type_atom_(GetAtom("_NET_WM_WINDOW_TYPE_MENU")) { +} + +XMenuList::~XMenuList() { + menus_.clear(); +} + +void XMenuList::MaybeRegisterMenu(XID menu) { + int value = 0; + if (!GetIntProperty(menu, "_NET_WM_WINDOW_TYPE", &value) || + static_cast<Atom>(value) != menu_type_atom_) { + return; + } + menus_.push_back(menu); +} + +void XMenuList::MaybeUnregisterMenu(XID menu) { + std::vector<XID>::iterator iter = std::find(menus_.begin(), menus_.end(), + menu); + if (iter == menus_.end()) + return; + menus_.erase(iter); +} + +void XMenuList::InsertMenuWindowXIDs(std::vector<XID>* stack) { + stack->insert(stack->begin(), menus_.begin(), menus_.end()); +} + +} // namespace ui diff --git a/chromium/ui/base/x/x11_menu_list.h b/chromium/ui/base/x/x11_menu_list.h new file mode 100644 index 00000000000..4e8476aea08 --- /dev/null +++ b/chromium/ui/base/x/x11_menu_list.h @@ -0,0 +1,48 @@ +// Copyright (c) 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_BASE_X_X11_MENU_LIST_H_ +#define UI_BASE_X_X11_MENU_LIST_H_ + +#include <vector> + +#include "base/basictypes.h" +#include "ui/base/ui_base_export.h" +#include "ui/gfx/x/x11_types.h" + +typedef unsigned long Atom; + +// A process wide singleton cache for X menus. +template <typename T> struct DefaultSingletonTraits; + +namespace ui { + +// Keeps track of created and destroyed top level menu windows. +class UI_BASE_EXPORT XMenuList { + public: + static XMenuList* GetInstance(); + + // Checks if |menu| has _NET_WM_WINDOW_TYPE property set to + // "_NET_WM_WINDOW_TYPE_MENU" atom and if so caches it. + void MaybeRegisterMenu(XID menu); + + // Finds |menu| in cache and if found removes it. + void MaybeUnregisterMenu(XID menu); + + // Inserts cached menu XIDs at the beginning of |stack|. + void InsertMenuWindowXIDs(std::vector<XID>* stack); + + private: + friend struct DefaultSingletonTraits<XMenuList>; + XMenuList(); + ~XMenuList(); + + std::vector<XID> menus_; + ::Atom menu_type_atom_; + DISALLOW_COPY_AND_ASSIGN(XMenuList); +}; + +} // namespace ui + +#endif // UI_BASE_X_X11_MENU_LIST_H_ diff --git a/chromium/ui/base/x/x11_util.cc b/chromium/ui/base/x/x11_util.cc index dfecc6cd8a3..ddfb0aa66e1 100644 --- a/chromium/ui/base/x/x11_util.cc +++ b/chromium/ui/base/x/x11_util.cc @@ -19,9 +19,9 @@ #include <X11/extensions/shape.h> #include <X11/extensions/XInput2.h> +#include <X11/Xcursor/Xcursor.h> #include "base/bind.h" -#include "base/command_line.h" #include "base/debug/trace_event.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" @@ -33,9 +33,10 @@ #include "base/strings/stringprintf.h" #include "base/sys_byteorder.h" #include "base/threading/thread.h" -#include "base/x11/x11_error_tracker.h" +#include "skia/ext/image_operations.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkPostConfig.h" +#include "ui/base/x/x11_menu_list.h" #include "ui/base/x/x11_util_internal.h" #include "ui/events/event_utils.h" #include "ui/events/keycodes/keyboard_code_conversion_x.h" @@ -48,53 +49,18 @@ #include "ui/gfx/point_conversions.h" #include "ui/gfx/rect.h" #include "ui/gfx/size.h" +#include "ui/gfx/skia_util.h" +#include "ui/gfx/x/x11_error_tracker.h" #if defined(OS_FREEBSD) #include <sys/sysctl.h> #include <sys/types.h> #endif -#if defined(USE_AURA) -#include <X11/Xcursor/Xcursor.h> -#include "skia/ext/image_operations.h" -#include "ui/gfx/skia_util.h" -#endif - -#if defined(TOOLKIT_GTK) -#include <gdk/gdk.h> -#include <gtk/gtk.h> -#include "ui/gfx/gdk_compat.h" -#include "ui/gfx/gtk_compat.h" -#endif - namespace ui { namespace { -// Used to cache the XRenderPictFormat for a visual/display pair. -struct CachedPictFormat { - bool equals(XDisplay* display, Visual* visual) const { - return display == this->display && visual == this->visual; - } - - XDisplay* display; - Visual* visual; - XRenderPictFormat* format; -}; - -typedef std::list<CachedPictFormat> CachedPictFormats; - -// Returns the cache of pict formats. -CachedPictFormats* get_cached_pict_formats() { - static CachedPictFormats* formats = NULL; - if (!formats) - formats = new CachedPictFormats(); - return formats; -} - -// Maximum number of CachedPictFormats we keep around. -const size_t kMaxCacheSize = 5; - int DefaultX11ErrorHandler(XDisplay* d, XErrorEvent* e) { if (base::MessageLoop::current()) { base::MessageLoop::current()->PostTask( @@ -150,14 +116,14 @@ class XCursorCache { std::pair<std::map<int, ::Cursor>::iterator, bool> it = cache_.insert( std::make_pair(cursor_shape, 0)); if (it.second) { - XDisplay* display = base::MessagePumpForUI::GetDefaultXDisplay(); + XDisplay* display = gfx::GetXDisplay(); it.first->second = XCreateFontCursor(display, cursor_shape); } return it.first->second; } void Clear() { - XDisplay* display = base::MessagePumpForUI::GetDefaultXDisplay(); + XDisplay* display = gfx::GetXDisplay(); for (std::map<int, ::Cursor>::iterator it = cache_.begin(); it != cache_.end(); ++it) { XFreeCursor(display, it->second); @@ -174,7 +140,6 @@ class XCursorCache { XCursorCache* cursor_cache = NULL; -#if defined(USE_AURA) // A process wide singleton cache for custom X cursors. class XCustomCursorCache { public: @@ -202,6 +167,10 @@ class XCustomCursorCache { cache_.clear(); } + const XcursorImage* GetXcursorImage(::Cursor cursor) const { + return cache_.find(cursor)->second->image(); + } + private: friend struct DefaultSingletonTraits<XCustomCursorCache>; @@ -234,6 +203,10 @@ class XCustomCursorCache { return false; } + const XcursorImage* image() const { + return image_; + }; + private: XcursorImage* image_; int ref_; @@ -250,32 +223,9 @@ class XCustomCursorCache { std::map< ::Cursor, XCustomCursor*> cache_; DISALLOW_COPY_AND_ASSIGN(XCustomCursorCache); }; -#endif // defined(USE_AURA) - -bool IsShapeAvailable() { - int dummy; - static bool is_shape_available = - XShapeQueryExtension(gfx::GetXDisplay(), &dummy, &dummy); - return is_shape_available; - -} - -// A list of bogus sizes in mm that X detects that should be ignored. -// See crbug.com/136533. The first element maintains the minimum -// size required to be valid size. -const unsigned long kInvalidDisplaySizeList[][2] = { - {40, 30}, - {50, 40}, - {160, 90}, - {160, 100}, -}; } // namespace -bool XDisplayExists() { - return (gfx::GetXDisplay() != NULL); -} - bool IsXInput2Available() { return DeviceDataManager::GetInstance()->IsXInput2Available(); } @@ -317,7 +267,7 @@ static SharedMemorySupport DoQuerySharedMemorySupport(XDisplay* dpy) { memset(&shminfo, 0, sizeof(shminfo)); shminfo.shmid = shmkey; - base::X11ErrorTracker err_tracker; + gfx::X11ErrorTracker err_tracker; bool result = XShmAttach(dpy, &shminfo); if (result) VLOG(1) << "X got shared memory segment " << shmkey; @@ -350,38 +300,21 @@ SharedMemorySupport QuerySharedMemorySupport(XDisplay* dpy) { return shared_memory_support; } -bool QueryRenderSupport(XDisplay* dpy) { - static bool render_supported = false; - static bool render_supported_cached = false; - - if (render_supported_cached) - return render_supported; - +bool QueryRenderSupport(Display* dpy) { + int dummy; // We don't care about the version of Xrender since all the features which // we use are included in every version. - int dummy; - render_supported = XRenderQueryExtension(dpy, &dummy, &dummy); - render_supported_cached = true; + static bool render_supported = XRenderQueryExtension(dpy, &dummy, &dummy); return render_supported; } -int GetDefaultScreen(XDisplay* display) { - return XDefaultScreen(display); -} - ::Cursor GetXCursor(int cursor_shape) { if (!cursor_cache) cursor_cache = new XCursorCache; return cursor_cache->GetCursor(cursor_shape); } -void ResetXCursorCache() { - delete cursor_cache; - cursor_cache = NULL; -} - -#if defined(USE_AURA) ::Cursor CreateReffedCustomXCursor(XcursorImage* image) { return XCustomCursorCache::GetInstance()->InstallCustomCursor(image); } @@ -396,7 +329,7 @@ void UnrefCustomXCursor(::Cursor cursor) { XcursorImage* SkBitmapToXcursorImage(const SkBitmap* cursor_image, const gfx::Point& hotspot) { - DCHECK(cursor_image->config() == SkBitmap::kARGB_8888_Config); + DCHECK(cursor_image->colorType() == kPMColor_SkColorType); gfx::Point hotspot_point = hotspot; SkBitmap scaled; @@ -507,7 +440,6 @@ int CoalescePendingMotionEvents(const XEvent* xev, } return num_coalesced; } -#endif void HideHostCursor() { CR_DEFINE_STATIC_LOCAL(XScopedCursor, invisible_cursor, @@ -531,40 +463,51 @@ void HideHostCursor() { return invisible_cursor; } -XID GetX11RootWindow() { - return DefaultRootWindow(gfx::GetXDisplay()); -} - -bool GetCurrentDesktop(int* desktop) { - return GetIntProperty(GetX11RootWindow(), "_NET_CURRENT_DESKTOP", desktop); -} - -#if defined(TOOLKIT_GTK) -XID GetX11WindowFromGtkWidget(GtkWidget* widget) { - return GDK_WINDOW_XID(gtk_widget_get_window(widget)); +void SetUseOSWindowFrame(XID window, bool use_os_window_frame) { + // This data structure represents additional hints that we send to the window + // manager and has a direct lineage back to Motif, which defined this de facto + // standard. This struct doesn't seem 64-bit safe though, but it's what GDK + // does. + typedef struct { + unsigned long flags; + unsigned long functions; + unsigned long decorations; + long input_mode; + unsigned long status; + } MotifWmHints; + + MotifWmHints motif_hints; + memset(&motif_hints, 0, sizeof(motif_hints)); + // Signals that the reader of the _MOTIF_WM_HINTS property should pay + // attention to the value of |decorations|. + motif_hints.flags = (1L << 1); + motif_hints.decorations = use_os_window_frame ? 1 : 0; + + ::Atom hint_atom = GetAtom("_MOTIF_WM_HINTS"); + XChangeProperty(gfx::GetXDisplay(), + window, + hint_atom, + hint_atom, + 32, + PropModeReplace, + reinterpret_cast<unsigned char*>(&motif_hints), + sizeof(MotifWmHints)/sizeof(long)); } -XID GetX11WindowFromGdkWindow(GdkWindow* window) { - return GDK_WINDOW_XID(window); +bool IsShapeExtensionAvailable() { + int dummy; + static bool is_shape_available = + XShapeQueryExtension(gfx::GetXDisplay(), &dummy, &dummy); + return is_shape_available; } -GtkWindow* GetGtkWindowFromX11Window(XID xid) { - GdkWindow* gdk_window = - gdk_x11_window_lookup_for_display(gdk_display_get_default(), xid); - if (!gdk_window) - return NULL; - GtkWindow* gtk_window = NULL; - gdk_window_get_user_data(gdk_window, - reinterpret_cast<gpointer*>(>k_window)); - if (!gtk_window) - return NULL; - return gtk_window; +XID GetX11RootWindow() { + return DefaultRootWindow(gfx::GetXDisplay()); } -void* GetVisualFromGtkWidget(GtkWidget* widget) { - return GDK_VISUAL_XVISUAL(gtk_widget_get_visual(widget)); +bool GetCurrentDesktop(int* desktop) { + return GetIntProperty(GetX11RootWindow(), "_NET_CURRENT_DESKTOP", desktop); } -#endif // defined(TOOLKIT_GTK) void SetHideTitlebarWhenMaximizedProperty(XID window, HideTitlebarWhenMaximized property) { @@ -608,6 +551,17 @@ bool IsWindowVisible(XID window) { return false; if (win_attributes.map_state != IsViewable) return false; + + // Minimized windows are not visible. + std::vector<Atom> wm_states; + if (GetAtomArrayProperty(window, "_NET_WM_STATE", &wm_states)) { + Atom hidden_atom = GetAtom("_NET_WM_STATE_HIDDEN"); + if (std::find(wm_states.begin(), wm_states.end(), hidden_atom) != + wm_states.end()) { + return false; + } + } + // Some compositing window managers (notably kwin) do not actually unmap // windows on desktop switch, so we also must check the current desktop. int window_desktop, current_desktop; @@ -632,6 +586,15 @@ bool GetWindowRect(XID window, gfx::Rect* rect) { return false; *rect = gfx::Rect(x, y, width, height); + + std::vector<int> insets; + if (GetIntArrayProperty(window, "_NET_FRAME_EXTENTS", &insets) && + insets.size() == 4) { + rect->Inset(-insets[0], -insets[2], -insets[1], -insets[3]); + } + // Not all window managers support _NET_FRAME_EXTENTS so return true even if + // requesting the property fails. + return true; } @@ -646,7 +609,7 @@ bool WindowContainsPoint(XID window, gfx::Point screen_loc) { if (!window_rect.Contains(screen_loc)) return false; - if (!IsShapeAvailable()) + if (!IsShapeExtensionAvailable()) return true; // According to http://www.x.org/releases/X11R7.6/doc/libXext/shapelib.html, @@ -655,27 +618,47 @@ bool WindowContainsPoint(XID window, gfx::Point screen_loc) { // rectangles. This means to determine if a point is inside a window for the // purpose of input handling we have to check the rectangles in the ShapeInput // list. - int dummy; - int input_rects_size = 0; - XRectangle* input_rects = XShapeGetRectangles( - gfx::GetXDisplay(), window, ShapeInput, &input_rects_size, &dummy); - if (!input_rects) - return true; - bool is_in_input_rects = false; - for (int i = 0; i < input_rects_size; ++i) { - // The ShapeInput rects appear to be in window space, so we have to - // translate by the window_rect's offset to map to screen space. - gfx::Rect input_rect = - gfx::Rect(input_rects[i].x + window_rect.x(), - input_rects[i].y + window_rect.y(), - input_rects[i].width, input_rects[i].height); - if (input_rect.Contains(screen_loc)) { - is_in_input_rects = true; - break; + // According to http://www.x.org/releases/current/doc/xextproto/shape.html, + // we need to also respect the ShapeBounding rectangles. + // The effective input region of a window is defined to be the intersection + // of the client input region with both the default input region and the + // client bounding region. Any portion of the client input region that is not + // included in both the default input region and the client bounding region + // will not be included in the effective input region on the screen. + int rectangle_kind[] = {ShapeInput, ShapeBounding}; + for (size_t kind_index = 0; + kind_index < arraysize(rectangle_kind); + kind_index++) { + int dummy; + int shape_rects_size = 0; + XRectangle* shape_rects = XShapeGetRectangles(gfx::GetXDisplay(), + window, + rectangle_kind[kind_index], + &shape_rects_size, + &dummy); + if (!shape_rects) { + // The shape is empty. This can occur when |window| is minimized. + DCHECK_EQ(0, shape_rects_size); + return false; } + bool is_in_shape_rects = false; + for (int i = 0; i < shape_rects_size; ++i) { + // The ShapeInput and ShapeBounding rects are to be in window space, so we + // have to translate by the window_rect's offset to map to screen space. + gfx::Rect shape_rect = + gfx::Rect(shape_rects[i].x + window_rect.x(), + shape_rects[i].y + window_rect.y(), + shape_rects[i].width, shape_rects[i].height); + if (shape_rect.Contains(screen_loc)) { + is_in_shape_rects = true; + break; + } + } + XFree(shape_rects); + if (!is_in_shape_rects) + return false; } - XFree(input_rects); - return is_in_input_rects; + return true; } @@ -891,7 +874,7 @@ bool SetIntArrayProperty(XID window, for (size_t i = 0; i < value.size(); ++i) data[i] = value[i]; - base::X11ErrorTracker err_tracker; + gfx::X11ErrorTracker err_tracker; XChangeProperty(gfx::GetXDisplay(), window, name_atom, @@ -903,6 +886,14 @@ bool SetIntArrayProperty(XID window, return !err_tracker.FoundNewError(); } +bool SetAtomProperty(XID window, + const std::string& name, + const std::string& type, + Atom value) { + std::vector<Atom> values(1, value); + return SetAtomArrayProperty(window, name, type, values); +} + bool SetAtomArrayProperty(XID window, const std::string& name, const std::string& type, @@ -916,7 +907,7 @@ bool SetAtomArrayProperty(XID window, for (size_t i = 0; i < value.size(); ++i) data[i] = value[i]; - base::X11ErrorTracker err_tracker; + gfx::X11ErrorTracker err_tracker; XChangeProperty(gfx::GetXDisplay(), window, name_atom, @@ -928,14 +919,25 @@ bool SetAtomArrayProperty(XID window, return !err_tracker.FoundNewError(); } +bool SetStringProperty(XID window, + Atom property, + Atom type, + const std::string& value) { + gfx::X11ErrorTracker err_tracker; + XChangeProperty(gfx::GetXDisplay(), + window, + property, + type, + 8, + PropModeReplace, + reinterpret_cast<const unsigned char*>(value.c_str()), + value.size()); + return !err_tracker.FoundNewError(); +} + Atom GetAtom(const char* name) { -#if defined(TOOLKIT_GTK) - return gdk_x11_get_xatom_by_name_for_display( - gdk_display_get_default(), name); -#else // TODO(derat): Cache atoms to avoid round-trips to the server. return XInternAtom(gfx::GetXDisplay(), name, false); -#endif } void SetWindowClassHint(XDisplay* display, @@ -963,26 +965,24 @@ void SetWindowRole(XDisplay* display, XID window, const std::string& role) { } } -XID GetParentWindow(XID window) { - XID root = None; - XID parent = None; - XID* children = NULL; - unsigned int num_children = 0; - XQueryTree(gfx::GetXDisplay(), window, &root, &parent, &children, &num_children); - if (children) - XFree(children); - return parent; -} - -XID GetHighestAncestorWindow(XID window, XID root) { - while (true) { - XID parent = GetParentWindow(window); - if (parent == None) - return None; - if (parent == root) - return window; - window = parent; - } +bool GetCustomFramePrefDefault() { + // Ideally, we'd use the custom frame by default and just fall back on using + // system decorations for the few (?) tiling window managers where the custom + // frame doesn't make sense (e.g. awesome, ion3, ratpoison, xmonad, etc.) or + // other WMs where it has issues (e.g. Fluxbox -- see issue 19130). The EWMH + // _NET_SUPPORTING_WM property makes it easy to look up a name for the current + // WM, but at least some of the WMs in the latter group don't set it. + // Instead, we default to using system decorations for all WMs and + // special-case the ones where the custom frame should be used. + ui::WindowManagerName wm_type = GuessWindowManager(); + return (wm_type == WM_BLACKBOX || + wm_type == WM_COMPIZ || + wm_type == WM_ENLIGHTENMENT || + wm_type == WM_METACITY || + wm_type == WM_MUFFIN || + wm_type == WM_MUTTER || + wm_type == WM_OPENBOX || + wm_type == WM_XFWM4); } bool GetWindowDesktop(XID window, int* desktop) { @@ -1010,6 +1010,18 @@ bool EnumerateChildren(EnumerateWindowsDelegate* delegate, XID window, if (depth > max_depth) return false; + std::vector<XID> windows; + std::vector<XID>::iterator iter; + if (depth == 0) { + XMenuList::GetInstance()->InsertMenuWindowXIDs(&windows); + // Enumerate the menus first. + for (iter = windows.begin(); iter != windows.end(); iter++) { + if (delegate->ShouldStopIterating(*iter)) + return true; + } + windows.clear(); + } + XID root, parent, *children; unsigned int num_children; int status = XQueryTree(gfx::GetXDisplay(), window, &root, &parent, &children, @@ -1017,7 +1029,6 @@ bool EnumerateChildren(EnumerateWindowsDelegate* delegate, XID window, if (status == 0) return false; - std::vector<XID> windows; for (int i = static_cast<int>(num_children) - 1; i >= 0; i--) windows.push_back(children[i]); @@ -1025,7 +1036,6 @@ bool EnumerateChildren(EnumerateWindowsDelegate* delegate, XID window, // XQueryTree returns the children of |window| in bottom-to-top order, so // reverse-iterate the list to check the windows from top-to-bottom. - std::vector<XID>::iterator iter; for (iter = windows.begin(); iter != windows.end(); iter++) { if (IsWindowNamed(*iter) && delegate->ShouldStopIterating(*iter)) return true; @@ -1061,6 +1071,7 @@ void EnumerateTopLevelWindows(ui::EnumerateWindowsDelegate* delegate) { ui::EnumerateAllWindows(delegate, kMaxSearchDepth); return; } + XMenuList::GetInstance()->InsertMenuWindowXIDs(&stack); std::vector<XID>::iterator iter; for (iter = stack.begin(); iter != stack.end(); iter++) { @@ -1100,45 +1111,6 @@ bool GetXWindowStack(Window window, std::vector<XID>* windows) { return result; } -void RestackWindow(XID window, XID sibling, bool above) { - XWindowChanges changes; - changes.sibling = sibling; - changes.stack_mode = above ? Above : Below; - XConfigureWindow(gfx::GetXDisplay(), window, CWSibling | CWStackMode, &changes); -} - -XSharedMemoryId AttachSharedMemory(XDisplay* display, int shared_memory_key) { - DCHECK(QuerySharedMemorySupport(display)); - - XShmSegmentInfo shminfo; - memset(&shminfo, 0, sizeof(shminfo)); - shminfo.shmid = shared_memory_key; - - // This function is only called if QuerySharedMemorySupport returned true. In - // which case we've already succeeded in having the X server attach to one of - // our shared memory segments. - if (!XShmAttach(display, &shminfo)) { - LOG(WARNING) << "X failed to attach to shared memory segment " - << shminfo.shmid; - NOTREACHED(); - } else { - VLOG(1) << "X attached to shared memory segment " << shminfo.shmid; - } - - return shminfo.shmseg; -} - -void DetachSharedMemory(XDisplay* display, XSharedMemoryId shmseg) { - DCHECK(QuerySharedMemorySupport(display)); - - XShmSegmentInfo shminfo; - memset(&shminfo, 0, sizeof(shminfo)); - shminfo.shmseg = shmseg; - - if (!XShmDetach(display, &shminfo)) - NOTREACHED(); -} - bool CopyAreaToCanvas(XID drawable, gfx::Rect source_bounds, gfx::Point dest_offset, @@ -1172,10 +1144,9 @@ bool CopyAreaToCanvas(XID drawable, image->data[i + 3] = 0xff; SkBitmap bitmap; - bitmap.setConfig(SkBitmap::kARGB_8888_Config, - image->width, image->height, - image->bytes_per_line); - bitmap.setPixels(image->data); + bitmap.installPixels(SkImageInfo::MakeN32Premul(image->width, + image->height), + image->data, image->bytes_per_line); gfx::ImageSkia image_skia; gfx::ImageSkiaRep image_rep(bitmap, canvas->image_scale()); image_skia.AddRepresentation(image_rep); @@ -1188,21 +1159,6 @@ bool CopyAreaToCanvas(XID drawable, return true; } -XID CreatePictureFromSkiaPixmap(XDisplay* display, XID pixmap) { - XID picture = XRenderCreatePicture( - display, pixmap, GetRenderARGB32Format(display), 0, NULL); - - return picture; -} - -void FreePicture(XDisplay* display, XID picture) { - XRenderFreePicture(display, picture); -} - -void FreePixmap(XDisplay* display, XID pixmap) { - XFreePixmap(display, pixmap); -} - bool GetWindowManagerName(std::string* wm_name) { DCHECK(wm_name); int wm_window = 0; @@ -1221,7 +1177,7 @@ bool GetWindowManagerName(std::string* wm_name) { // _NET_SUPPORTING_WM_CHECK property pointing to itself (to avoid a stale // property referencing an ID that's been recycled for another window), so we // check that too. - base::X11ErrorTracker err_tracker; + gfx::X11ErrorTracker err_tracker; int wm_window_property = 0; bool result = GetIntProperty( wm_window, "_NET_SUPPORTING_WM_CHECK", &wm_window_property); @@ -1267,29 +1223,6 @@ WindowManagerName GuessWindowManager() { return WM_UNKNOWN; } -bool ChangeWindowDesktop(XID window, XID destination) { - int desktop; - if (!GetWindowDesktop(destination, &desktop)) - return false; - - // If |window| is sticky, use the current desktop. - if (desktop == kAllDesktops && - !GetCurrentDesktop(&desktop)) - return false; - - XEvent event; - event.xclient.type = ClientMessage; - event.xclient.window = window; - event.xclient.message_type = GetAtom("_NET_WM_DESKTOP"); - event.xclient.format = 32; - event.xclient.data.l[0] = desktop; - event.xclient.data.l[1] = 1; // source indication - - int result = XSendEvent(gfx::GetXDisplay(), GetX11RootWindow(), False, - SubstructureNotifyMask, &event); - return result == Success; -} - void SetDefaultX11ErrorHandlers() { SetX11ErrorHandlers(NULL, NULL); } @@ -1298,21 +1231,16 @@ bool IsX11WindowFullScreen(XID window) { // If _NET_WM_STATE_FULLSCREEN is in _NET_SUPPORTED, use the presence or // absence of _NET_WM_STATE_FULLSCREEN in _NET_WM_STATE to determine // whether we're fullscreen. - std::vector<Atom> supported_atoms; - if (GetAtomArrayProperty(GetX11RootWindow(), - "_NET_SUPPORTED", - &supported_atoms)) { - Atom atom = GetAtom("_NET_WM_STATE_FULLSCREEN"); - - if (std::find(supported_atoms.begin(), supported_atoms.end(), atom) - != supported_atoms.end()) { - std::vector<Atom> atom_properties; - if (GetAtomArrayProperty(window, - "_NET_WM_STATE", - &atom_properties)) { - return std::find(atom_properties.begin(), atom_properties.end(), atom) - != atom_properties.end(); - } + Atom fullscreen_atom = GetAtom("_NET_WM_STATE_FULLSCREEN"); + if (WmSupportsHint(fullscreen_atom)) { + std::vector<Atom> atom_properties; + if (GetAtomArrayProperty(window, + "_NET_WM_STATE", + &atom_properties)) { + return std::find(atom_properties.begin(), + atom_properties.end(), + fullscreen_atom) != + atom_properties.end(); } } @@ -1320,17 +1248,6 @@ bool IsX11WindowFullScreen(XID window) { if (!ui::GetWindowRect(window, &window_rect)) return false; -#if defined(TOOLKIT_GTK) - // As the last resort, check if the window size is as large as the main - // screen. - GdkRectangle monitor_rect; - gdk_screen_get_monitor_geometry(gdk_screen_get_default(), 0, &monitor_rect); - - return monitor_rect.x == window_rect.x() && - monitor_rect.y == window_rect.y() && - monitor_rect.width == window_rect.width() && - monitor_rect.height == window_rect.height(); -#else // We can't use gfx::Screen here because we don't have an aura::Window. So // instead just look at the size of the default display. // @@ -1341,26 +1258,18 @@ bool IsX11WindowFullScreen(XID window) { int width = WidthOfScreen(screen); int height = HeightOfScreen(screen); return window_rect.size() == gfx::Size(width, height); -#endif } -bool IsXDisplaySizeBlackListed(unsigned long mm_width, - unsigned long mm_height) { - // Ignore if the reported display is smaller than minimum size. - if (mm_width <= kInvalidDisplaySizeList[0][0] || - mm_height <= kInvalidDisplaySizeList[0][1]) { - LOG(WARNING) << "Smaller than minimum display size"; - return true; - } - for (unsigned long i = 1 ; i < arraysize(kInvalidDisplaySizeList); ++i) { - const unsigned long* size = kInvalidDisplaySizeList[i]; - if (mm_width == size[0] && mm_height == size[1]) { - LOG(WARNING) << "Black listed display size detected:" - << size[0] << "x" << size[1]; - return true; - } +bool WmSupportsHint(Atom atom) { + std::vector<Atom> supported_atoms; + if (!GetAtomArrayProperty(GetX11RootWindow(), + "_NET_SUPPORTED", + &supported_atoms)) { + return false; } - return false; + + return std::find(supported_atoms.begin(), supported_atoms.end(), atom) != + supported_atoms.end(); } const unsigned char* XRefcountedMemory::front() const { @@ -1410,6 +1319,18 @@ void XScopedCursor::reset(::Cursor cursor) { cursor_ = cursor; } +namespace test { + +void ResetXCursorCache() { + delete cursor_cache; + cursor_cache = NULL; +} + +const XcursorImage* GetCachedXcursorImage(::Cursor cursor) { + return XCustomCursorCache::GetInstance()->GetXcursorImage(cursor); +} +} + // ---------------------------------------------------------------------------- // These functions are declared in x11_util_internal.h because they require // XLib.h to be included, and it conflicts with many other headers. @@ -1449,43 +1370,6 @@ XRenderPictFormat* GetRenderARGB32Format(XDisplay* dpy) { return pictformat; } -XRenderPictFormat* GetRenderVisualFormat(XDisplay* dpy, Visual* visual) { - DCHECK(QueryRenderSupport(dpy)); - - CachedPictFormats* formats = get_cached_pict_formats(); - - for (CachedPictFormats::const_iterator i = formats->begin(); - i != formats->end(); ++i) { - if (i->equals(dpy, visual)) - return i->format; - } - - // Not cached, look up the value. - XRenderPictFormat* pictformat = XRenderFindVisualFormat(dpy, visual); - CHECK(pictformat) << "XRENDER does not support default visual"; - - // And store it in the cache. - CachedPictFormat cached_value; - cached_value.visual = visual; - cached_value.display = dpy; - cached_value.format = pictformat; - formats->push_front(cached_value); - - if (formats->size() == kMaxCacheSize) { - formats->pop_back(); - // We should really only have at most 2 display/visual combinations: - // one for normal browser windows, and possibly another for an argb window - // created to display a menu. - // - // If we get here it's not fatal, we just need to make sure we aren't - // always blowing away the cache. If we are, then we should figure out why - // and make it bigger. - NOTREACHED(); - } - - return pictformat; -} - void SetX11ErrorHandlers(XErrorHandler error_handler, XIOErrorHandler io_error_handler) { XSetErrorHandler(error_handler ? error_handler : DefaultX11ErrorHandler); diff --git a/chromium/ui/base/x/x11_util.h b/chromium/ui/base/x/x11_util.h index 62aea96512c..093193f6d27 100644 --- a/chromium/ui/base/x/x11_util.h +++ b/chromium/ui/base/x/x11_util.h @@ -17,7 +17,7 @@ #include "base/basictypes.h" #include "base/event_types.h" #include "base/memory/ref_counted_memory.h" -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" #include "ui/events/event_constants.h" #include "ui/events/keycodes/keyboard_codes.h" #include "ui/gfx/point.h" @@ -29,12 +29,6 @@ typedef unsigned long Cursor; typedef struct _XcursorImage XcursorImage; typedef union _XEvent XEvent; -#if defined(TOOLKIT_GTK) -typedef struct _GdkDrawable GdkWindow; -typedef struct _GtkWidget GtkWidget; -typedef struct _GtkWindow GtkWindow; -#endif - namespace gfx { class Canvas; class Point; @@ -49,11 +43,8 @@ namespace ui { // These functions cache their results --------------------------------- -// Check if there's an open connection to an X server. -UI_EXPORT bool XDisplayExists(); - // Returns true if the system supports XINPUT2. -UI_EXPORT bool IsXInput2Available(); +UI_BASE_EXPORT bool IsXInput2Available(); // X shared memory comes in three flavors: // 1) No SHM support, @@ -65,102 +56,85 @@ enum SharedMemorySupport { SHARED_MEMORY_PIXMAP }; // Return the shared memory type of our X connection. -UI_EXPORT SharedMemorySupport QuerySharedMemorySupport(XDisplay* dpy); +UI_BASE_EXPORT SharedMemorySupport QuerySharedMemorySupport(XDisplay* dpy); // Return true iff the display supports Xrender -UI_EXPORT bool QueryRenderSupport(XDisplay* dpy); - -// Return the default screen number for the display -int GetDefaultScreen(XDisplay* display); +UI_BASE_EXPORT bool QueryRenderSupport(XDisplay* dpy); // Returns an X11 Cursor, sharable across the process. // |cursor_shape| is an X font cursor shape, see XCreateFontCursor(). -UI_EXPORT ::Cursor GetXCursor(int cursor_shape); - -// Resets the cache used by GetXCursor(). Only useful for tests that may delete -// the display. -UI_EXPORT void ResetXCursorCache(); +UI_BASE_EXPORT ::Cursor GetXCursor(int cursor_shape); -#if defined(USE_AURA) // Creates a custom X cursor from the image. This takes ownership of image. The // caller must not free/modify the image. The refcount of the newly created // cursor is set to 1. -UI_EXPORT ::Cursor CreateReffedCustomXCursor(XcursorImage* image); +UI_BASE_EXPORT ::Cursor CreateReffedCustomXCursor(XcursorImage* image); // Increases the refcount of the custom cursor. -UI_EXPORT void RefCustomXCursor(::Cursor cursor); +UI_BASE_EXPORT void RefCustomXCursor(::Cursor cursor); // Decreases the refcount of the custom cursor, and destroys it if it reaches 0. -UI_EXPORT void UnrefCustomXCursor(::Cursor cursor); +UI_BASE_EXPORT void UnrefCustomXCursor(::Cursor cursor); // Creates a XcursorImage and copies the SkBitmap |bitmap| on it. |bitmap| // should be non-null. Caller owns the returned object. -UI_EXPORT XcursorImage* SkBitmapToXcursorImage(const SkBitmap* bitmap, - const gfx::Point& hotspot); +UI_BASE_EXPORT XcursorImage* SkBitmapToXcursorImage(const SkBitmap* bitmap, + const gfx::Point& hotspot); // Coalesce all pending motion events (touch or mouse) that are at the top of // the queue, and return the number eliminated, storing the last one in // |last_event|. -UI_EXPORT int CoalescePendingMotionEvents(const XEvent* xev, - XEvent* last_event); -#endif +UI_BASE_EXPORT int CoalescePendingMotionEvents(const XEvent* xev, + XEvent* last_event); // Hides the host cursor. -UI_EXPORT void HideHostCursor(); +UI_BASE_EXPORT void HideHostCursor(); // Returns an invisible cursor. -UI_EXPORT ::Cursor CreateInvisibleCursor(); +UI_BASE_EXPORT ::Cursor CreateInvisibleCursor(); + +// Sets whether |window| should use the OS window frame. +UI_BASE_EXPORT void SetUseOSWindowFrame(XID window, bool use_os_window_frame); // These functions do not cache their results -------------------------- +// Returns true if the shape extension is supported. +UI_BASE_EXPORT bool IsShapeExtensionAvailable(); + // Get the X window id for the default root window -UI_EXPORT XID GetX11RootWindow(); +UI_BASE_EXPORT XID GetX11RootWindow(); // Returns the user's current desktop. -bool GetCurrentDesktop(int* desktop); - -#if defined(TOOLKIT_GTK) -// Get the X window id for the given GTK widget. -UI_EXPORT XID GetX11WindowFromGtkWidget(GtkWidget* widget); -XID GetX11WindowFromGdkWindow(GdkWindow* window); - -// Get the GtkWindow* wrapping a given XID, if any. -// Returns NULL if there isn't already a GtkWindow* wrapping this XID; -// see gdk_window_foreign_new() etc. to wrap arbitrary XIDs. -UI_EXPORT GtkWindow* GetGtkWindowFromX11Window(XID xid); - -// Get a Visual from the given widget. Since we don't include the Xlib -// headers, this is returned as a void*. -UI_EXPORT void* GetVisualFromGtkWidget(GtkWidget* widget); -#endif // defined(TOOLKIT_GTK) +UI_BASE_EXPORT bool GetCurrentDesktop(int* desktop); enum HideTitlebarWhenMaximized { SHOW_TITLEBAR_WHEN_MAXIMIZED = 0, HIDE_TITLEBAR_WHEN_MAXIMIZED = 1, }; // Sets _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED on |window|. -UI_EXPORT void SetHideTitlebarWhenMaximizedProperty( +UI_BASE_EXPORT void SetHideTitlebarWhenMaximizedProperty( XID window, HideTitlebarWhenMaximized property); // Clears all regions of X11's default root window by filling black pixels. -UI_EXPORT void ClearX11DefaultRootWindow(); +UI_BASE_EXPORT void ClearX11DefaultRootWindow(); // Returns true if |window| is visible. -UI_EXPORT bool IsWindowVisible(XID window); +UI_BASE_EXPORT bool IsWindowVisible(XID window); // Returns the bounds of |window|. -UI_EXPORT bool GetWindowRect(XID window, gfx::Rect* rect); +UI_BASE_EXPORT bool GetWindowRect(XID window, gfx::Rect* rect); // Returns true if |window| contains the point |screen_loc|. -UI_EXPORT bool WindowContainsPoint(XID window, gfx::Point screen_loc); +UI_BASE_EXPORT bool WindowContainsPoint(XID window, gfx::Point screen_loc); // Return true if |window| has any property with |property_name|. -UI_EXPORT bool PropertyExists(XID window, const std::string& property_name); +UI_BASE_EXPORT bool PropertyExists(XID window, + const std::string& property_name); // Returns the raw bytes from a property with minimal // interpretation. |out_data| should be freed by XFree() after use. -UI_EXPORT bool GetRawBytesOfProperty( +UI_BASE_EXPORT bool GetRawBytesOfProperty( XID window, Atom property, scoped_refptr<base::RefCountedMemory>* out_data, @@ -173,51 +147,61 @@ UI_EXPORT bool GetRawBytesOfProperty( // // TODO(erg): Once we remove the gtk port and are 100% aura, all of these // should accept an Atom instead of a string. -UI_EXPORT bool GetIntProperty(XID window, const std::string& property_name, - int* value); -UI_EXPORT bool GetXIDProperty(XID window, const std::string& property_name, - XID* value); -UI_EXPORT bool GetIntArrayProperty(XID window, const std::string& property_name, - std::vector<int>* value); -UI_EXPORT bool GetAtomArrayProperty(XID window, - const std::string& property_name, - std::vector<Atom>* value); -UI_EXPORT bool GetStringProperty( - XID window, const std::string& property_name, std::string* value); +UI_BASE_EXPORT bool GetIntProperty(XID window, + const std::string& property_name, + int* value); +UI_BASE_EXPORT bool GetXIDProperty(XID window, + const std::string& property_name, + XID* value); +UI_BASE_EXPORT bool GetIntArrayProperty(XID window, + const std::string& property_name, + std::vector<int>* value); +UI_BASE_EXPORT bool GetAtomArrayProperty(XID window, + const std::string& property_name, + std::vector<Atom>* value); +UI_BASE_EXPORT bool GetStringProperty(XID window, + const std::string& property_name, + std::string* value); // These setters all make round trips. -UI_EXPORT bool SetIntProperty(XID window, - const std::string& name, - const std::string& type, - int value); -UI_EXPORT bool SetIntArrayProperty(XID window, +UI_BASE_EXPORT bool SetIntProperty(XID window, const std::string& name, const std::string& type, - const std::vector<int>& value); -UI_EXPORT bool SetAtomArrayProperty(XID window, + int value); +UI_BASE_EXPORT bool SetIntArrayProperty(XID window, + const std::string& name, + const std::string& type, + const std::vector<int>& value); +UI_BASE_EXPORT bool SetAtomProperty(XID window, const std::string& name, const std::string& type, - const std::vector<Atom>& value); + Atom value); +UI_BASE_EXPORT bool SetAtomArrayProperty(XID window, + const std::string& name, + const std::string& type, + const std::vector<Atom>& value); +UI_BASE_EXPORT bool SetStringProperty(XID window, + Atom property, + Atom type, + const std::string& value); // Gets the X atom for default display corresponding to atom_name. -Atom GetAtom(const char* atom_name); +UI_BASE_EXPORT Atom GetAtom(const char* atom_name); // Sets the WM_CLASS attribute for a given X11 window. -UI_EXPORT void SetWindowClassHint(XDisplay* display, - XID window, - const std::string& res_name, - const std::string& res_class); +UI_BASE_EXPORT void SetWindowClassHint(XDisplay* display, + XID window, + const std::string& res_name, + const std::string& res_class); // Sets the WM_WINDOW_ROLE attribute for a given X11 window. -UI_EXPORT void SetWindowRole(XDisplay* display, - XID window, - const std::string& role); - -// Get |window|'s parent window, or None if |window| is the root window. -UI_EXPORT XID GetParentWindow(XID window); +UI_BASE_EXPORT void SetWindowRole(XDisplay* display, + XID window, + const std::string& role); -// Walk up |window|'s hierarchy until we find a direct child of |root|. -XID GetHighestAncestorWindow(XID window, XID root); +// Determine whether we should default to native decorations or the custom +// frame based on the currently-running window manager. +UI_BASE_EXPORT bool GetCustomFramePrefDefault(); static const int kAllDesktops = -1; // Queries the desktop |window| is on, kAllDesktops if sticky. Returns false if @@ -225,7 +209,7 @@ static const int kAllDesktops = -1; bool GetWindowDesktop(XID window, int* desktop); // Translates an X11 error code into a printable string. -UI_EXPORT std::string GetX11ErrorString(XDisplay* display, int err); +UI_BASE_EXPORT std::string GetX11ErrorString(XDisplay* display, int err); // Implementers of this interface receive a notification for every X window of // the main display. @@ -241,44 +225,26 @@ class EnumerateWindowsDelegate { // Enumerates all windows in the current display. Will recurse into child // windows up to a depth of |max_depth|. -UI_EXPORT bool EnumerateAllWindows(EnumerateWindowsDelegate* delegate, - int max_depth); +UI_BASE_EXPORT bool EnumerateAllWindows(EnumerateWindowsDelegate* delegate, + int max_depth); // Enumerates the top-level windows of the current display. -UI_EXPORT void EnumerateTopLevelWindows(ui::EnumerateWindowsDelegate* delegate); +UI_BASE_EXPORT void EnumerateTopLevelWindows( + ui::EnumerateWindowsDelegate* delegate); // Returns all children windows of a given window in top-to-bottom stacking // order. -UI_EXPORT bool GetXWindowStack(XID window, std::vector<XID>* windows); - -// Restack a window in relation to one of its siblings. If |above| is true, -// |window| will be stacked directly above |sibling|; otherwise it will stacked -// directly below it. Both windows must be immediate children of the same -// window. -void RestackWindow(XID window, XID sibling, bool above); - -// Return a handle to a X ShmSeg. |shared_memory_key| is a SysV -// IPC key. The shared memory region must contain 32-bit pixels. -UI_EXPORT XSharedMemoryId AttachSharedMemory(XDisplay* display, - int shared_memory_support); -UI_EXPORT void DetachSharedMemory(XDisplay* display, XSharedMemoryId shmseg); +UI_BASE_EXPORT bool GetXWindowStack(XID window, std::vector<XID>* windows); // Copies |source_bounds| from |drawable| to |canvas| at offset |dest_offset|. // |source_bounds| is in physical pixels, while |dest_offset| is relative to // the canvas's scale. Note that this function is slow since it uses // XGetImage() to copy the data from the X server to this process before // copying it to |canvas|. -UI_EXPORT bool CopyAreaToCanvas(XID drawable, - gfx::Rect source_bounds, - gfx::Point dest_offset, - gfx::Canvas* canvas); - -// Return a handle to an XRender picture where |pixmap| is a handle to a -// pixmap containing Skia ARGB data. -UI_EXPORT XID CreatePictureFromSkiaPixmap(XDisplay* display, XID pixmap); - -void FreePicture(XDisplay* display, XID picture); -void FreePixmap(XDisplay* display, XID pixmap); +UI_BASE_EXPORT bool CopyAreaToCanvas(XID drawable, + gfx::Rect source_bounds, + gfx::Point dest_offset, + gfx::Canvas* canvas); enum WindowManagerName { WM_UNKNOWN, @@ -296,33 +262,26 @@ enum WindowManagerName { }; // Attempts to guess the window maager. Returns WM_UNKNOWN if we can't // determine it for one reason or another. -UI_EXPORT WindowManagerName GuessWindowManager(); - -// Change desktop for |window| to the desktop of |destination| window. -UI_EXPORT bool ChangeWindowDesktop(XID window, XID destination); +UI_BASE_EXPORT WindowManagerName GuessWindowManager(); // Enable the default X error handlers. These will log the error and abort // the process if called. Use SetX11ErrorHandlers() from x11_util_internal.h // to set your own error handlers. -UI_EXPORT void SetDefaultX11ErrorHandlers(); +UI_BASE_EXPORT void SetDefaultX11ErrorHandlers(); -// Return true if a given window is in full-screen mode. -UI_EXPORT bool IsX11WindowFullScreen(XID window); +// Returns true if a given window is in full-screen mode. +UI_BASE_EXPORT bool IsX11WindowFullScreen(XID window); -// Returns true if a given size is in list of bogus sizes in mm that X detects -// that should be ignored. -UI_EXPORT bool IsXDisplaySizeBlackListed(unsigned long mm_width, - unsigned long mm_height); +// Returns true if the window manager supports the given hint. +UI_BASE_EXPORT bool WmSupportsHint(Atom atom); // Manages a piece of X11 allocated memory as a RefCountedMemory segment. This // object takes ownership over the passed in memory and will free it with the // X11 allocator when done. -class UI_EXPORT XRefcountedMemory : public base::RefCountedMemory { +class UI_BASE_EXPORT XRefcountedMemory : public base::RefCountedMemory { public: XRefcountedMemory(unsigned char* x11_data, size_t length) - : x11_data_(length ? x11_data : NULL), - length_(length) { - } + : x11_data_(length ? x11_data : NULL), length_(length) {} // Overridden from RefCountedMemory: virtual const unsigned char* front() const OVERRIDE; @@ -339,7 +298,7 @@ class UI_EXPORT XRefcountedMemory : public base::RefCountedMemory { // Keeps track of a string returned by an X function (e.g. XGetAtomName) and // makes sure it's XFree'd. -class UI_EXPORT XScopedString { +class UI_BASE_EXPORT XScopedString { public: explicit XScopedString(char* str) : string_(str) {} ~XScopedString(); @@ -354,18 +313,14 @@ class UI_EXPORT XScopedString { // Keeps track of an image returned by an X function (e.g. XGetImage) and // makes sure it's XDestroyImage'd. -class UI_EXPORT XScopedImage { +class UI_BASE_EXPORT XScopedImage { public: explicit XScopedImage(XImage* image) : image_(image) {} ~XScopedImage(); - XImage* get() const { - return image_; - } + XImage* get() const { return image_; } - XImage* operator->() const { - return image_; - } + XImage* operator->() const { return image_; } void reset(XImage* image); @@ -377,7 +332,7 @@ class UI_EXPORT XScopedImage { // Keeps track of a cursor returned by an X function and makes sure it's // XFreeCursor'd. -class UI_EXPORT XScopedCursor { +class UI_BASE_EXPORT XScopedCursor { public: // Keeps track of |cursor| created with |display|. XScopedCursor(::Cursor cursor, XDisplay* display); @@ -393,6 +348,16 @@ class UI_EXPORT XScopedCursor { DISALLOW_COPY_AND_ASSIGN(XScopedCursor); }; +namespace test { +// Resets the cache used by GetXCursor(). Only useful for tests that may delete +// the display. +UI_BASE_EXPORT void ResetXCursorCache(); + +// Returns the cached XcursorImage for |cursor|. +UI_BASE_EXPORT const XcursorImage* GetCachedXcursorImage(::Cursor cursor); + +} // namespace test + } // namespace ui #endif // UI_BASE_X_X11_UTIL_H_ diff --git a/chromium/ui/base/x/x11_util_internal.h b/chromium/ui/base/x/x11_util_internal.h index b6816c70fff..f663fc5ac87 100644 --- a/chromium/ui/base/x/x11_util_internal.h +++ b/chromium/ui/base/x/x11_util_internal.h @@ -12,13 +12,13 @@ // when needed. extern "C" { +#include <X11/extensions/Xrender.h> +#include <X11/extensions/XShm.h> #include <X11/Xatom.h> #include <X11/Xlib.h> -#include <X11/extensions/XShm.h> -#include <X11/extensions/Xrender.h> } -#include "ui/base/ui_export.h" +#include "ui/base/ui_base_export.h" namespace ui { @@ -28,26 +28,21 @@ namespace ui { // Get the XRENDER format id for ARGB32 (Skia's format). // // NOTE:Currently this don't support multiple screens/displays. -XRenderPictFormat* GetRenderARGB32Format(Display* dpy); - -// Get the XRENDER format id for the default visual on the first screen. This -// is the format which our GTK window will have. -UI_EXPORT XRenderPictFormat* GetRenderVisualFormat(Display* dpy, - Visual* visual); +UI_BASE_EXPORT XRenderPictFormat* GetRenderARGB32Format(Display* dpy); // -------------------------------------------------------------------------- // X11 error handling. // Sets the X Error Handlers. Passing NULL for either will enable the default // error handler, which if called will log the error and abort the process. -UI_EXPORT void SetX11ErrorHandlers(XErrorHandler error_handler, - XIOErrorHandler io_error_handler); +UI_BASE_EXPORT void SetX11ErrorHandlers(XErrorHandler error_handler, + XIOErrorHandler io_error_handler); // NOTE: This function should not be called directly from the // X11 Error handler because it queries the server to decode the // error message, which may trigger other errors. A suitable workaround // is to post a task in the error handler to call this function. -UI_EXPORT void LogErrorEventDescription(Display* dpy, - const XErrorEvent& error_event); +UI_BASE_EXPORT void LogErrorEventDescription(Display* dpy, + const XErrorEvent& error_event); } // namespace ui diff --git a/chromium/ui/base/x/x11_util_unittest.cc b/chromium/ui/base/x/x11_util_unittest.cc deleted file mode 100644 index 01947266e10..00000000000 --- a/chromium/ui/base/x/x11_util_unittest.cc +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/x/x11_util.h" - -#include "testing/gtest/include/gtest/gtest.h" - -typedef testing::Test XUtilTest; - -namespace ui { - -TEST_F(XUtilTest, TestBlackListedDisplay) { - EXPECT_TRUE(IsXDisplaySizeBlackListed(10, 10)); - EXPECT_TRUE(IsXDisplaySizeBlackListed(40, 30)); - EXPECT_TRUE(IsXDisplaySizeBlackListed(50, 40)); - EXPECT_TRUE(IsXDisplaySizeBlackListed(160, 90)); - EXPECT_TRUE(IsXDisplaySizeBlackListed(160, 100)); - - EXPECT_FALSE(IsXDisplaySizeBlackListed(50, 60)); - EXPECT_FALSE(IsXDisplaySizeBlackListed(100, 70)); - EXPECT_FALSE(IsXDisplaySizeBlackListed(272, 181)); -} - -} |