blob: e378edff3cd06c55be3cd2476f5c6467f0d026e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
void RenderWidgetHost::OnMsgCreatePluginContainer(gfx::PluginWindowHandle id) {
// TODO(piman): view_ can only be NULL with delayed view creation in
// extensions (see ExtensionHost::CreateRenderViewSoon). Figure out how to
// support plugins in that case.
if (view_) {
view_->CreatePluginContainer(id);
} else {
deferred_plugin_handles_.push_back(id);
}
}
void RenderWidgetHost::OnMsgDestroyPluginContainer(gfx::PluginWindowHandle id) {
if (view_) {
view_->DestroyPluginContainer(id);
} else {
for (int i = 0;
i < static_cast<int>(deferred_plugin_handles_.size());
i++) {
if (deferred_plugin_handles_[i] == id) {
deferred_plugin_handles_.erase(deferred_plugin_handles_.begin() + i);
i--;
}
}
}
}
|