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

Side by Side Diff: content/browser/renderer_host/render_widget_host_gtk.cc

Issue 9347042: Introduce content::RenderWidgetHostViewPort (in content/port/browser). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host.h" 5 #include "content/browser/renderer_host/render_widget_host.h"
6 6
7 #include "content/browser/renderer_host/render_widget_host_view.h" 7 #include "content/port/browser/render_widget_host_view_port.h"
8 8
9 void RenderWidgetHost::OnMsgCreatePluginContainer(gfx::PluginWindowHandle id) { 9 void RenderWidgetHost::OnMsgCreatePluginContainer(gfx::PluginWindowHandle id) {
10 // TODO(piman): view_ can only be NULL with delayed view creation in 10 // TODO(piman): view_ can only be NULL with delayed view creation in
11 // extensions (see ExtensionHost::CreateRenderViewSoon). Figure out how to 11 // extensions (see ExtensionHost::CreateRenderViewSoon). Figure out how to
12 // support plugins in that case. 12 // support plugins in that case.
13 if (view_) { 13 if (view_) {
14 view_->CreatePluginContainer(id); 14 view_->CreatePluginContainer(id);
15 } else { 15 } else {
16 deferred_plugin_handles_.push_back(id); 16 deferred_plugin_handles_.push_back(id);
17 } 17 }
18 } 18 }
19 19
20 void RenderWidgetHost::OnMsgDestroyPluginContainer(gfx::PluginWindowHandle id) { 20 void RenderWidgetHost::OnMsgDestroyPluginContainer(gfx::PluginWindowHandle id) {
21 if (view_) { 21 if (view_) {
22 view_->DestroyPluginContainer(id); 22 view_->DestroyPluginContainer(id);
23 } else { 23 } else {
24 for (int i = 0; 24 for (int i = 0;
25 i < static_cast<int>(deferred_plugin_handles_.size()); 25 i < static_cast<int>(deferred_plugin_handles_.size());
26 i++) { 26 i++) {
27 if (deferred_plugin_handles_[i] == id) { 27 if (deferred_plugin_handles_[i] == id) {
28 deferred_plugin_handles_.erase(deferred_plugin_handles_.begin() + i); 28 deferred_plugin_handles_.erase(deferred_plugin_handles_.begin() + i);
29 i--; 29 i--;
30 } 30 }
31 } 31 }
32 } 32 }
33 } 33 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host.cc ('k') | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698