OLD | NEW |
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 "components/browsing_data/storage_partition_http_cache_data_remover.h" | 10 #include "components/browsing_data/storage_partition_http_cache_data_remover.h" |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 resource_redirect_details->new_url, | 666 resource_redirect_details->new_url, |
667 is_top_level); | 667 is_top_level); |
668 break; | 668 break; |
669 } | 669 } |
670 default: | 670 default: |
671 NOTREACHED() << "Unexpected notification sent."; | 671 NOTREACHED() << "Unexpected notification sent."; |
672 break; | 672 break; |
673 } | 673 } |
674 } | 674 } |
675 | 675 |
676 void WebViewGuest::StartFindInternal( | 676 void WebViewGuest::StartFind( |
677 const base::string16& search_text, | 677 const base::string16& search_text, |
678 const blink::WebFindOptions& options, | 678 const blink::WebFindOptions& options, |
679 scoped_refptr<WebViewInternalFindFunction> find_function) { | 679 scoped_refptr<WebViewInternalFindFunction> find_function) { |
680 find_helper_.Find(web_contents(), search_text, options, find_function); | 680 find_helper_.Find(web_contents(), search_text, options, find_function); |
681 } | 681 } |
682 | 682 |
683 void WebViewGuest::StopFindingInternal(content::StopFindAction action) { | 683 void WebViewGuest::StopFinding(content::StopFindAction action) { |
684 find_helper_.CancelAllFindSessions(); | 684 find_helper_.CancelAllFindSessions(); |
685 web_contents()->StopFinding(action); | 685 web_contents()->StopFinding(action); |
686 } | 686 } |
687 | 687 |
688 bool WebViewGuest::Go(int relative_index) { | 688 bool WebViewGuest::Go(int relative_index) { |
689 content::NavigationController& controller = web_contents()->GetController(); | 689 content::NavigationController& controller = web_contents()->GetController(); |
690 if (!controller.CanGoToOffset(relative_index)) | 690 if (!controller.CanGoToOffset(relative_index)) |
691 return false; | 691 return false; |
692 | 692 |
693 controller.GoToOffset(relative_index); | 693 controller.GoToOffset(relative_index); |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1493 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); | 1493 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); |
1494 DispatchEventToView( | 1494 DispatchEventToView( |
1495 new GuestViewEvent(webview::kEventExitFullscreen, args.Pass())); | 1495 new GuestViewEvent(webview::kEventExitFullscreen, args.Pass())); |
1496 } | 1496 } |
1497 // Since we changed fullscreen state, sending a Resize message ensures that | 1497 // Since we changed fullscreen state, sending a Resize message ensures that |
1498 // renderer/ sees the change. | 1498 // renderer/ sees the change. |
1499 web_contents()->GetRenderViewHost()->GetWidget()->WasResized(); | 1499 web_contents()->GetRenderViewHost()->GetWidget()->WasResized(); |
1500 } | 1500 } |
1501 | 1501 |
1502 } // namespace extensions | 1502 } // namespace extensions |
OLD | NEW |