Separate RenderViewHost from RenderWidgetHost, part 1: public interface.
This is the first part of the separation of RenderViewHost and RenderWidgetHost. The separation of the Impls is yet to come.
BUG=478281
TEST=all green
Review URL: https://codereview.chromium.org/1392323003
Cr-Commit-Position: refs/heads/master@{#354258}
diff --git a/chrome/browser/file_select_helper.cc b/chrome/browser/file_select_helper.cc
index bbfae1b..034ec98 100644
--- a/chrome/browser/file_select_helper.cc
+++ b/chrome/browser/file_select_helper.cc
@@ -26,6 +26,7 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
@@ -406,9 +407,8 @@
notification_registrar_.RemoveAll();
content::WebContentsObserver::Observe(web_contents_);
notification_registrar_.Add(
- this,
- content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
- content::Source<RenderWidgetHost>(render_view_host_));
+ this, content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
+ content::Source<RenderWidgetHost>(render_view_host_->GetWidget()));
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
@@ -470,8 +470,8 @@
params.default_file_name :
profile_->last_selected_directory().Append(params.default_file_name);
- gfx::NativeWindow owning_window =
- platform_util::GetTopLevel(render_view_host_->GetView()->GetNativeView());
+ gfx::NativeWindow owning_window = platform_util::GetTopLevel(
+ render_view_host_->GetWidget()->GetView()->GetNativeView());
#if defined(OS_ANDROID)
// Android needs the original MIME types and an additional capture value.
@@ -539,7 +539,7 @@
switch (type) {
case content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED: {
DCHECK(content::Source<RenderWidgetHost>(source).ptr() ==
- render_view_host_);
+ render_view_host_->GetWidget());
render_view_host_ = NULL;
break;
}