Commit 4a65826d authored by jam@chromium.org's avatar jam@chromium.org

Get rid of all chrome includes from RenderWidgetHostViewWin. We'll want to...

Get rid of all chrome includes from RenderWidgetHostViewWin. We'll want to move this to content so that the content browser can reuse all this code.
Review URL: http://codereview.chromium.org/7741006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98240 0039d316-1c4b-4281-b951-d872f2087c98
parent 19159ee8
......@@ -46,6 +46,7 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/ui/webui/chrome_web_ui_factory.h"
#include "chrome/common/child_process_logging.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/logging_chrome.h"
......@@ -769,6 +770,12 @@ int ChromeContentBrowserClient::GetCrashSignalFD(
}
#endif // defined(OS_LINUX)
#if defined(OS_WIN)
const wchar_t* ChromeContentBrowserClient::GetResourceDllName() {
return chrome::kBrowserResourcesDll;
}
#endif
#if defined(USE_NSS)
crypto::CryptoModuleBlockingPasswordDelegate*
ChromeContentBrowserClient::GetCryptoPasswordDelegate(
......
......@@ -120,6 +120,9 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
// Can return an optional fd for crash handling, otherwise returns -1.
virtual int GetCrashSignalFD(const std::string& process_type) OVERRIDE;
#endif
#if defined(OS_WIN)
virtual const wchar_t* GetResourceDllName() OVERRIDE;
#endif
#if defined(USE_NSS)
virtual
crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate(
......
......@@ -5,6 +5,16 @@
#include "chrome/browser/renderer_host/render_widget_host_view_views.h"
#include "base/logging.h"
#include "chrome/browser/renderer_host/render_widget_host_view_win.h"
#include "views/widget/widget.h"
// static
RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget(
RenderWidgetHost* widget) {
if (views::Widget::IsPureViews())
return new RenderWidgetHostViewViews(widget);
return new RenderWidgetHostViewWin(widget);
}
void RenderWidgetHostViewViews::UpdateCursor(const WebCursor& cursor) {
}
......
......@@ -22,25 +22,21 @@
#include "base/win/scoped_comptr.h"
#include "base/win/scoped_gdi_object.h"
#include "base/win/wrapped_window_proc.h"
#include "chrome/browser/browser_trial.h"
#include "chrome/browser/renderer_host/render_widget_host_view_views.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/render_messages.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
#include "content/browser/accessibility/browser_accessibility_state.h"
#include "content/browser/accessibility/browser_accessibility_win.h"
#include "content/browser/browser_thread.h"
#include "content/browser/content_browser_client.h"
#include "content/browser/plugin_process_host.h"
#include "content/browser/renderer_host/backing_store.h"
#include "content/browser/renderer_host/backing_store_win.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/common/content_switches.h"
#include "content/common/native_web_keyboard_event.h"
#include "content/common/notification_service.h"
#include "content/common/plugin_messages.h"
#include "content/common/view_messages.h"
#include "grit/webkit_resources.h"
#include "skia/ext/skia_utils_win.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
......@@ -228,16 +224,6 @@ ChangeWindowMessageFilterExFunction g_ChangeWindowMessageFilterEx;
} // namespace
// RenderWidgetHostView --------------------------------------------------------
// static
RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget(
RenderWidgetHost* widget) {
if (views::Widget::IsPureViews())
return new RenderWidgetHostViewViews(widget);
return new RenderWidgetHostViewWin(widget);
}
///////////////////////////////////////////////////////////////////////////////
// RenderWidgetHostViewWin, public:
......@@ -599,8 +585,8 @@ void RenderWidgetHostViewWin::UpdateCursor(const WebCursor& cursor) {
void RenderWidgetHostViewWin::UpdateCursorIfOverSelf() {
static HCURSOR kCursorArrow = LoadCursor(NULL, IDC_ARROW);
static HCURSOR kCursorAppStarting = LoadCursor(NULL, IDC_APPSTARTING);
static HINSTANCE module_handle =
GetModuleHandle(chrome::kBrowserResourcesDll);
static HINSTANCE module_handle = GetModuleHandle(
content::GetContentClient()->browser()->GetResourceDllName());
// If the mouse is over our HWND, then update the cursor state immediately.
CPoint pt;
......
......@@ -292,6 +292,11 @@ class ContentBrowserClient {
virtual int GetCrashSignalFD(const std::string& process_type) = 0;
#endif
#if defined(OS_WIN)
// Returns the name of the dll that contains cursors and other resources.
virtual const wchar_t* GetResourceDllName() = 0;
#endif
#if defined(USE_NSS)
// Return a delegate to authenticate and unlock |module|.
// This is called on a worker thread.
......
......@@ -258,6 +258,12 @@ int MockContentBrowserClient::GetCrashSignalFD(
}
#endif
#if defined(OS_WIN)
const wchar_t* MockContentBrowserClient::GetResourceDllName() {
return NULL;
}
#endif
#if defined(USE_NSS)
crypto::CryptoModuleBlockingPasswordDelegate*
MockContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) {
......
......@@ -124,6 +124,10 @@ class MockContentBrowserClient : public ContentBrowserClient {
virtual int GetCrashSignalFD(const std::string& process_type) OVERRIDE;
#endif
#if defined(OS_WIN)
virtual const wchar_t* GetResourceDllName() OVERRIDE;
#endif
#if defined(USE_NSS)
virtual
crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment