Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Unified Diff: win8/metro_driver/chrome_app_view_ash.h

Issue 83233002: Enable basic IME functionality under Ash on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix warnings (that are treated as an error) on 64-bit build Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/remote_root_window_host_win.cc ('k') | win8/metro_driver/chrome_app_view_ash.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: win8/metro_driver/chrome_app_view_ash.h
diff --git a/win8/metro_driver/chrome_app_view_ash.h b/win8/metro_driver/chrome_app_view_ash.h
index 9efd3f77994f427aec4bd4559275461642030aa2..d50255b1efec8e1ad8cea346325731aff56519ef 100644
--- a/win8/metro_driver/chrome_app_view_ash.h
+++ b/win8/metro_driver/chrome_app_view_ash.h
@@ -15,6 +15,7 @@
#include "base/strings/string16.h"
#include "ui/events/event_constants.h"
#include "win8/metro_driver/direct3d_helper.h"
+#include "win8/metro_driver/ime/text_service_delegate.h"
namespace base {
class FilePath;
@@ -25,6 +26,15 @@ class Listener;
class ChannelProxy;
}
+namespace metro_driver {
+class TextService;
+}
+
+namespace metro_viewer {
+struct CharacterBounds;
+struct UnderlineInfo;
+}
+
class OpenFilePickerSession;
class SaveFilePickerSession;
class FolderPickerSession;
@@ -33,7 +43,8 @@ class FilePickerSessionBase;
struct MetroViewerHostMsg_SaveAsDialogParams;
class ChromeAppViewAsh
- : public mswr::RuntimeClass<winapp::Core::IFrameworkView> {
+ : public mswr::RuntimeClass<winapp::Core::IFrameworkView>,
+ public metro_driver::TextServiceDelegate {
public:
ChromeAppViewAsh();
~ChromeAppViewAsh();
@@ -82,9 +93,23 @@ class ChromeAppViewAsh
void OnFolderPickerCompleted(FolderPickerSession* folder_picker,
bool success);
+ void OnImeCancelComposition();
+ void OnImeUpdateTextInputClient(
+ const std::vector<int32>& input_scopes,
+ const std::vector<metro_viewer::CharacterBounds>& character_bounds);
+
HWND core_window_hwnd() const { return core_window_hwnd_; }
+
private:
+ // TextServiceDelegate overrides.
+ virtual void OnCompositionChanged(
+ const string16& text,
+ int32 selection_start,
+ int32 selection_end,
+ const std::vector<metro_viewer::UnderlineInfo>& underlines) OVERRIDE;
+ virtual void OnTextCommitted(const string16& text) OVERRIDE;
+
HRESULT OnActivate(winapp::Core::ICoreApplicationView* view,
winapp::Activation::IActivatedEventArgs* args);
@@ -163,6 +188,9 @@ class ChromeAppViewAsh
// UI message loop to allow message passing into this thread.
base::MessageLoop ui_loop_;
+
+ // For IME support.
+ scoped_ptr<metro_driver::TextService> text_service_;
};
#endif // WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_
« no previous file with comments | « ui/aura/remote_root_window_host_win.cc ('k') | win8/metro_driver/chrome_app_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698