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

Unified Diff: extensions/renderer/scoped_web_frame.h

Issue 2369613003: Require WebLocalFrame to be created with a non-null client (Closed)
Patch Set: oops Created 4 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
Index: extensions/renderer/scoped_web_frame.h
diff --git a/extensions/renderer/scoped_web_frame.h b/extensions/renderer/scoped_web_frame.h
index 948a289483bf174fdb6369ccd194577865835f4e..ebcc877994f7a471df363bbcfd47349c8586f5e2 100644
--- a/extensions/renderer/scoped_web_frame.h
+++ b/extensions/renderer/scoped_web_frame.h
@@ -6,6 +6,7 @@
#define SCOPED_WEB_FRAME_H_
#include "base/macros.h"
+#include "third_party/WebKit/public/web/WebFrameClient.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebView.h"
@@ -21,12 +22,15 @@ public:
blink::WebLocalFrame* frame() { return frame_; }
private:
- // The webview and the frame are kept alive by the ScopedWebFrame
- // because they are not destructed unless ~ScopedWebFrame explicitly
- // closes the webview and the frame.
- blink::WebView* view_;
- blink::WebLocalFrame* frame_;
- DISALLOW_COPY_AND_ASSIGN(ScopedWebFrame);
+ blink::WebFrameClient frame_client_;
+
+ // The webview and the frame are kept alive by the ScopedWebFrame
+ // because they are not destructed unless ~ScopedWebFrame explicitly
+ // closes the WebView.
+ blink::WebView* view_;
+ blink::WebLocalFrame* frame_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedWebFrame);
};
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698