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

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

Issue 1205033005: Adds selection expansion support for Contextual Search. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed java tests Created 5 years, 5 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/input_messages.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) 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 <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after
2049 void WebContentsImpl::SelectRange(const gfx::Point& base, 2049 void WebContentsImpl::SelectRange(const gfx::Point& base,
2050 const gfx::Point& extent) { 2050 const gfx::Point& extent) {
2051 RenderFrameHost* focused_frame = GetFocusedFrame(); 2051 RenderFrameHost* focused_frame = GetFocusedFrame();
2052 if (!focused_frame) 2052 if (!focused_frame)
2053 return; 2053 return;
2054 2054
2055 focused_frame->Send( 2055 focused_frame->Send(
2056 new InputMsg_SelectRange(focused_frame->GetRoutingID(), base, extent)); 2056 new InputMsg_SelectRange(focused_frame->GetRoutingID(), base, extent));
2057 } 2057 }
2058 2058
2059 void WebContentsImpl::AdjustSelectionByCharacterOffset(int start_adjust,
2060 int end_adjust) {
2061 RenderFrameHost* focused_frame = GetFocusedFrame();
2062 if (!focused_frame)
2063 return;
2064
2065 focused_frame->Send(new InputMsg_AdjustSelectionByCharacterOffset(
2066 focused_frame->GetRoutingID(), start_adjust, end_adjust));
2067 }
2068
2059 void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) { 2069 void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) {
2060 const gfx::Size old_size = GetPreferredSize(); 2070 const gfx::Size old_size = GetPreferredSize();
2061 preferred_size_ = pref_size; 2071 preferred_size_ = pref_size;
2062 OnPreferredSizeChanged(old_size); 2072 OnPreferredSizeChanged(old_size);
2063 } 2073 }
2064 2074
2065 void WebContentsImpl::ResizeDueToAutoResize(const gfx::Size& new_size) { 2075 void WebContentsImpl::ResizeDueToAutoResize(const gfx::Size& new_size) {
2066 if (delegate_) 2076 if (delegate_)
2067 delegate_->ResizeDueToAutoResize(this, new_size); 2077 delegate_->ResizeDueToAutoResize(this, new_size);
2068 } 2078 }
(...skipping 2418 matching lines...) Expand 10 before | Expand all | Expand 10 after
4487 player_map->erase(it); 4497 player_map->erase(it);
4488 } 4498 }
4489 4499
4490 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4500 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4491 force_disable_overscroll_content_ = force_disable; 4501 force_disable_overscroll_content_ = force_disable;
4492 if (view_) 4502 if (view_)
4493 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4503 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4494 } 4504 }
4495 4505
4496 } // namespace content 4506 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/input_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698