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

Unified Diff: chrome/browser/renderer_host/render_widget_host.cc

Issue 92043: Refactor ExtensionView to support a UI-less extension instance.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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 | « chrome/browser/renderer_host/render_widget_host.h ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_widget_host.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host.cc (revision 14851)
+++ chrome/browser/renderer_host/render_widget_host.cc (working copy)
@@ -4,7 +4,6 @@
#include "chrome/browser/renderer_host/render_widget_host.h"
-#include "base/gfx/native_widget_types.h"
#include "base/histogram.h"
#include "base/message_loop.h"
#include "base/keyboard_codes.h"
@@ -79,15 +78,19 @@
process_->Release(routing_id_);
}
+gfx::NativeViewId RenderWidgetHost::GetPluginNativeViewId() {
+ if (view_)
+ return gfx::IdFromNativeView(view_->GetPluginNativeView());
+ return NULL;
+}
+
void RenderWidgetHost::Init() {
DCHECK(process_->channel());
renderer_initialized_ = true;
// Send the ack along with the information on placement.
- gfx::NativeView plugin_view = view_->GetPluginNativeView();
- Send(new ViewMsg_CreatingNew_ACK(routing_id_,
- gfx::IdFromNativeView(plugin_view)));
+ Send(new ViewMsg_CreatingNew_ACK(routing_id_, GetPluginNativeViewId()));
WasResized();
}
@@ -459,7 +462,8 @@
void RenderWidgetHost::OnMsgRequestMove(const gfx::Rect& pos) {
// Note that we ignore the position.
- view_->SetSize(pos.size());
+ if (view_)
+ view_->SetSize(pos.size());
}
void RenderWidgetHost::OnMsgPaintRect(
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host.h ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698