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

Unified Diff: chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc

Issue 105553005: Make PepperWebPlugin not use RenderViews. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 7 years 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/renderer_host/pepper/pepper_flash_drm_host.cc
===================================================================
--- chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc (revision 242033)
+++ chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc (working copy)
@@ -15,8 +15,7 @@
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_security_policy.h"
-#include "content/public/browser/render_widget_host.h"
-#include "content/public/browser/render_widget_host_view.h"
+#include "content/public/browser/render_frame_host.h"
#include "content/public/common/pepper_plugin_info.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/host/dispatch_host_message.h"
@@ -46,9 +45,9 @@
// right monitor.
class MonitorFinder : public base::RefCountedThreadSafe<MonitorFinder> {
public:
- MonitorFinder(int process_id, int render_id)
+ MonitorFinder(int process_id, int render_frame_id)
: process_id_(process_id),
- render_id_(render_id),
+ render_frame_id_(render_frame_id),
monitor_(NULL),
request_sent_(0) {
}
@@ -72,14 +71,11 @@
void FetchMonitorFromWidget() {
InterlockedExchange(&request_sent_, 0);
- content::RenderWidgetHost* rwh =
- content::RenderWidgetHost::FromID(process_id_, render_id_);
- if (!rwh)
+ content::RenderFrameHost* rfh =
+ content::RenderFrameHost::FromID(process_id_, render_frame_id_);
+ if (!rfh)
return;
- content::RenderWidgetHostView* view = rwh->GetView();
- if (!view)
- return;
- gfx::NativeView native_view = view->GetNativeView();
+ gfx::NativeView native_view = rfh->GetNativeView();
#if defined(USE_AURA)
aura::WindowEventDispatcher* dispatcher = native_view->GetDispatcher();
if (!dispatcher)
@@ -94,7 +90,7 @@
}
const int process_id_;
- const int render_id_;
+ const int render_frame_id_;
volatile HMONITOR monitor_;
volatile long request_sent_;
};
@@ -118,10 +114,10 @@
weak_factory_(this){
// Grant permissions to read the flash voucher file.
int render_process_id;
- int render_view_id;
+ int render_frame_id;
bool success =
- host->GetRenderViewIDsForInstance(
- instance, &render_process_id, &render_view_id);
+ host->GetRenderFrameIDsForInstance(
+ instance, &render_process_id, &render_frame_id);
base::FilePath plugin_dir = host->GetPluginPath().DirName();
DCHECK(!plugin_dir.empty() && success);
base::FilePath voucher_file = plugin_dir.Append(
@@ -130,7 +126,7 @@
render_process_id, voucher_file);
fetcher_ = new DeviceIDFetcher(render_process_id);
- monitor_finder_ = new MonitorFinder(render_process_id, render_view_id);
+ monitor_finder_ = new MonitorFinder(render_process_id, render_frame_id);
monitor_finder_->GetMonitor();
}

Powered by Google App Engine
This is Rietveld 408576698