im_context_->CancelComposition();
}
+bool RenderWidgetHostViewEfl::GetCompositionCharacterBounds(uint32 index, gfx::Rect* rect) const
+{
+ DCHECK(rect);
+ if (index >= composition_character_bounds_.size())
+ return false;
+
+ *rect = composition_character_bounds_[index];
+ return true;
+}
+
void RenderWidgetHostViewEfl::ImeCompositionRangeChanged(
- const gfx::Range&,
- const std::vector<gfx::Rect>&) {
- NOTIMPLEMENTED();
+ const gfx::Range& range,
+ const std::vector<gfx::Rect>& character_bounds) {
+ SelectionControllerEfl* controller = web_view_->GetSelectionController();
+ if (controller) {
+ if(controller->GetCaretSelectionStatus()){
+ controller->SetCaretSelectionStatus(false);
+ }
+ }
+
+ composition_character_bounds_ = character_bounds;
}
void RenderWidgetHostViewEfl::DidUpdateBackingStore(
#include "content/browser/accessibility/browser_accessibility_manager.h"
#include "content/browser/compositor/image_transport_factory.h"
#include "content/browser/compositor/owned_mailbox.h"
+#include "ui/base/ime/text_input_client.h"
#include "eweb_view.h"
#include <Evas.h>
#include <Ecore_Evas.h>
// RenderWidgetHostView class hierarchy described in render_widget_host_view.h.
class RenderWidgetHostViewEfl
: public RenderWidgetHostViewBase,
+ public ui::TextInputClient,
public base::SupportsWeakPtr<RenderWidgetHostViewEfl>,
public IPC::Sender {
public:
// IPC::Sender implementation:
virtual bool Send(IPC::Message*) OVERRIDE;
+ // Overridden from ui::TextInputClient implementation:
+ 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 { return gfx::NativeWindow(); }
+ virtual ui::TextInputType GetTextInputType() const OVERRIDE { return ui::TextInputType(); }
+ virtual ui::TextInputMode GetTextInputMode() const OVERRIDE { return ui::TextInputMode(); }
+ virtual bool CanComposeInline() const OVERRIDE { return false; }
+ virtual gfx::Rect GetCaretBounds() const OVERRIDE { return gfx::Rect(); }
+ virtual bool GetCompositionCharacterBounds(uint32 index,
+ gfx::Rect* rect) const OVERRIDE;
+ virtual bool HasCompositionText() const OVERRIDE { return false; }
+ virtual bool GetTextRange(gfx::Range* range) const OVERRIDE { return false; }
+ virtual bool GetCompositionTextRange(gfx::Range* range) const OVERRIDE { return false; }
+ virtual bool GetSelectionRange(gfx::Range* range) const 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,
+ base::string16* text) const OVERRIDE { return false; }
+ virtual void OnInputMethodChanged() OVERRIDE {}
+ 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 {}
+
void OnDidFirstVisuallyNonEmptyLayout();
void OnSelectionTextStyleState(const SelectionStylePrams&);
void OnDidChangeMaxScrollOffset(int, int);
- Evas* evas() const
- {
+ Evas* evas() const {
DCHECK(evas_);
return evas_;
}
void HandleShow();
void HandleHide();
- void HandleMove(int, int) { }
+ void HandleMove(int, int) {}
void HandleResize(int, int );
void HandleFocusIn();
void HandleFocusOut();
typedef std::map<gfx::PluginWindowHandle, Ecore_X_Window> PluginWindowToWidgetMap;
PluginWindowToWidgetMap plugin_window_to_widget_map_;
+ // The current composition character bounds.
+ std::vector<gfx::Rect> composition_character_bounds_;
+
// YUV readback pipeline.
scoped_ptr<content::ReadbackYUVInterface>
yuv_readback_pipeline_;