| 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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 2767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2778 | 2778 |
| 2779 void WebContentsImpl::SelectAll() { | 2779 void WebContentsImpl::SelectAll() { |
| 2780 RenderFrameHost* focused_frame = GetFocusedFrame(); | 2780 RenderFrameHost* focused_frame = GetFocusedFrame(); |
| 2781 if (!focused_frame) | 2781 if (!focused_frame) |
| 2782 return; | 2782 return; |
| 2783 | 2783 |
| 2784 focused_frame->Send(new InputMsg_SelectAll(focused_frame->GetRoutingID())); | 2784 focused_frame->Send(new InputMsg_SelectAll(focused_frame->GetRoutingID())); |
| 2785 RecordAction(base::UserMetricsAction("SelectAll")); | 2785 RecordAction(base::UserMetricsAction("SelectAll")); |
| 2786 } | 2786 } |
| 2787 | 2787 |
| 2788 void WebContentsImpl::Unselect() { | 2788 void WebContentsImpl::CollapseSelection() { |
| 2789 RenderFrameHost* focused_frame = GetFocusedFrame(); | 2789 RenderFrameHost* focused_frame = GetFocusedFrame(); |
| 2790 if (!focused_frame) | 2790 if (!focused_frame) |
| 2791 return; | 2791 return; |
| 2792 | 2792 |
| 2793 focused_frame->Send(new InputMsg_Unselect(focused_frame->GetRoutingID())); | 2793 focused_frame->Send( |
| 2794 RecordAction(base::UserMetricsAction("Unselect")); | 2794 new InputMsg_CollapseSelection(focused_frame->GetRoutingID())); |
| 2795 } | 2795 } |
| 2796 | 2796 |
| 2797 void WebContentsImpl::Replace(const base::string16& word) { | 2797 void WebContentsImpl::Replace(const base::string16& word) { |
| 2798 RenderFrameHost* focused_frame = GetFocusedFrame(); | 2798 RenderFrameHost* focused_frame = GetFocusedFrame(); |
| 2799 if (!focused_frame) | 2799 if (!focused_frame) |
| 2800 return; | 2800 return; |
| 2801 | 2801 |
| 2802 focused_frame->Send(new InputMsg_Replace( | 2802 focused_frame->Send(new InputMsg_Replace( |
| 2803 focused_frame->GetRoutingID(), word)); | 2803 focused_frame->GetRoutingID(), word)); |
| 2804 } | 2804 } |
| (...skipping 2614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5419 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); | 5419 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); |
| 5420 if (!render_view_host) | 5420 if (!render_view_host) |
| 5421 continue; | 5421 continue; |
| 5422 render_view_host_set.insert(render_view_host); | 5422 render_view_host_set.insert(render_view_host); |
| 5423 } | 5423 } |
| 5424 for (RenderViewHost* render_view_host : render_view_host_set) | 5424 for (RenderViewHost* render_view_host : render_view_host_set) |
| 5425 render_view_host->OnWebkitPreferencesChanged(); | 5425 render_view_host->OnWebkitPreferencesChanged(); |
| 5426 } | 5426 } |
| 5427 | 5427 |
| 5428 } // namespace content | 5428 } // namespace content |
| OLD | NEW |