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

Side by Side Diff: chrome/renderer/render_view.cc

Issue 6363001: Makes chrome pass down the length of text as the end of the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add support for selection_end and fix selectionStart Created 9 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 | « chrome/renderer/render_view.h ('k') | chrome/renderer/searchbox_extension.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/renderer/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 4868 matching lines...) Expand 10 before | Expand all | Expand 10 after
4879 search_box_.x = bounds.x(); 4879 search_box_.x = bounds.x();
4880 search_box_.y = bounds.y(); 4880 search_box_.y = bounds.y();
4881 search_box_.width = bounds.width(); 4881 search_box_.width = bounds.width();
4882 search_box_.height = bounds.height(); 4882 search_box_.height = bounds.height();
4883 if (!webview() || !webview()->mainFrame()) 4883 if (!webview() || !webview()->mainFrame())
4884 return; 4884 return;
4885 extensions_v8::SearchBoxExtension::DispatchResize(webview()->mainFrame()); 4885 extensions_v8::SearchBoxExtension::DispatchResize(webview()->mainFrame());
4886 } 4886 }
4887 4887
4888 void RenderView::OnDetermineIfPageSupportsInstant(const string16& value, 4888 void RenderView::OnDetermineIfPageSupportsInstant(const string16& value,
4889 bool verbatim) { 4889 bool verbatim,
4890 int selection_start,
4891 int selection_end) {
4890 search_box_.value = value; 4892 search_box_.value = value;
4891 search_box_.verbatim = verbatim; 4893 search_box_.verbatim = verbatim;
4894 search_box_.selection_start = selection_start;
4895 search_box_.selection_end = selection_end;
4892 bool result = extensions_v8::SearchBoxExtension::PageSupportsInstant( 4896 bool result = extensions_v8::SearchBoxExtension::PageSupportsInstant(
4893 webview()->mainFrame()); 4897 webview()->mainFrame());
4894 Send(new ViewHostMsg_InstantSupportDetermined(routing_id_, page_id_, result)); 4898 Send(new ViewHostMsg_InstantSupportDetermined(routing_id_, page_id_, result));
4895 } 4899 }
4896 4900
4897 void RenderView::OnDisableScrollbarsForSmallWindows( 4901 void RenderView::OnDisableScrollbarsForSmallWindows(
4898 const gfx::Size& disable_scrollbar_size_limit) { 4902 const gfx::Size& disable_scrollbar_size_limit) {
4899 disable_scrollbars_size_limit_ = disable_scrollbar_size_limit; 4903 disable_scrollbars_size_limit_ = disable_scrollbar_size_limit;
4900 } 4904 }
4901 4905
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
5796 } 5800 }
5797 #endif 5801 #endif
5798 5802
5799 void RenderView::OnJavaScriptStressTestControl(int cmd, int param) { 5803 void RenderView::OnJavaScriptStressTestControl(int cmd, int param) {
5800 if (cmd == kJavaScriptStressTestSetStressRunType) { 5804 if (cmd == kJavaScriptStressTestSetStressRunType) {
5801 v8::Testing::SetStressRunType(static_cast<v8::Testing::StressType>(param)); 5805 v8::Testing::SetStressRunType(static_cast<v8::Testing::StressType>(param));
5802 } else if (cmd == kJavaScriptStressTestPrepareStressRun) { 5806 } else if (cmd == kJavaScriptStressTestPrepareStressRun) {
5803 v8::Testing::PrepareStressRun(param); 5807 v8::Testing::PrepareStressRun(param);
5804 } 5808 }
5805 } 5809 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.h ('k') | chrome/renderer/searchbox_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698