| 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..568e84648ea61414fdf2987a3a8432d727308146 100644
|
| --- a/win8/metro_driver/chrome_app_view_ash.h
|
| +++ b/win8/metro_driver/chrome_app_view_ash.h
|
| @@ -14,7 +14,11 @@
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/strings/string16.h"
|
| #include "ui/events/event_constants.h"
|
| +#include "ui/metro_viewer/ime_types.h"
|
| #include "win8/metro_driver/direct3d_helper.h"
|
| +#include "win8/metro_driver/ime/ime_popup_observer.h"
|
| +#include "win8/metro_driver/ime/language_profile_observer.h"
|
| +#include "win8/metro_driver/ime/text_store_delegate.h"
|
|
|
| namespace base {
|
| class FilePath;
|
| @@ -25,6 +29,15 @@ class Listener;
|
| class ChannelProxy;
|
| }
|
|
|
| +namespace metro_driver {
|
| +class TextService;
|
| +struct CompositionText;
|
| +}
|
| +
|
| +namespace metro_viewer {
|
| +struct UnderlineInfo;
|
| +}
|
| +
|
| class OpenFilePickerSession;
|
| class SaveFilePickerSession;
|
| class FolderPickerSession;
|
| @@ -33,7 +46,10 @@ class FilePickerSessionBase;
|
| struct MetroViewerHostMsg_SaveAsDialogParams;
|
|
|
| class ChromeAppViewAsh
|
| - : public mswr::RuntimeClass<winapp::Core::IFrameworkView> {
|
| + : public mswr::RuntimeClass<winapp::Core::IFrameworkView>,
|
| + public metro_driver::ImePopupObserver,
|
| + public metro_driver::LanguageProfileObserver,
|
| + public metro_driver::TextStoreDelegate {
|
| public:
|
| ChromeAppViewAsh();
|
| ~ChromeAppViewAsh();
|
| @@ -82,9 +98,31 @@ 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:
|
| + // ImePopupObserver overrides.
|
| + virtual void OnCandidatePopupChanged(bool shown) OVERRIDE;
|
| +
|
| + // LanguageProfileObserver:
|
| + virtual void OnInputSourceChanged(LANGID langid, bool is_ime) OVERRIDE;
|
| +
|
| + // TextStoreDelegate 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;
|
| + virtual RECT GetCaretBounds() OVERRIDE;
|
| + virtual bool GetCompositionCharacterBounds(uint32 index, RECT* rect) OVERRIDE;
|
| +
|
| HRESULT OnActivate(winapp::Core::ICoreApplicationView* view,
|
| winapp::Activation::IActivatedEventArgs* args);
|
|
|
| @@ -163,6 +201,11 @@ 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_;
|
| + struct TextInputClientState;
|
| + scoped_ptr<TextInputClientState> text_input_client_state_;
|
| };
|
|
|
| #endif // WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_
|
|
|