| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 clipboard_writer.WriteText(text.substr(pos, n)); | 891 clipboard_writer.WriteText(text.substr(pos, n)); |
| 892 #endif // defined(USE_X11) && !defined(OS_CHROMEOS) | 892 #endif // defined(USE_X11) && !defined(OS_CHROMEOS) |
| 893 } | 893 } |
| 894 | 894 |
| 895 gfx::Size RenderWidgetHostViewAura::GetRequestedRendererSize() const { | 895 gfx::Size RenderWidgetHostViewAura::GetRequestedRendererSize() const { |
| 896 return delegated_frame_host_->GetRequestedRendererSize(); | 896 return delegated_frame_host_->GetRequestedRendererSize(); |
| 897 } | 897 } |
| 898 | 898 |
| 899 void RenderWidgetHostViewAura::SelectionBoundsChanged( | 899 void RenderWidgetHostViewAura::SelectionBoundsChanged( |
| 900 const ViewHostMsg_SelectionBounds_Params& params) { | 900 const ViewHostMsg_SelectionBounds_Params& params) { |
| 901 if (selection_anchor_rect_ == params.anchor_rect && | 901 gfx::Rect anchor_rect = gfx::ToEnclosingRect(params.anchor_rect); |
| 902 selection_focus_rect_ == params.focus_rect) | 902 gfx::Rect focus_rect = gfx::ToEnclosingRect(params.focus_rect); |
| 903 if (selection_anchor_rect_ == anchor_rect && |
| 904 selection_focus_rect_ == focus_rect) |
| 903 return; | 905 return; |
| 904 | 906 |
| 905 selection_anchor_rect_ = params.anchor_rect; | 907 selection_anchor_rect_ = anchor_rect; |
| 906 selection_focus_rect_ = params.focus_rect; | 908 selection_focus_rect_ = focus_rect; |
| 907 | 909 |
| 908 if (GetInputMethod()) | 910 if (GetInputMethod()) |
| 909 GetInputMethod()->OnCaretBoundsChanged(this); | 911 GetInputMethod()->OnCaretBoundsChanged(this); |
| 910 | 912 |
| 911 if (touch_editing_client_) { | 913 if (touch_editing_client_) { |
| 912 touch_editing_client_->OnSelectionOrCursorChanged(selection_anchor_rect_, | 914 touch_editing_client_->OnSelectionOrCursorChanged(selection_anchor_rect_, |
| 913 selection_focus_rect_); | 915 selection_focus_rect_); |
| 914 } | 916 } |
| 915 } | 917 } |
| 916 | 918 |
| (...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2375 | 2377 |
| 2376 //////////////////////////////////////////////////////////////////////////////// | 2378 //////////////////////////////////////////////////////////////////////////////// |
| 2377 // RenderWidgetHostViewBase, public: | 2379 // RenderWidgetHostViewBase, public: |
| 2378 | 2380 |
| 2379 // static | 2381 // static |
| 2380 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2382 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2381 GetScreenInfoForWindow(results, NULL); | 2383 GetScreenInfoForWindow(results, NULL); |
| 2382 } | 2384 } |
| 2383 | 2385 |
| 2384 } // namespace content | 2386 } // namespace content |
| OLD | NEW |