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

Side by Side Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 6356004: If the user selects text in the current tab, and types CTRL-F,... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser/renderer_host/render_view_host.h" 5 #include "chrome/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 !base::i18n::IsRTL()) { 1306 !base::i18n::IsRTL()) {
1307 // Force the tooltip to have RTL directionality. 1307 // Force the tooltip to have RTL directionality.
1308 base::i18n::WrapStringWithRTLFormatting(&wrapped_tooltip_text); 1308 base::i18n::WrapStringWithRTLFormatting(&wrapped_tooltip_text);
1309 } 1309 }
1310 } 1310 }
1311 if (view()) 1311 if (view())
1312 view()->SetTooltipText(wrapped_tooltip_text); 1312 view()->SetTooltipText(wrapped_tooltip_text);
1313 } 1313 }
1314 1314
1315 void RenderViewHost::OnMsgSelectionChanged(const std::string& text) { 1315 void RenderViewHost::OnMsgSelectionChanged(const std::string& text) {
1316 selected_text_ = text;
1316 if (view()) 1317 if (view())
1317 view()->SelectionChanged(text); 1318 view()->SelectionChanged(text);
1318 } 1319 }
1319 1320
1320 void RenderViewHost::OnMsgRunFileChooser( 1321 void RenderViewHost::OnMsgRunFileChooser(
1321 const ViewHostMsg_RunFileChooser_Params& params) { 1322 const ViewHostMsg_RunFileChooser_Params& params) {
1322 RenderViewHostDelegate::FileSelect* file_select_delegate = 1323 RenderViewHostDelegate::FileSelect* file_select_delegate =
1323 delegate()->GetFileSelectDelegate(); 1324 delegate()->GetFileSelectDelegate();
1324 if (file_select_delegate) 1325 if (file_select_delegate)
1325 file_select_delegate->RunFileChooser(this, params); 1326 file_select_delegate->RunFileChooser(this, params);
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1813 1814
1814 if (!policy->CanRequestURL(renderer_id, *url)) { 1815 if (!policy->CanRequestURL(renderer_id, *url)) {
1815 // If this renderer is not permitted to request this URL, we invalidate the 1816 // If this renderer is not permitted to request this URL, we invalidate the
1816 // URL. This prevents us from storing the blocked URL and becoming confused 1817 // URL. This prevents us from storing the blocked URL and becoming confused
1817 // later. 1818 // later.
1818 VLOG(1) << "Blocked URL " << url->spec(); 1819 VLOG(1) << "Blocked URL " << url->spec();
1819 *url = GURL(); 1820 *url = GURL();
1820 } 1821 }
1821 } 1822 }
1822 1823
1824 std::string RenderViewHost::selected_text() {
1825 return selected_text_;
1826 }
1827
1823 void RenderViewHost::JavaScriptStressTestControl(int cmd, int param) { 1828 void RenderViewHost::JavaScriptStressTestControl(int cmd, int param) {
1824 Send(new ViewMsg_JavaScriptStressTestControl(routing_id(), cmd, param)); 1829 Send(new ViewMsg_JavaScriptStressTestControl(routing_id(), cmd, param));
1825 } 1830 }
1826 1831
1827 void RenderViewHost::OnExtensionPostMessage( 1832 void RenderViewHost::OnExtensionPostMessage(
1828 int port_id, const std::string& message) { 1833 int port_id, const std::string& message) {
1829 if (process()->profile()->GetExtensionMessageService()) { 1834 if (process()->profile()->GetExtensionMessageService()) {
1830 process()->profile()->GetExtensionMessageService()-> 1835 process()->profile()->GetExtensionMessageService()->
1831 PostMessageFromRenderer(port_id, message); 1836 PostMessageFromRenderer(port_id, message);
1832 } 1837 }
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 if (printer_query.get()) { 2025 if (printer_query.get()) {
2021 BrowserThread::PostTask( 2026 BrowserThread::PostTask(
2022 BrowserThread::IO, FROM_HERE, 2027 BrowserThread::IO, FROM_HERE,
2023 NewRunnableMethod(printer_query.get(), 2028 NewRunnableMethod(printer_query.get(),
2024 &printing::PrinterQuery::StopWorker)); 2029 &printing::PrinterQuery::StopWorker));
2025 } 2030 }
2026 2031
2027 // Send the printingDone msg for now. 2032 // Send the printingDone msg for now.
2028 Send(new ViewMsg_PrintingDone(routing_id(), params.document_cookie, true)); 2033 Send(new ViewMsg_PrintingDone(routing_id(), params.document_cookie, true));
2029 } 2034 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | chrome/browser/ui/find_bar/find_bar_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698