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

Side by Side Diff: content/browser/web_contents/touch_editable_impl_aura.cc

Issue 138023004: Use local coordinates in TouchEditable interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added TODO for switching to screen coordinates Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/base/touch/touch_editing_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/web_contents/touch_editable_impl_aura.h" 5 #include "content/browser/web_contents/touch_editable_impl_aura.h"
6 6
7 #include "content/browser/renderer_host/render_widget_host_impl.h" 7 #include "content/browser/renderer_host/render_widget_host_impl.h"
8 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 8 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
9 #include "content/common/view_messages.h" 9 #include "content/common/view_messages.h"
10 #include "content/public/browser/render_widget_host.h" 10 #include "content/public/browser/render_widget_host.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 host->MoveCaret(point); 241 host->MoveCaret(point);
242 } 242 }
243 243
244 void TouchEditableImplAura::GetSelectionEndPoints(gfx::Rect* p1, 244 void TouchEditableImplAura::GetSelectionEndPoints(gfx::Rect* p1,
245 gfx::Rect* p2) { 245 gfx::Rect* p2) {
246 *p1 = selection_anchor_rect_; 246 *p1 = selection_anchor_rect_;
247 *p2 = selection_focus_rect_; 247 *p2 = selection_focus_rect_;
248 } 248 }
249 249
250 gfx::Rect TouchEditableImplAura::GetBounds() { 250 gfx::Rect TouchEditableImplAura::GetBounds() {
251 return rwhva_ ? rwhva_->GetNativeView()->bounds() : gfx::Rect(); 251 return rwhva_ ? gfx::Rect(rwhva_->GetNativeView()->bounds().size()) :
252 gfx::Rect();
252 } 253 }
253 254
254 gfx::NativeView TouchEditableImplAura::GetNativeView() const { 255 gfx::NativeView TouchEditableImplAura::GetNativeView() const {
255 return rwhva_ ? rwhva_->GetNativeView()->GetRootWindow() : NULL; 256 return rwhva_ ? rwhva_->GetNativeView()->GetRootWindow() : NULL;
256 } 257 }
257 258
258 void TouchEditableImplAura::ConvertPointToScreen(gfx::Point* point) { 259 void TouchEditableImplAura::ConvertPointToScreen(gfx::Point* point) {
259 if (!rwhva_) 260 if (!rwhva_)
260 return; 261 return;
261 aura::Window* window = rwhva_->GetNativeView(); 262 aura::Window* window = rwhva_->GetNativeView();
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 rwhva_ = NULL; 374 rwhva_ = NULL;
374 } 375 }
375 text_input_type_ = ui::TEXT_INPUT_TYPE_NONE; 376 text_input_type_ = ui::TEXT_INPUT_TYPE_NONE;
376 touch_selection_controller_.reset(); 377 touch_selection_controller_.reset();
377 handles_hidden_due_to_scroll_ = false; 378 handles_hidden_due_to_scroll_ = false;
378 scroll_in_progress_ = false; 379 scroll_in_progress_ = false;
379 overscroll_in_progress_ = false; 380 overscroll_in_progress_ = false;
380 } 381 }
381 382
382 } // namespace content 383 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/base/touch/touch_editing_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698