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

Unified Diff: chrome/renderer/extensions/app_window_custom_bindings.cc

Issue 10916291: Only inject the HTML titlebar into toplevel frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/app_window_custom_bindings.cc
diff --git a/chrome/renderer/extensions/app_window_custom_bindings.cc b/chrome/renderer/extensions/app_window_custom_bindings.cc
index de61374c83de0e10be4d53002d81c6467132a90a..65473b75021d042ad89236996efa62a7a84c0725 100644
--- a/chrome/renderer/extensions/app_window_custom_bindings.cc
+++ b/chrome/renderer/extensions/app_window_custom_bindings.cc
@@ -27,9 +27,12 @@ class DidCreateDocumentElementObserver : public content::RenderViewObserver {
}
virtual void DidCreateDocumentElement(WebKit::WebFrame* frame) OVERRIDE {
- v8::HandleScope handle_scope;
DCHECK(frame);
DCHECK(dispatcher_);
+ // Don't attempt to inject the titlebar into iframes.
+ if (frame->parent())
+ return;
+ v8::HandleScope handle_scope;
ChromeV8Context* v8_context =
dispatcher_->v8_context_set().GetByV8Context(
frame->mainWorldScriptContext());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698