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

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

Issue 660137: Allow users to close the find session and activate the current link via ctrl-... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 WebFindOptions options; 384 WebFindOptions options;
385 options.forward = forward; 385 options.forward = forward;
386 options.matchCase = match_case; 386 options.matchCase = match_case;
387 options.findNext = find_next; 387 options.findNext = find_next;
388 Send(new ViewMsg_Find(routing_id(), request_id, search_text, options)); 388 Send(new ViewMsg_Find(routing_id(), request_id, search_text, options));
389 389
390 // This call is asynchronous and returns immediately. 390 // This call is asynchronous and returns immediately.
391 // The result of the search is sent as a notification message by the renderer. 391 // The result of the search is sent as a notification message by the renderer.
392 } 392 }
393 393
394 void RenderViewHost::StopFinding(bool clear_selection) { 394 void RenderViewHost::StopFinding(
395 Send(new ViewMsg_StopFinding(routing_id(), clear_selection)); 395 FindBarController::SelectionAction selection_action) {
396 ViewMsg_StopFinding_Params params;
397
398 switch (selection_action) {
399 case FindBarController::kClearSelection:
400 params.action = ViewMsg_StopFinding_Params::kClearSelection;
401 break;
402 case FindBarController::kKeepSelection:
403 params.action = ViewMsg_StopFinding_Params::kKeepSelection;
404 break;
405 case FindBarController::kActivateSelection:
406 params.action = ViewMsg_StopFinding_Params::kActivateSelection;
407 break;
408 default:
409 NOTREACHED();
410 }
411 Send(new ViewMsg_StopFinding(routing_id(), params));
396 } 412 }
397 413
398 void RenderViewHost::Zoom(PageZoom::Function function) { 414 void RenderViewHost::Zoom(PageZoom::Function function) {
399 Send(new ViewMsg_Zoom(routing_id(), function)); 415 Send(new ViewMsg_Zoom(routing_id(), function));
400 } 416 }
401 417
402 void RenderViewHost::SetPageEncoding(const std::string& encoding_name) { 418 void RenderViewHost::SetPageEncoding(const std::string& encoding_name) {
403 Send(new ViewMsg_SetPageEncoding(routing_id(), encoding_name)); 419 Send(new ViewMsg_SetPageEncoding(routing_id(), encoding_name));
404 } 420 }
405 421
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1852 integration_delegate->OnPageTranslated(page_id, 1868 integration_delegate->OnPageTranslated(page_id,
1853 original_lang, translated_lang); 1869 original_lang, translated_lang);
1854 } 1870 }
1855 1871
1856 void RenderViewHost::OnContentBlocked(ContentSettingsType type) { 1872 void RenderViewHost::OnContentBlocked(ContentSettingsType type) {
1857 RenderViewHostDelegate::Resource* resource_delegate = 1873 RenderViewHostDelegate::Resource* resource_delegate =
1858 delegate_->GetResourceDelegate(); 1874 delegate_->GetResourceDelegate();
1859 if (resource_delegate) 1875 if (resource_delegate)
1860 resource_delegate->OnContentBlocked(type); 1876 resource_delegate->OnContentBlocked(type);
1861 } 1877 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | chrome/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698