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

Unified Diff: ui/views/ime/input_method_bridge.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 months 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/views/ime/input_method_base.cc ('k') | ui/views/ime/input_method_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/ime/input_method_bridge.h
diff --git a/ui/views/ime/input_method_bridge.h b/ui/views/ime/input_method_bridge.h
deleted file mode 100644
index 43fb9479b0dd89e8911ffb2de96d15a469949f48..0000000000000000000000000000000000000000
--- a/ui/views/ime/input_method_bridge.h
+++ /dev/null
@@ -1,109 +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_VIEWS_IME_INPUT_METHOD_BRIDGE_H_
-#define UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/base/ime/text_input_client.h"
-#include "ui/gfx/rect.h"
-#include "ui/views/ime/input_method_base.h"
-
-namespace ui {
-class InputMethod;
-} // namespace ui
-
-namespace views {
-
-class View;
-
-// A "bridge" InputMethod implementation for views top-level widgets, which just
-// sends/receives IME related events to/from a system-wide ui::InputMethod
-// object.
-class InputMethodBridge : public InputMethodBase,
- public ui::TextInputClient {
- public:
- // |shared_input_method| indicates if |host| is shared among other top level
- // widgets.
- InputMethodBridge(internal::InputMethodDelegate* delegate,
- ui::InputMethod* host,
- bool shared_input_method);
- virtual ~InputMethodBridge();
-
- // Overridden from InputMethod:
- virtual void OnFocus() override;
- virtual void OnBlur() override;
- virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
- NativeEventResult* result) override;
- virtual void DispatchKeyEvent(const ui::KeyEvent& key) override;
- virtual void OnTextInputTypeChanged(View* view) override;
- virtual void OnCaretBoundsChanged(View* view) override;
- virtual void CancelComposition(View* view) override;
- virtual void OnInputLocaleChanged() override;
- virtual std::string GetInputLocale() override;
- virtual bool IsActive() override;
- virtual bool IsCandidatePopupOpen() const override;
- virtual void ShowImeIfNeeded() override;
-
- // Overridden from TextInputClient:
- virtual void SetCompositionText(
- const ui::CompositionText& composition) override;
- virtual void ConfirmCompositionText() override;
- virtual void ClearCompositionText() 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 bool CanComposeInline() const override;
- virtual gfx::Rect GetCaretBounds() const override;
- virtual bool GetCompositionCharacterBounds(uint32 index,
- gfx::Rect* rect) const override;
- virtual bool HasCompositionText() const override;
- virtual bool GetTextRange(gfx::Range* range) const override;
- virtual bool GetCompositionTextRange(gfx::Range* range) const override;
- virtual bool GetSelectionRange(gfx::Range* range) const override;
- virtual bool SetSelectionRange(const gfx::Range& range) override;
- virtual bool DeleteRange(const gfx::Range& range) override;
- virtual bool GetTextFromRange(const gfx::Range& range,
- base::string16* text) const override;
- virtual void OnInputMethodChanged() override;
- virtual bool ChangeTextDirectionAndLayoutAlignment(
- base::i18n::TextDirection direction) override;
- 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;
- virtual bool IsEditingCommandEnabled(int command_id) override;
- virtual void ExecuteEditingCommand(int command_id) override;
-
- // Overridden from FocusChangeListener.
- virtual void OnWillChangeFocus(View* focused_before, View* focused) override;
- virtual void OnDidChangeFocus(View* focused_before, View* focused) override;
-
- ui::InputMethod* GetHostInputMethod() const;
-
- private:
- class HostObserver;
-
- void UpdateViewFocusState();
-
- ui::InputMethod* host_;
-
- // An observer observing the host input method for cases that the host input
- // method is destroyed before this bridge input method.
- scoped_ptr<HostObserver> host_observer_;
-
- const bool shared_input_method_;
-
- DISALLOW_COPY_AND_ASSIGN(InputMethodBridge);
-};
-
-} // namespace views
-
-#endif // UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_
« no previous file with comments | « ui/views/ime/input_method_base.cc ('k') | ui/views/ime/input_method_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698