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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_guest.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
« no previous file with comments | « extensions/browser/guest_view/web_view/web_view_guest.h ('k') | pdf/out_of_process_instance.cc » ('j') | 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 user_gesture, 1032 user_gesture,
1033 last_unlocked_by_target, 1033 last_unlocked_by_target,
1034 callback); 1034 callback);
1035 } 1035 }
1036 1036
1037 void WebViewGuest::SignalWhenReady(const base::Closure& callback) { 1037 void WebViewGuest::SignalWhenReady(const base::Closure& callback) {
1038 auto* manager = WebViewContentScriptManager::Get(browser_context()); 1038 auto* manager = WebViewContentScriptManager::Get(browser_context());
1039 manager->SignalOnScriptsLoaded(callback); 1039 manager->SignalOnScriptsLoaded(callback);
1040 } 1040 }
1041 1041
1042 bool WebViewGuest::ShouldHandleFindRequestsForEmbedder() const {
1043 if (web_view_guest_delegate_)
1044 return web_view_guest_delegate_->ShouldHandleFindRequestsForEmbedder();
1045 return false;
1046 }
1047
1048 void WebViewGuest::WillAttachToEmbedder() { 1042 void WebViewGuest::WillAttachToEmbedder() {
1049 rules_registry_id_ = GetOrGenerateRulesRegistryID( 1043 rules_registry_id_ = GetOrGenerateRulesRegistryID(
1050 owner_web_contents()->GetRenderProcessHost()->GetID(), 1044 owner_web_contents()->GetRenderProcessHost()->GetID(),
1051 view_instance_id()); 1045 view_instance_id());
1052 1046
1053 // We must install the mapping from guests to WebViews prior to resuming 1047 // We must install the mapping from guests to WebViews prior to resuming
1054 // suspended resource loads so that the WebRequest API will catch resource 1048 // suspended resource loads so that the WebRequest API will catch resource
1055 // requests. 1049 // requests.
1056 PushWebViewStateToIOThread(); 1050 PushWebViewStateToIOThread();
1057 } 1051 }
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 std::unique_ptr<base::DictionaryValue> args(new base::DictionaryValue()); 1548 std::unique_ptr<base::DictionaryValue> args(new base::DictionaryValue());
1555 DispatchEventToView(base::MakeUnique<GuestViewEvent>( 1549 DispatchEventToView(base::MakeUnique<GuestViewEvent>(
1556 webview::kEventExitFullscreen, std::move(args))); 1550 webview::kEventExitFullscreen, std::move(args)));
1557 } 1551 }
1558 // Since we changed fullscreen state, sending a Resize message ensures that 1552 // Since we changed fullscreen state, sending a Resize message ensures that
1559 // renderer/ sees the change. 1553 // renderer/ sees the change.
1560 web_contents()->GetRenderViewHost()->GetWidget()->WasResized(); 1554 web_contents()->GetRenderViewHost()->GetWidget()->WasResized();
1561 } 1555 }
1562 1556
1563 } // namespace extensions 1557 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/guest_view/web_view/web_view_guest.h ('k') | pdf/out_of_process_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698