OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/render_widget_host_view_win.h" | 5 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/l10n_util_win.h" | 8 #include "app/l10n_util_win.h" |
9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 class NotifyPluginProcessHostTask : public Task { | 174 class NotifyPluginProcessHostTask : public Task { |
175 public: | 175 public: |
176 NotifyPluginProcessHostTask(HWND window, HWND parent) | 176 NotifyPluginProcessHostTask(HWND window, HWND parent) |
177 : window_(window), parent_(parent), tries_(kMaxTries) { } | 177 : window_(window), parent_(parent), tries_(kMaxTries) { } |
178 | 178 |
179 private: | 179 private: |
180 void Run() { | 180 void Run() { |
181 DWORD plugin_process_id; | 181 DWORD plugin_process_id; |
182 bool found_starting_plugin_process = false; | 182 bool found_starting_plugin_process = false; |
183 GetWindowThreadProcessId(window_, &plugin_process_id); | 183 GetWindowThreadProcessId(window_, &plugin_process_id); |
184 for (ChildProcessHost::Iterator iter(ChildProcessInfo::PLUGIN_PROCESS); | 184 for (BrowserChildProcessHost::Iterator iter( |
| 185 ChildProcessInfo::PLUGIN_PROCESS); |
185 !iter.Done(); ++iter) { | 186 !iter.Done(); ++iter) { |
186 PluginProcessHost* plugin = static_cast<PluginProcessHost*>(*iter); | 187 PluginProcessHost* plugin = static_cast<PluginProcessHost*>(*iter); |
187 if (!plugin->handle()) { | 188 if (!plugin->handle()) { |
188 found_starting_plugin_process = true; | 189 found_starting_plugin_process = true; |
189 continue; | 190 continue; |
190 } | 191 } |
191 if (base::GetProcId(plugin->handle()) == plugin_process_id) { | 192 if (base::GetProcId(plugin->handle()) == plugin_process_id) { |
192 plugin->AddWindow(parent_); | 193 plugin->AddWindow(parent_); |
193 return; | 194 return; |
194 } | 195 } |
(...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1716 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( | 1717 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( |
1717 gfx::NativeView native_view) { | 1718 gfx::NativeView native_view) { |
1718 if (::IsWindow(native_view)) { | 1719 if (::IsWindow(native_view)) { |
1719 HANDLE raw_render_host_view = ::GetProp(native_view, | 1720 HANDLE raw_render_host_view = ::GetProp(native_view, |
1720 kRenderWidgetHostViewKey); | 1721 kRenderWidgetHostViewKey); |
1721 if (raw_render_host_view) | 1722 if (raw_render_host_view) |
1722 return reinterpret_cast<RenderWidgetHostView*>(raw_render_host_view); | 1723 return reinterpret_cast<RenderWidgetHostView*>(raw_render_host_view); |
1723 } | 1724 } |
1724 return NULL; | 1725 return NULL; |
1725 } | 1726 } |
OLD | NEW |