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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_guest.cc

Issue 901833002: Allow MimeHandlerViewGuest to be notified of StopFinding events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « extensions/browser/guest_view/web_view/web_view_guest.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/guest_view/web_view/web_view_guest.h" 5 #include "extensions/browser/guest_view/web_view/web_view_guest.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 resource_redirect_details->new_url, 549 resource_redirect_details->new_url,
550 is_top_level); 550 is_top_level);
551 break; 551 break;
552 } 552 }
553 default: 553 default:
554 NOTREACHED() << "Unexpected notification sent."; 554 NOTREACHED() << "Unexpected notification sent.";
555 break; 555 break;
556 } 556 }
557 } 557 }
558 558
559 void WebViewGuest::StartFinding( 559 void WebViewGuest::StartFindInternal(
560 const base::string16& search_text, 560 const base::string16& search_text,
561 const blink::WebFindOptions& options, 561 const blink::WebFindOptions& options,
562 scoped_refptr<WebViewInternalFindFunction> find_function) { 562 scoped_refptr<WebViewInternalFindFunction> find_function) {
563 find_helper_.Find(web_contents(), search_text, options, find_function); 563 find_helper_.Find(web_contents(), search_text, options, find_function);
564 } 564 }
565 565
566 void WebViewGuest::StopFinding(content::StopFindAction action) { 566 void WebViewGuest::StopFindingInternal(content::StopFindAction action) {
567 find_helper_.CancelAllFindSessions(); 567 find_helper_.CancelAllFindSessions();
568 web_contents()->StopFinding(action); 568 web_contents()->StopFinding(action);
569 } 569 }
570 570
571 bool WebViewGuest::Go(int relative_index) { 571 bool WebViewGuest::Go(int relative_index) {
572 content::NavigationController& controller = web_contents()->GetController(); 572 content::NavigationController& controller = web_contents()->GetController();
573 if (!controller.CanGoToOffset(relative_index)) 573 if (!controller.CanGoToOffset(relative_index))
574 return false; 574 return false;
575 575
576 controller.GoToOffset(relative_index); 576 controller.GoToOffset(relative_index);
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 WebViewGuest::From(owner_web_contents()->GetRenderProcessHost()->GetID(), 1213 WebViewGuest::From(owner_web_contents()->GetRenderProcessHost()->GetID(),
1214 new_window_instance_id); 1214 new_window_instance_id);
1215 if (!guest) 1215 if (!guest)
1216 return; 1216 return;
1217 1217
1218 if (!allow) 1218 if (!allow)
1219 guest->Destroy(); 1219 guest->Destroy();
1220 } 1220 }
1221 1221
1222 } // namespace extensions 1222 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/guest_view/web_view/web_view_guest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698