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

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: Created 3 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
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 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 user_gesture, 1036 user_gesture,
1037 last_unlocked_by_target, 1037 last_unlocked_by_target,
1038 callback); 1038 callback);
1039 } 1039 }
1040 1040
1041 void WebViewGuest::SignalWhenReady(const base::Closure& callback) { 1041 void WebViewGuest::SignalWhenReady(const base::Closure& callback) {
1042 auto* manager = WebViewContentScriptManager::Get(browser_context()); 1042 auto* manager = WebViewContentScriptManager::Get(browser_context());
1043 manager->SignalOnScriptsLoaded(callback); 1043 manager->SignalOnScriptsLoaded(callback);
1044 } 1044 }
1045 1045
1046 bool WebViewGuest::ShouldHandleFindRequestsForEmbedder() const {
1047 if (web_view_guest_delegate_)
1048 return web_view_guest_delegate_->ShouldHandleFindRequestsForEmbedder();
1049 return false;
1050 }
1051
1052 void WebViewGuest::WillAttachToEmbedder() { 1046 void WebViewGuest::WillAttachToEmbedder() {
1053 rules_registry_id_ = GetOrGenerateRulesRegistryID( 1047 rules_registry_id_ = GetOrGenerateRulesRegistryID(
1054 owner_web_contents()->GetRenderProcessHost()->GetID(), 1048 owner_web_contents()->GetRenderProcessHost()->GetID(),
1055 view_instance_id()); 1049 view_instance_id());
1056 1050
1057 // We must install the mapping from guests to WebViews prior to resuming 1051 // We must install the mapping from guests to WebViews prior to resuming
1058 // suspended resource loads so that the WebRequest API will catch resource 1052 // suspended resource loads so that the WebRequest API will catch resource
1059 // requests. 1053 // requests.
1060 PushWebViewStateToIOThread(); 1054 PushWebViewStateToIOThread();
1061 } 1055 }
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 std::unique_ptr<base::DictionaryValue> args(new base::DictionaryValue()); 1552 std::unique_ptr<base::DictionaryValue> args(new base::DictionaryValue());
1559 DispatchEventToView(base::MakeUnique<GuestViewEvent>( 1553 DispatchEventToView(base::MakeUnique<GuestViewEvent>(
1560 webview::kEventExitFullscreen, std::move(args))); 1554 webview::kEventExitFullscreen, std::move(args)));
1561 } 1555 }
1562 // Since we changed fullscreen state, sending a Resize message ensures that 1556 // Since we changed fullscreen state, sending a Resize message ensures that
1563 // renderer/ sees the change. 1557 // renderer/ sees the change.
1564 web_contents()->GetRenderViewHost()->GetWidget()->WasResized(); 1558 web_contents()->GetRenderViewHost()->GetWidget()->WasResized();
1565 } 1559 }
1566 1560
1567 } // namespace extensions 1561 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698