summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 00:30:32 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 00:30:32 +0000
commitd615ad7ae65beddc26c9833b7bfd1d7bdb6f3d7b (patch)
treeee692e43ef5cc38b4d64caaffe0c24232d006623
parent29e1eff79f5c6eae302a545124f636d1d48ef623 (diff)
downloadchromium_src-d615ad7ae65beddc26c9833b7bfd1d7bdb6f3d7b.zip
chromium_src-d615ad7ae65beddc26c9833b7bfd1d7bdb6f3d7b.tar.gz
chromium_src-d615ad7ae65beddc26c9833b7bfd1d7bdb6f3d7b.tar.bz2
Rename RenderWidgetHostView::GetPluginHWND to GetPluginNativeView
Review URL: http://codereview.chromium.org/19438 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8846 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc2
-rw-r--r--chrome/browser/renderer_host/render_widget_host.cc5
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view.h9
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_win.cc2
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_win.h2
-rw-r--r--chrome/browser/renderer_host/test_render_view_host.h4
-rw-r--r--chrome/browser/tab_contents/web_contents_view_win.cc12
-rw-r--r--chrome/browser/views/tab_contents_container_view.cc12
8 files changed, 23 insertions, 25 deletions
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index cfc8aff..567e7e2 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -153,7 +153,7 @@ bool RenderViewHost::CreateRenderView() {
modal_dialog_event.event = modal_dialog_event_handle;
#endif
- Send(new ViewMsg_New(gfx::IdFromNativeView(view()->GetPluginHWND()),
+ Send(new ViewMsg_New(gfx::IdFromNativeView(view()->GetPluginNativeView()),
modal_dialog_event,
delegate_->GetWebkitPrefs(),
routing_id()));
diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc
index b3108b5..281c61b 100644
--- a/chrome/browser/renderer_host/render_widget_host.cc
+++ b/chrome/browser/renderer_host/render_widget_host.cc
@@ -67,10 +67,9 @@ void RenderWidgetHost::Init() {
DCHECK(process_->channel());
// Send the ack along with the information on placement.
- HWND plugin_hwnd = view_->GetPluginHWND();
+ gfx::NativeView plugin_view = view_->GetPluginNativeView();
Send(new ViewMsg_CreatingNew_ACK(routing_id_,
- gfx::IdFromNativeView(plugin_hwnd)));
-
+ gfx::IdFromNativeView(plugin_view)));
WasResized();
}
diff --git a/chrome/browser/renderer_host/render_widget_host_view.h b/chrome/browser/renderer_host/render_widget_host_view.h
index 33d971c..2238773 100644
--- a/chrome/browser/renderer_host/render_widget_host_view.h
+++ b/chrome/browser/renderer_host/render_widget_host_view.h
@@ -7,13 +7,8 @@
#include "base/gfx/native_widget_types.h"
#include "base/shared_memory.h"
-#include "build/build_config.h"
#include "chrome/common/render_messages.h"
-#if defined(OS_WIN)
-#include <windows.h>
-#endif
-
namespace gfx {
class Rect;
class Size;
@@ -60,8 +55,8 @@ class RenderWidgetHostView {
// Tells the View to size itself to the specified size.
virtual void SetSize(const gfx::Size& size) = 0;
- // Retrieves the HWND used to contain plugin HWNDs.
- virtual gfx::NativeView GetPluginHWND() = 0;
+ // Retrieves the native view used to contain plugins.
+ virtual gfx::NativeView GetPluginNativeView() = 0;
// Moves all plugin windows as described in the given list.
virtual void MovePluginWindows(
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc
index 84962fe..4459d26 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_win.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc
@@ -137,7 +137,7 @@ void RenderWidgetHostViewWin::SetSize(const gfx::Size& size) {
EnsureTooltip();
}
-HWND RenderWidgetHostViewWin::GetPluginHWND() {
+gfx::NativeView RenderWidgetHostViewWin::GetPluginNativeView() {
return m_hWnd;
}
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.h b/chrome/browser/renderer_host/render_widget_host_view_win.h
index 3284ac6..0c8e6c3 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_win.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_win.h
@@ -124,7 +124,7 @@ class RenderWidgetHostViewWin :
virtual void DidBecomeSelected();
virtual void WasHidden();
virtual void SetSize(const gfx::Size& size);
- virtual HWND GetPluginHWND();
+ virtual gfx::NativeView GetPluginNativeView();
virtual void MovePluginWindows(
const std::vector<WebPluginGeometry>& plugin_window_moves);
virtual void Focus();
diff --git a/chrome/browser/renderer_host/test_render_view_host.h b/chrome/browser/renderer_host/test_render_view_host.h
index a332667..8618ea9 100644
--- a/chrome/browser/renderer_host/test_render_view_host.h
+++ b/chrome/browser/renderer_host/test_render_view_host.h
@@ -38,9 +38,7 @@ class TestRenderWidgetHostView : public RenderWidgetHostView {
virtual void DidBecomeSelected() {}
virtual void WasHidden() {}
virtual void SetSize(const gfx::Size& size) {}
-#if defined(OS_WIN)
- virtual HWND GetPluginHWND() { return NULL; }
-#endif
+ virtual gfx::NativeView GetPluginNativeView() { return NULL; }
virtual void MovePluginWindows(
const std::vector<WebPluginGeometry>& plugin_window_moves) {}
virtual void ForwardMouseEventToRenderer(UINT message,
diff --git a/chrome/browser/tab_contents/web_contents_view_win.cc b/chrome/browser/tab_contents/web_contents_view_win.cc
index 2c0ea3e..9f6ee1a 100644
--- a/chrome/browser/tab_contents/web_contents_view_win.cc
+++ b/chrome/browser/tab_contents/web_contents_view_win.cc
@@ -80,7 +80,7 @@ gfx::NativeView WebContentsViewWin::GetNativeView() const {
gfx::NativeView WebContentsViewWin::GetContentNativeView() const {
if (!web_contents_->render_widget_host_view())
return NULL;
- return web_contents_->render_widget_host_view()->GetPluginHWND();
+ return web_contents_->render_widget_host_view()->GetPluginNativeView();
}
void WebContentsViewWin::GetContainerBounds(gfx::Rect* out) const {
@@ -177,8 +177,9 @@ void WebContentsViewWin::SetPageTitle(const std::wstring& title) {
::SetWindowText(GetNativeView(), title.c_str());
// TODO(brettw) this call seems messy the way it reaches into the widget
// view, and I'm not sure it's necessary. Maybe we should just remove it.
- ::SetWindowText(web_contents_->render_widget_host_view()->GetPluginHWND(),
- title.c_str());
+ ::SetWindowText(
+ web_contents_->render_widget_host_view()->GetPluginNativeView(),
+ title.c_str());
}
}
@@ -373,7 +374,7 @@ RenderWidgetHostView* WebContentsViewWin::CreateNewWidgetInternal(
// TODO(brettw) this should not need to get the current RVHView from the
// WebContents. We should have it somewhere ourselves.
widget_view->set_parent_hwnd(
- web_contents_->render_widget_host_view()->GetPluginHWND());
+ web_contents_->render_widget_host_view()->GetPluginNativeView());
widget_view->set_close_on_deactivate(true);
widget_view->set_activatable(activatable);
@@ -519,7 +520,8 @@ void WebContentsViewWin::OnSetFocus(HWND window) {
// We NULL-check the render_view_host_ here because Windows can send us
// messages during the destruction process after it has been destroyed.
if (web_contents_->render_widget_host_view()) {
- HWND inner_hwnd = web_contents_->render_widget_host_view()->GetPluginHWND();
+ HWND inner_hwnd =
+ web_contents_->render_widget_host_view()->GetPluginNativeView();
if (::IsWindow(inner_hwnd))
::SetFocus(inner_hwnd);
}
diff --git a/chrome/browser/views/tab_contents_container_view.cc b/chrome/browser/views/tab_contents_container_view.cc
index cfcb301..2fb25a1 100644
--- a/chrome/browser/views/tab_contents_container_view.cc
+++ b/chrome/browser/views/tab_contents_container_view.cc
@@ -227,11 +227,15 @@ void TabContentsContainerView::RemoveObservers() {
void TabContentsContainerView::RenderViewHostChanged(RenderViewHost* old_host,
RenderViewHost* new_host) {
- if (old_host && old_host->view())
- FocusManager::UninstallFocusSubclass(old_host->view()->GetPluginHWND());
+ if (old_host && old_host->view()) {
+ FocusManager::UninstallFocusSubclass(
+ old_host->view()->GetPluginNativeView());
+ }
- if (new_host && new_host->view())
- FocusManager::InstallFocusSubclass(new_host->view()->GetPluginHWND(), this);
+ if (new_host && new_host->view()) {
+ FocusManager::InstallFocusSubclass(
+ new_host->view()->GetPluginNativeView(), this);
+ }
// If we are focused, we need to pass the focus to the new RenderViewHost.
FocusManager* focus_manager =