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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2700613003: Enable find-in-page across GuestViews. (Closed)
Patch Set: Small fix. Created 3 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 5680 matching lines...) Expand 10 before | Expand all | Expand 10 after
5691 const base::string16& search_text, 5691 const base::string16& search_text,
5692 const WebFindOptions& options) { 5692 const WebFindOptions& options) {
5693 DCHECK(!search_text.empty()); 5693 DCHECK(!search_text.empty());
5694 5694
5695 blink::WebPlugin* plugin = GetWebPluginForFind(); 5695 blink::WebPlugin* plugin = GetWebPluginForFind();
5696 // Check if the plugin still exists in the document. 5696 // Check if the plugin still exists in the document.
5697 if (plugin) { 5697 if (plugin) {
5698 if (options.findNext) { 5698 if (options.findNext) {
5699 // Just navigate back/forward. 5699 // Just navigate back/forward.
5700 plugin->selectFindResult(options.forward, request_id); 5700 plugin->selectFindResult(options.forward, request_id);
5701 } else { 5701 render_view_->webview()->setFocusedFrame(frame_);
5702 if (!plugin->startFind(WebString::fromUTF16(search_text), 5702 } else if (!plugin->startFind(WebString::fromUTF16(search_text),
5703 options.matchCase, request_id)) { 5703 options.matchCase, request_id)) {
5704 // Send "no results". 5704 // Send "no results".
5705 SendFindReply(request_id, 0 /* match_count */, 0 /* ordinal */, 5705 SendFindReply(request_id, 0 /* match_count */, 0 /* ordinal */,
5706 gfx::Rect(), true /* final_status_update */); 5706 gfx::Rect(), true /* final_status_update */);
5707 }
5708 } 5707 }
5709 return; 5708 return;
5710 } 5709 }
5711 5710
5712 frame_->requestFind(request_id, WebString::fromUTF16(search_text), options); 5711 frame_->requestFind(request_id, WebString::fromUTF16(search_text), options);
5713 } 5712 }
5714 5713
5715 void RenderFrameImpl::OnClearActiveFindMatch() { 5714 void RenderFrameImpl::OnClearActiveFindMatch() {
5716 frame_->executeCommand(WebString::fromUTF8("CollapseSelection")); 5715 frame_->executeCommand(WebString::fromUTF8("CollapseSelection"));
5717 frame_->clearActiveFindMatch(); 5716 frame_->clearActiveFindMatch();
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after
6972 policy(info.defaultPolicy), 6971 policy(info.defaultPolicy),
6973 replaces_current_history_item(info.replacesCurrentHistoryItem), 6972 replaces_current_history_item(info.replacesCurrentHistoryItem),
6974 history_navigation_in_new_child_frame( 6973 history_navigation_in_new_child_frame(
6975 info.isHistoryNavigationInNewChildFrame), 6974 info.isHistoryNavigationInNewChildFrame),
6976 client_redirect(info.isClientRedirect), 6975 client_redirect(info.isClientRedirect),
6977 cache_disabled(info.isCacheDisabled), 6976 cache_disabled(info.isCacheDisabled),
6978 form(info.form), 6977 form(info.form),
6979 source_location(info.sourceLocation) {} 6978 source_location(info.sourceLocation) {}
6980 6979
6981 } // namespace content 6980 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/browser_plugin_guest_delegate.cc ('k') | content/test/data/find_in_embedded_pdf_page.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698