diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-06 21:40:32 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-06 21:40:32 +0000 |
commit | 7398dcc10a8029cfee85882f629e702449cc16b3 (patch) | |
tree | 6339c562a65058297e0a10cb62f405221a752a65 | |
parent | 409a271fa6c43f9aa93955acfcb6d970c76ac117 (diff) | |
download | chromium_src-7398dcc10a8029cfee85882f629e702449cc16b3.zip chromium_src-7398dcc10a8029cfee85882f629e702449cc16b3.tar.gz chromium_src-7398dcc10a8029cfee85882f629e702449cc16b3.tar.bz2 |
Get the rest of the chrome target to build (but not link) with USE_AURA.
http://crbug.com/93947
TEST=none
Review URL: http://codereview.chromium.org/7839002
Review URL: http://codereview.chromium.org/7839002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99830 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/common/native_web_keyboard_event_views.cc | 5 | ||||
-rw-r--r-- | chrome/default_plugin/default_plugin.gyp | 44 | ||||
-rw-r--r-- | content/browser/plugin_process_host.cc | 8 | ||||
-rw-r--r-- | content/common/content_message_generator.cc | 25 | ||||
-rw-r--r-- | content/content_browser.gypi | 11 | ||||
-rw-r--r-- | content/plugin/webplugin_delegate_stub.cc | 4 | ||||
-rw-r--r-- | content/renderer/render_view.cc | 3 | ||||
-rw-r--r-- | printing/printing.gyp | 6 | ||||
-rw-r--r-- | printing/printing_context_win.cc | 2 | ||||
-rw-r--r-- | webkit/glue/webkit_glue.gypi | 5 |
10 files changed, 85 insertions, 28 deletions
diff --git a/chrome/common/native_web_keyboard_event_views.cc b/chrome/common/native_web_keyboard_event_views.cc index 21e23cd..4d0a5c9 100644 --- a/chrome/common/native_web_keyboard_event_views.cc +++ b/chrome/common/native_web_keyboard_event_views.cc @@ -42,7 +42,10 @@ NativeWebKeyboardEventViews::NativeWebKeyboardEventViews( unmodifiedText[0] = event.GetUnmodifiedCharacter(); setKeyIdentifierFromWindowsKeyCode(); -#if defined(OS_WIN) +#if defined(USE_AURA) + // TODO(beng): + NOTIMPLEMENTED(); +#elif defined(OS_WIN) // |os_event| is a MSG struct, so we can copy it directly. os_event = event.native_event(); #elif defined(TOOLKIT_USES_GTK) diff --git a/chrome/default_plugin/default_plugin.gyp b/chrome/default_plugin/default_plugin.gyp index 1b89034..bb73479 100644 --- a/chrome/default_plugin/default_plugin.gyp +++ b/chrome/default_plugin/default_plugin.gyp @@ -38,25 +38,31 @@ 'plugin_main.h', ], 'conditions': [ - ['OS=="win"', { - 'link_settings': { - 'libraries': ['-lurlmon.lib'], - }, - 'sources': [ - 'default_plugin_resources.h', - 'install_dialog.cc', - 'install_dialog.h', - 'plugin_database_handler.cc', - 'plugin_database_handler.h', - 'plugin_install_job_monitor.cc', - 'plugin_install_job_monitor.h', - ], - }], - ['toolkit_uses_gtk == 1', { - 'dependencies': [ - '<(DEPTH)/build/linux/system.gyp:gtk', - ], - }], + ['use_aura==1', { + 'sources/': [ + ['exclude', '^plugin_impl_win.cc'], + ['exclude', '^plugin_impl_win.h'], + ], + }], + ['OS=="win"', { + 'link_settings': { + 'libraries': ['-lurlmon.lib'], + }, + 'sources': [ + 'default_plugin_resources.h', + 'install_dialog.cc', + 'install_dialog.h', + 'plugin_database_handler.cc', + 'plugin_database_handler.h', + 'plugin_install_job_monitor.cc', + 'plugin_install_job_monitor.h', + ], + }], + ['toolkit_uses_gtk == 1', { + 'dependencies': [ + '<(DEPTH)/build/linux/system.gyp:gtk', + ], + }], ], }, # This can't be part of chrome.gyp:chrome_resources because then there'd diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc index 19e9634..dfc3548 100644 --- a/content/browser/plugin_process_host.cc +++ b/content/browser/plugin_process_host.cc @@ -4,7 +4,7 @@ #include "content/browser/plugin_process_host.h" -#if defined(OS_WIN) +#if defined(OS_WIN) && !defined(USE_AURA) #include <windows.h> #elif defined(OS_POSIX) #include <utility> // for pair<> @@ -43,7 +43,7 @@ #include "ui/gfx/rect.h" #endif -#if defined(OS_WIN) +#if defined(OS_WIN) && !defined(USE_AURA) #include "base/win/windows_version.h" #include "webkit/plugins/npapi/plugin_constants_win.h" #include "webkit/plugins/npapi/webplugin_delegate_impl.h" @@ -115,7 +115,7 @@ PluginProcessHost::PluginProcessHost() } PluginProcessHost::~PluginProcessHost() { -#if defined(OS_WIN) +#if defined(OS_WIN) && !defined(USE_AURA) // We erase HWNDs from the plugin_parent_windows_set_ when we receive a // notification that the window is being destroyed. If we don't receive this // notification and the PluginProcessHost instance is being destroyed, it @@ -278,7 +278,7 @@ bool PluginProcessHost::OnMessageReceived(const IPC::Message& msg) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(PluginProcessHost, msg) IPC_MESSAGE_HANDLER(PluginProcessHostMsg_ChannelCreated, OnChannelCreated) -#if defined(OS_WIN) +#if defined(OS_WIN) && !defined(USE_AURA) IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginWindowDestroyed, OnPluginWindowDestroyed) IPC_MESSAGE_HANDLER(PluginProcessHostMsg_ReparentPluginWindow, diff --git a/content/common/content_message_generator.cc b/content/common/content_message_generator.cc index c09d6f0..5393a0e 100644 --- a/content/common/content_message_generator.cc +++ b/content/common/content_message_generator.cc @@ -14,6 +14,30 @@ #include "ipc/struct_destructor_macros.h" #include "content/common/content_message_generator.h" +#if defined(USE_AURA) +#include "ui/gfx/native_widget_types.h" + +namespace IPC { +// TODO(beng): Figure out why this is needed, fix that issue and remove +// this. Brett and I were unable to figure out why, but he +// thought this should be harmless. +template <> +struct ParamTraits<gfx::PluginWindowHandle> { + typedef gfx::PluginWindowHandle param_type; + static void Write(Message* m, const param_type& p) { + m->WriteUInt32(reinterpret_cast<uint32>(p)); + } + static bool Read(const Message* m, void** iter, param_type* r) { + DCHECK_EQ(sizeof(param_type), sizeof(uint32)); + return m->ReadUInt32(iter, reinterpret_cast<uint32*>(r)); + } + static void Log(const param_type& p, std::string* l) { + l->append(StringPrintf("0x%X", p)); + } +}; +} // namespace IPC +#endif + // Generate param traits write methods. #include "ipc/param_traits_write_macros.h" namespace IPC { @@ -31,4 +55,3 @@ namespace IPC { namespace IPC { #include "content/common/content_message_generator.h" } // namespace IPC - diff --git a/content/content_browser.gypi b/content/content_browser.gypi index 7e580b8..5b9b9f6 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi @@ -602,6 +602,17 @@ ['exclude', '^browser/renderer_host/render_widget_host_view_gtk.h'], ], }], + ['use_aura==1', { + 'sources/': [ + ['exclude', '^browser/accessibility/browser_accessibility_manager_win.cc'], + ['exclude', '^browser/accessibility/browser_accessibility_manager_win.h'], + ['exclude', '^browser/accessibility/browser_accessibility_win.cc'], + ['exclude', '^browser/accessibility/browser_accessibility_win.h'], + ['exclude', '^browser/renderer_host/render_widget_host_view_win.cc'], + ['exclude', '^browser/renderer_host/render_widget_host_view_win.h'], + ['exclude', '^browser/renderer_host/render_message_filter_win.cc'], + ], + }], ], }, ], diff --git a/content/plugin/webplugin_delegate_stub.cc b/content/plugin/webplugin_delegate_stub.cc index 824cd47..9a6fdbc 100644 --- a/content/plugin/webplugin_delegate_stub.cc +++ b/content/plugin/webplugin_delegate_stub.cc @@ -162,7 +162,9 @@ void WebPluginDelegateStub::OnInit(const PluginMsg_Init_Params& params, command_line.GetSwitchValuePath(switches::kPluginPath); gfx::PluginWindowHandle parent = gfx::kNullPluginWindow; -#if defined(OS_WIN) +#if defined(USE_AURA) + // Nothing. +#elif defined(OS_WIN) parent = gfx::NativeViewFromId(params.containing_window); #elif defined(OS_LINUX) // This code is disabled, See issue 17110. diff --git a/content/renderer/render_view.cc b/content/renderer/render_view.cc index e0cd4c2..1e8c4c6 100644 --- a/content/renderer/render_view.cc +++ b/content/renderer/render_view.cc @@ -3037,10 +3037,11 @@ webkit::npapi::WebPluginDelegate* RenderView::CreatePluginDelegate( bool in_process_plugin = RenderProcess::current()->UseInProcessPlugins(); if (in_process_plugin) { -#if defined(OS_WIN) // In-proc plugins aren't supported on Linux or Mac. +#if defined(OS_WIN) && !defined(USE_AURA) return webkit::npapi::WebPluginDelegateImpl::Create( file_path, mime_type, gfx::NativeViewFromId(host_window_)); #else + // In-proc plugins aren't supported on non-Windows. NOTIMPLEMENTED(); return NULL; #endif diff --git a/printing/printing.gyp b/printing/printing.gyp index 256108e..bdcf0de 100644 --- a/printing/printing.gyp +++ b/printing/printing.gyp @@ -110,6 +110,12 @@ '../build/linux/system.gyp:gtkprint', ], }], + ['use_aura==1', { + 'sources/': [ + ['exclude', '^printing_context_win.cc'], + ['exclude', '^printing_context_win.h'], + ], + }], ['OS=="mac" and use_skia==0', { 'sources/': [ ['exclude', 'pdf_metafile_skia\\.(cc|h)$'], diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc index c2ace8e..61f18ac 100644 --- a/printing/printing_context_win.cc +++ b/printing/printing_context_win.cc @@ -197,7 +197,7 @@ PrintingContextWin::~PrintingContextWin() { ReleaseContext(); } -void PrintingContextWin::AskUserForSettings(HWND view, +void PrintingContextWin::AskUserForSettings(gfx::NativeView view, int max_pages, bool has_selection, PrintSettingsCallback* callback) { diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index e427def..16acc67 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -461,6 +461,11 @@ 'sources/': [['exclude', '_(linux|gtk)(_data)?\\.cc$'], ['exclude', r'/gtk_']], }], + ['use_aura==1', { + 'sources/': [ + ['exclude', '^../plugins/npapi/webplugin_delegate_impl_win.cc'], + ], + }], ['OS!="mac"', { 'sources/': [['exclude', '_mac\\.(cc|mm)$']], 'sources!': [ |