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

Unified Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 597753003: Implement find in page support for top level BrowserPlugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/browser_plugin/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index 0f03c3df5f056e4dd790b7b63bf76cacb2d79a50..ceafdda84244ba5d13435c3187e38bf7a1286a21 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -22,8 +22,10 @@
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/sad_plugin.h"
#include "third_party/WebKit/public/platform/WebRect.h"
+#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
+#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebPluginContainer.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "third_party/skia/include/core/SkCanvas.h"
@@ -134,6 +136,12 @@ void BrowserPlugin::Attach() {
attach_params.focused = ShouldGuestBeFocused();
attach_params.visible = visible_;
attach_params.origin = plugin_rect().origin();
+ attach_params.is_full_page_plugin = false;
+ if (container()) {
+ blink::WebLocalFrame* frame = container()->element().document().frame();
+ attach_params.is_full_page_plugin =
+ frame->view()->mainFrame()->document().isPluginDocument();
+ }
gfx::Size view_size(width(), height());
if (!view_size.IsEmpty()) {
PopulateResizeGuestParameters(view_size,
« no previous file with comments | « content/public/browser/browser_plugin_guest_delegate.cc ('k') | extensions/browser/api/web_view/web_view_internal_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698