| Index: win8/metro_driver/ime/text_service.h
|
| diff --git a/win8/metro_driver/ime/text_service.h b/win8/metro_driver/ime/text_service.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e915a9e302a3fd39338a75537463c1ca4b5bdf94
|
| --- /dev/null
|
| +++ b/win8/metro_driver/ime/text_service.h
|
| @@ -0,0 +1,49 @@
|
| +// 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 WIN8_METRO_DRIVER_IME_TEXT_SERVICE_H_
|
| +#define WIN8_METRO_DRIVER_IME_TEXT_SERVICE_H_
|
| +
|
| +#include <Windows.h>
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "base/compiler_specific.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +
|
| +namespace metro_driver {
|
| +
|
| +class TextStoreDelegate;
|
| +
|
| +// A high level interface to interact with virtual text store built on top of
|
| +// Text Services Framewors (TSF).
|
| +class TextService {
|
| + public:
|
| + TextService(HWND window_handle, TextStoreDelegate* text_store_delegate);
|
| + ~TextService();
|
| +
|
| + // Cancels on-going composition. Does nothing if there is no composition.
|
| + void CancelComposition();
|
| +
|
| + // Updates document type with |input_scopes|. An empty |input_scopes|
|
| + // represents IMEs should be disabled until non-empty |input_scopes| is
|
| + // specified.
|
| + // Note: |input_scopes| is defined as std::vector<int32> here rather than
|
| + // std::vector<InputScope> because the wire format of IPC message
|
| + // MetroViewerHostMsg_ImeTextInputClientUpdated uses std::vector<int32> to
|
| + // avoid dependency on <InputScope.h> header.
|
| + void OnDocumentTypeChanged(const std::vector<int32>& input_scopes);
|
| +
|
| + // Notifies TSF that the attached window gains keyboard focus.
|
| + void OnWindowActivated();
|
| +
|
| + private:
|
| + struct InternalState;
|
| + scoped_ptr<InternalState> state_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(TextService);
|
| +};
|
| +
|
| +} // namespace metro_driver
|
| +
|
| +#endif // WIN8_METRO_DRIVER_IME_TEXT_SERVICE_H_
|
|
|