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

Unified Diff: chrome/browser/extensions/extension_host_mac.mm

Issue 8520036: Revert 110262 - Have ExtensionHost use TabContents instead of RenderViewHost. Try #2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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: chrome/browser/extensions/extension_host_mac.mm
===================================================================
--- chrome/browser/extensions/extension_host_mac.mm (revision 110269)
+++ chrome/browser/extensions/extension_host_mac.mm (working copy)
@@ -22,6 +22,33 @@
}
}
+RenderWidgetHostView* ExtensionHostMac::CreateNewWidgetInternal(
+ int route_id,
+ WebKit::WebPopupType popup_type) {
+ // A RenderWidgetHostViewMac has lifetime scoped to the view. We'll retain it
+ // to allow it to survive the trip without being hosed.
+ RenderWidgetHostView* widget_view =
+ ExtensionHost::CreateNewWidgetInternal(route_id, popup_type);
+ RenderWidgetHostViewMac* widget_view_mac =
+ static_cast<RenderWidgetHostViewMac*>(widget_view);
+ [widget_view_mac->native_view() retain];
+
+ return widget_view;
+}
+
+void ExtensionHostMac::ShowCreatedWidgetInternal(
+ RenderWidgetHostView* widget_host_view,
+ const gfx::Rect& initial_pos) {
+ ExtensionHost::ShowCreatedWidgetInternal(widget_host_view, initial_pos);
+
+ // A RenderWidgetHostViewMac has lifetime scoped to the view. Now that it's
+ // properly embedded (or purposefully ignored) we can release the reference we
+ // took in CreateNewWidgetInternal().
+ RenderWidgetHostViewMac* widget_view_mac =
+ static_cast<RenderWidgetHostViewMac*>(widget_host_view);
+ [widget_view_mac->native_view() release];
+}
+
void ExtensionHostMac::UnhandledKeyboardEvent(
const NativeWebKeyboardEvent& event) {
if (event.skip_in_browser || event.type == NativeWebKeyboardEvent::Char ||
Property changes on: chrome/browser/extensions/extension_host_mac.mm
___________________________________________________________________
Added: svn:mergeinfo
« no previous file with comments | « chrome/browser/extensions/extension_host_mac.h ('k') | chrome/browser/extensions/extension_process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698