Notify selection controller on tab changes.

BUG=none
TEST=none


Review URL: http://codereview.chromium.org/7753015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98495 0039d316-1c4b-4281-b951-d872f2087c98
parent 7f625803
......@@ -149,6 +149,11 @@ void RenderWidgetHostViewViews::DidBecomeSelected() {
is_hidden_ = false;
if (host_)
host_->WasRestored();
if (touch_selection_controller_.get()) {
touch_selection_controller_->SelectionChanged(selection_start_,
selection_end_);
}
}
void RenderWidgetHostViewViews::WasHidden() {
......@@ -164,6 +169,9 @@ void RenderWidgetHostViewViews::WasHidden() {
// reduce its resource utilization.
if (host_)
host_->WasHidden();
if (touch_selection_controller_.get())
touch_selection_controller_->ClientViewLostFocus();
}
void RenderWidgetHostViewViews::SetSize(const gfx::Size& size) {
......@@ -330,6 +338,8 @@ void RenderWidgetHostViewViews::SelectionChanged(const std::string& text,
const gfx::Point& end) {
// TODO(anicolao): deal with the clipboard without GTK
NOTIMPLEMENTED();
selection_start_ = start;
selection_end_ = end;
if (touch_selection_controller_.get())
touch_selection_controller_->SelectionChanged(start, end);
}
......
......@@ -267,6 +267,8 @@ class RenderWidgetHostViewViews : public RenderWidgetHostView,
string16 tooltip_text_;
scoped_ptr<views::TouchSelectionController> touch_selection_controller_;
gfx::Point selection_start_;
gfx::Point selection_end_;
#if defined(TOUCH_UI)
std::map<uint64, scoped_refptr<AcceleratedSurfaceContainerTouch> >
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment