OLD | NEW |
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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_ ? rwhva_->GetNativeView()->bounds() : gfx::Rect(); |
252 } | 252 } |
253 | 253 |
254 gfx::NativeView TouchEditableImplAura::GetNativeView() { | 254 gfx::NativeView TouchEditableImplAura::GetNativeView() const { |
255 return rwhva_ ? rwhva_->GetNativeView()->GetRootWindow() : NULL; | 255 return rwhva_ ? rwhva_->GetNativeView()->GetRootWindow() : NULL; |
256 } | 256 } |
257 | 257 |
258 void TouchEditableImplAura::ConvertPointToScreen(gfx::Point* point) { | 258 void TouchEditableImplAura::ConvertPointToScreen(gfx::Point* point) { |
259 if (!rwhva_) | 259 if (!rwhva_) |
260 return; | 260 return; |
261 aura::Window* window = rwhva_->GetNativeView(); | 261 aura::Window* window = rwhva_->GetNativeView(); |
262 aura::client::ScreenPositionClient* screen_position_client = | 262 aura::client::ScreenPositionClient* screen_position_client = |
263 aura::client::GetScreenPositionClient(window->GetRootWindow()); | 263 aura::client::GetScreenPositionClient(window->GetRootWindow()); |
264 if (screen_position_client) | 264 if (screen_position_client) |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 rwhva_ = NULL; | 373 rwhva_ = NULL; |
374 } | 374 } |
375 text_input_type_ = ui::TEXT_INPUT_TYPE_NONE; | 375 text_input_type_ = ui::TEXT_INPUT_TYPE_NONE; |
376 touch_selection_controller_.reset(); | 376 touch_selection_controller_.reset(); |
377 handles_hidden_due_to_scroll_ = false; | 377 handles_hidden_due_to_scroll_ = false; |
378 scroll_in_progress_ = false; | 378 scroll_in_progress_ = false; |
379 overscroll_in_progress_ = false; | 379 overscroll_in_progress_ = false; |
380 } | 380 } |
381 | 381 |
382 } // namespace content | 382 } // namespace content |
OLD | NEW |