diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-11 18:25:58 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-11 18:25:58 +0000 |
commit | c997bc4b4403eb48f7ed1bb76a5392f4232bbdd9 (patch) | |
tree | e13ce03df198d9548851dd8e8aa02da3d6a978da | |
parent | 54ba65aa8b7f842f125f704dfabb589559e9f60d (diff) | |
download | chromium_src-c997bc4b4403eb48f7ed1bb76a5392f4232bbdd9.zip chromium_src-c997bc4b4403eb48f7ed1bb76a5392f4232bbdd9.tar.gz chromium_src-c997bc4b4403eb48f7ed1bb76a5392f4232bbdd9.tar.bz2 |
Remove a bunch of TOOLKIT_GTK in content/ and gpu/, as well as NPAPI plugins on linux
BUG=297026
Review URL: https://codereview.chromium.org/234533002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263288 0039d316-1c4b-4281-b951-d872f2087c98
63 files changed, 61 insertions, 848 deletions
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 4f4eff3..2f6a87f 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -1887,11 +1887,16 @@ ], }], ['OS!="android" and OS!="ios"', { + 'dependencies': [ + # build time dependency. + '../v8/src/d8.gyp:d8#host', + ], + }], + ['OS!="android" and OS!="ios" and OS!="linux"', { # npapi test plugin doesn't build on android or ios 'dependencies': [ # build time dependency. '../content/content_shell_and_tests.gyp:copy_npapi_test_plugin', - '../v8/src/d8.gyp:d8#host', ], }], ['enable_app_list==0', { diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc index 4ca6f30..2276f1a 100644 --- a/content/app/content_main_runner.cc +++ b/content/app/content_main_runner.cc @@ -106,7 +106,9 @@ int tc_set_new_mode(int mode); namespace content { extern int GpuMain(const content::MainFunctionParams&); #if defined(ENABLE_PLUGINS) +#if !defined(OS_LINUX) extern int PluginMain(const content::MainFunctionParams&); +#endif extern int PpapiPluginMain(const MainFunctionParams&); extern int PpapiBrokerMain(const MainFunctionParams&); #endif @@ -433,7 +435,9 @@ int RunNamedProcessTypeMain( #endif #if !defined(CHROME_MULTIPLE_DLL_BROWSER) #if defined(ENABLE_PLUGINS) +#if !defined(OS_LINUX) { switches::kPluginProcess, PluginMain }, +#endif { switches::kWorkerProcess, WorkerMain }, { switches::kPpapiPluginProcess, PpapiPluginMain }, { switches::kPpapiBrokerProcess, PpapiBrokerMain }, diff --git a/content/browser/accessibility/accessibility_tree_formatter.cc b/content/browser/accessibility/accessibility_tree_formatter.cc index edd366d..11ee7e6 100644 --- a/content/browser/accessibility/accessibility_tree_formatter.cc +++ b/content/browser/accessibility/accessibility_tree_formatter.cc @@ -92,8 +92,7 @@ void AccessibilityTreeFormatter::RecursiveFormatAccessibilityTree( } } -#if (!defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \ - !defined(TOOLKIT_GTK)) +#if (!defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_ANDROID)) void AccessibilityTreeFormatter::AddProperties(const BrowserAccessibility& node, base::DictionaryValue* dict) { dict->SetInteger("id", node.GetId()); diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc index f2f7e7f..5e1f94e 100644 --- a/content/browser/accessibility/browser_accessibility.cc +++ b/content/browser/accessibility/browser_accessibility.cc @@ -15,10 +15,9 @@ namespace content { #if !defined(OS_MACOSX) && \ !defined(OS_WIN) && \ - !defined(TOOLKIT_GTK) && \ !defined(OS_ANDROID) -// We have subclassess of BrowserAccessibility on Mac, Linux/GTK, -// and Win. For any other platform, instantiate the base class. +// We have subclassess of BrowserAccessibility on Mac and Win. For any other +// platform, instantiate the base class. // static BrowserAccessibility* BrowserAccessibility::Create() { return new BrowserAccessibility(); diff --git a/content/browser/accessibility/browser_accessibility.h b/content/browser/accessibility/browser_accessibility.h index d72a2ad..5ea3748 100644 --- a/content/browser/accessibility/browser_accessibility.h +++ b/content/browser/accessibility/browser_accessibility.h @@ -24,8 +24,6 @@ namespace content { class BrowserAccessibilityManager; #if defined(OS_WIN) class BrowserAccessibilityWin; -#elif defined(TOOLKIT_GTK) -class BrowserAccessibilityGtk; #endif //////////////////////////////////////////////////////////////////////////////// @@ -184,8 +182,6 @@ class CONTENT_EXPORT BrowserAccessibility { BrowserAccessibilityCocoa* ToBrowserAccessibilityCocoa(); #elif defined(OS_WIN) BrowserAccessibilityWin* ToBrowserAccessibilityWin(); -#elif defined(TOOLKIT_GTK) - BrowserAccessibilityGtk* ToBrowserAccessibilityGtk(); #endif // Accessing accessibility attributes: diff --git a/content/browser/accessibility/browser_accessibility_manager.cc b/content/browser/accessibility/browser_accessibility_manager.cc index a9fda6b..b91f3c1 100644 --- a/content/browser/accessibility/browser_accessibility_manager.cc +++ b/content/browser/accessibility/browser_accessibility_manager.cc @@ -16,10 +16,9 @@ BrowserAccessibility* BrowserAccessibilityFactory::Create() { #if !defined(OS_MACOSX) && \ !defined(OS_WIN) && \ - !defined(TOOLKIT_GTK) && \ !defined(OS_ANDROID) \ -// We have subclassess of BrowserAccessibilityManager on Mac, Linux/GTK, -// and Win. For any other platform, instantiate the base class. +// We have subclassess of BrowserAccessibilityManager on Mac, and Win. For any +// other platform, instantiate the base class. // static BrowserAccessibilityManager* BrowserAccessibilityManager::Create( const ui::AXNodeData& src, diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc index c71a1f0..bb23c95 100644 --- a/content/browser/frame_host/render_widget_host_view_child_frame.cc +++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc @@ -301,16 +301,6 @@ void RenderWidgetHostViewChildFrame::ShowDisambiguationPopup( } #endif // defined(OS_ANDROID) -#if defined(TOOLKIT_GTK) -GdkEventButton* RenderWidgetHostViewChildFrame::GetLastMouseDown() { - return NULL; -} - -gfx::NativeView RenderWidgetHostViewChildFrame::BuildInputMethodsGtkMenu() { - return NULL; -} -#endif // defined(TOOLKIT_GTK) - BackingStore* RenderWidgetHostViewChildFrame::AllocBackingStore( const gfx::Size& size) { NOTREACHED(); diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.h b/content/browser/frame_host/render_widget_host_view_child_frame.h index b9689d2..43cbc3a 100644 --- a/content/browser/frame_host/render_widget_host_view_child_frame.h +++ b/content/browser/frame_host/render_widget_host_view_child_frame.h @@ -158,11 +158,6 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame const SkBitmap& zoomed_bitmap) OVERRIDE; #endif // defined(OS_ANDROID) -#if defined(TOOLKIT_GTK) - virtual GdkEventButton* GetLastMouseDown() OVERRIDE; - virtual gfx::NativeView BuildInputMethodsGtkMenu() OVERRIDE; -#endif // defined(TOOLKIT_GTK) - #if defined(OS_WIN) virtual void SetParentNativeViewAccessible( gfx::NativeViewAccessible accessible_parent) OVERRIDE; diff --git a/content/browser/gpu/test_support_gpu.gypi b/content/browser/gpu/test_support_gpu.gypi index 742d53f..9dcedc0 100644 --- a/content/browser/gpu/test_support_gpu.gypi +++ b/content/browser/gpu/test_support_gpu.gypi @@ -51,7 +51,7 @@ # See comments about "xcode_settings" elsewhere in this file. 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, }], - ['toolkit_uses_gtk == 1 or chromeos==1 or (OS=="linux" and use_aura==1)', { + ['chromeos==1 or (OS=="linux" and use_aura==1)', { 'dependencies': [ '<(src_dir)/build/linux/system.gyp:ssl', ], diff --git a/content/browser/plugin_browsertest.cc b/content/browser/plugin_browsertest.cc index 4fe4b13..9effe32 100644 --- a/content/browser/plugin_browsertest.cc +++ b/content/browser/plugin_browsertest.cc @@ -331,9 +331,10 @@ IN_PROC_BROWSER_TEST_F(PluginTest, // If this flakes, reopen http://crbug.com/17645 // As of 6 July 2011, this test is flaky on Windows (perhaps due to timing out). -#if !defined(OS_MACOSX) +#if !defined(OS_MACOSX) && !defined(OS_LINUX) // Disabled on Mac because the plugin side isn't implemented yet, see // "TODO(port)" in plugin_javascript_open_popup.cc. +// Disabled on Linux because we don't support NPAPI any more. IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(OpenPopupWindowWithPlugin)) { LoadAndWait(GetURL("get_javascript_open_popup_with_plugin.html")); } diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc index e5492e1..c5eed71 100644 --- a/content/browser/renderer_host/render_message_filter.cc +++ b/content/browser/renderer_host/render_message_filter.cc @@ -446,7 +446,7 @@ bool RenderMessageFilter::OnMessageReceived(const IPC::Message& message, OnAllocatedSharedBitmap) IPC_MESSAGE_HANDLER(ChildProcessHostMsg_DeletedSharedBitmap, OnDeletedSharedBitmap) -#if defined(OS_POSIX) && !defined(TOOLKIT_GTK) && !defined(OS_ANDROID) +#if defined(OS_POSIX) && !defined(OS_ANDROID) IPC_MESSAGE_HANDLER(ViewHostMsg_AllocTransportDIB, OnAllocTransportDIB) IPC_MESSAGE_HANDLER(ViewHostMsg_FreeTransportDIB, OnFreeTransportDIB) #endif @@ -984,7 +984,7 @@ net::CookieStore* RenderMessageFilter::GetCookieStoreForURL( return request_context_->GetURLRequestContext()->cookie_store(); } -#if defined(OS_POSIX) && !defined(TOOLKIT_GTK) && !defined(OS_ANDROID) +#if defined(OS_POSIX) && !defined(OS_ANDROID) void RenderMessageFilter::OnAllocTransportDIB( uint32 size, bool cache_in_browser, TransportDIB::Handle* handle) { render_widget_helper_->AllocTransportDIB(size, cache_in_browser, handle); diff --git a/content/browser/renderer_host/render_sandbox_host_linux.cc b/content/browser/renderer_host/render_sandbox_host_linux.cc index 8b86435..2aea9ed 100644 --- a/content/browser/renderer_host/render_sandbox_host_linux.cc +++ b/content/browser/renderer_host/render_sandbox_host_linux.cc @@ -745,12 +745,9 @@ void RenderSandboxHostLinux::Init(const std::string& sandbox_path) { childs_lifeline_fd_ = pipefds[1]; // We need to be monothreaded before we fork(). -#if !defined(TOOLKIT_GTK) && !defined(THREAD_SANITIZER) - // Exclude gtk port as TestSuite in base/tests/test_suite.cc is calling - // gtk_init. - // TODO(oshima): Remove ifdef when above issues are resolved. +#if !defined(THREAD_SANITIZER) DCHECK_EQ(1, base::GetNumberOfThreads(base::GetCurrentProcessHandle())); -#endif // !defined(TOOLKIT_GTK) && !defined(THREAD_SANITIZER) +#endif // !defined(THREAD_SANITIZER) pid_ = fork(); if (pid_ == 0) { if (IGNORE_EINTR(close(fds[0])) < 0) diff --git a/content/browser/renderer_host/render_widget_helper.cc b/content/browser/renderer_host/render_widget_helper.cc index ae12858..2d3d3cc 100644 --- a/content/browser/renderer_host/render_widget_helper.cc +++ b/content/browser/renderer_host/render_widget_helper.cc @@ -97,7 +97,7 @@ RenderWidgetHelper::~RenderWidgetHelper() { // object, so we should not be destroyed unless pending_paints_ is empty! DCHECK(pending_paints_.empty()); -#if defined(OS_POSIX) && !defined(TOOLKIT_GTK) && !defined(OS_ANDROID) +#if defined(OS_POSIX) && !defined(OS_ANDROID) ClearAllocatedDIBs(); #endif } @@ -342,7 +342,7 @@ void RenderWidgetHelper::OnCreateFullscreenWidgetOnUI(int opener_id, host->CreateNewFullscreenWidget(route_id); } -#if defined(OS_POSIX) && !defined(TOOLKIT_GTK) && !defined(OS_ANDROID) +#if defined(OS_POSIX) && !defined(OS_ANDROID) TransportDIB* RenderWidgetHelper::MapTransportDIB(TransportDIB::Id dib_id) { base::AutoLock locked(allocated_dibs_lock_); diff --git a/content/browser/renderer_host/render_widget_helper.h b/content/browser/renderer_host/render_widget_helper.h index a81b1de..27739ee 100644 --- a/content/browser/renderer_host/render_widget_helper.h +++ b/content/browser/renderer_host/render_widget_helper.h @@ -134,7 +134,7 @@ class RenderWidgetHelper // created by CreateNewWindow which initially blocked the requests. void ResumeRequestsForView(int route_id); -#if defined(OS_POSIX) && !defined(TOOLKIT_GTK) && !defined(OS_ANDROID) +#if defined(OS_POSIX) && !defined(OS_ANDROID) // Given the id of a transport DIB, return a mapping to it or NULL on error. TransportDIB* MapTransportDIB(TransportDIB::Id dib_id); #endif diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h index b6f9cb7..0158de1 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h @@ -137,10 +137,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, virtual void LockBackingStore() OVERRIDE; virtual void UnlockBackingStore() OVERRIDE; #endif -#if defined(TOOLKIT_GTK) - virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect, - GdkWindow* target) OVERRIDE; -#elif defined(OS_MACOSX) +#if defined(OS_MACOSX) virtual gfx::Size GetBackingStoreSize() OVERRIDE; virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect, CGContextRef target) OVERRIDE; diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h index 8d1c427..5947681 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h @@ -9,10 +9,6 @@ #include <OpenGL/OpenGL.h> #endif -#if defined(TOOLKIT_GTK) -#include <gdk/gdk.h> -#endif - #include <string> #include <vector> diff --git a/content/browser/web_contents/web_contents_impl_browsertest.cc b/content/browser/web_contents/web_contents_impl_browsertest.cc index 3949928..18bae1b 100644 --- a/content/browser/web_contents/web_contents_impl_browsertest.cc +++ b/content/browser/web_contents/web_contents_impl_browsertest.cc @@ -33,7 +33,7 @@ void ResizeWebContentsView(Shell* shell, const gfx::Size& size, // window on Linux because if we don't, the next layout of the unchanged shell // window will resize WebContentsView back to the previous size. // SizeContents is a hack and should not be relied on. -#if defined(TOOLKIT_GTK) || defined(OS_MACOSX) +#if defined(OS_MACOSX) shell->SizeTo(size); // If |set_start_page| is true, start with blank page to make sure resize // takes effect. @@ -41,7 +41,7 @@ void ResizeWebContentsView(Shell* shell, const gfx::Size& size, NavigateToURL(shell, GURL("about://blank")); #else shell->web_contents()->GetView()->SizeContents(size); -#endif // defined(TOOLKIT_GTK) || defined(OS_MACOSX) +#endif // defined(OS_MACOSX) } class WebContentsImplBrowserTest : public ContentBrowserTest { @@ -258,9 +258,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, // TODO(shrikant): enable this for Windows when issue with // force-compositing-mode is resolved (http://crbug.com/281726). -// For TOOLKIT_GTK failure, see http://crbug.com/351234. // Also crashes under ThreadSanitizer, http://crbug.com/356758. -#if defined(OS_WIN) || defined(OS_ANDROID) || defined(TOOLKIT_GTK) \ +#if defined(OS_WIN) || defined(OS_ANDROID) \ || defined(THREAD_SANITIZER) #define MAYBE_GetSizeForNewRenderView DISABLED_GetSizeForNewRenderView #else diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui_impl.cc index 596caa0..8641919 100644 --- a/content/browser/webui/web_ui_impl.cc +++ b/content/browser/webui/web_ui_impl.cc @@ -91,8 +91,6 @@ void WebUIImpl::RenderViewCreated(RenderViewHost* render_view_host) { #if defined(TOOLKIT_VIEWS) render_view_host->SetWebUIProperty("toolkit", "views"); -#elif defined(TOOLKIT_GTK) - render_view_host->SetWebUIProperty("toolkit", "GTK"); #endif // defined(TOOLKIT_VIEWS) } diff --git a/content/child/npapi/plugin_host.cc b/content/child/npapi/plugin_host.cc index 39c6257..6a9a0d1 100644 --- a/content/child/npapi/plugin_host.cc +++ b/content/child/npapi/plugin_host.cc @@ -742,18 +742,6 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) { rv = NPERR_NO_ERROR; break; } - #if defined(TOOLKIT_GTK) - case NPNVToolkit: - // Tell them we are GTK2. (The alternative is GTK 1.2.) - *reinterpret_cast<int*>(value) = NPNVGtk2; - rv = NPERR_NO_ERROR; - break; - - case NPNVSupportsXEmbedBool: - *reinterpret_cast<NPBool*>(value) = true; - rv = NPERR_NO_ERROR; - break; - #endif case NPNVSupportsWindowless: { NPBool* supports_windowless = reinterpret_cast<NPBool*>(value); *supports_windowless = true; diff --git a/content/child/npapi/webplugin_delegate_impl.h b/content/child/npapi/webplugin_delegate_impl.h index a10eedd..d9ab5b9 100644 --- a/content/child/npapi/webplugin_delegate_impl.h +++ b/content/child/npapi/webplugin_delegate_impl.h @@ -20,12 +20,6 @@ #include "ui/gfx/native_widget_types.h" #include "ui/gfx/rect.h" -#if defined(USE_X11) -#include "ui/base/x/x11_util.h" - -typedef struct _GdkDrawable GdkPixmap; -#endif - namespace base { class FilePath; } @@ -198,12 +192,6 @@ class WebPluginDelegateImpl : public WebPluginDelegate { void CGPaint(CGContextRef context, const gfx::Rect& rect); #endif // OS_MACOSX && !USE_AURA -#if defined(USE_X11) - void SetWindowlessShmPixmap(XID shm_pixmap) { - windowless_shm_pixmap_ = shm_pixmap; - } -#endif - private: friend class base::DeleteHelper<WebPluginDelegateImpl>; friend class WebPluginDelegate; @@ -319,27 +307,6 @@ class WebPluginDelegateImpl : public WebPluginDelegate { scoped_ptr<WebPluginIMEWin> plugin_ime_; #endif // defined(OS_WIN) -#if defined(USE_X11) - // The SHM pixmap for a windowless plugin. - XID windowless_shm_pixmap_; -#endif - -#if defined(TOOLKIT_GTK) - // The pixmap we're drawing into, for a windowless plugin. - GdkPixmap* pixmap_; - double first_event_time_; - - // On Linux some plugins assume that the GtkSocket container is in the same - // process. So we create a GtkPlug to plug into the browser's container, and - // a GtkSocket to hold the plugin. We then send the GtkPlug to the browser - // process. - GtkWidget* plug_; - GtkWidget* socket_; - - // Ensure pixmap_ exists and is at least width by height pixels. - void EnsurePixmapAtLeastSize(int width, int height); -#endif - NPWindow window_; gfx::Rect window_rect_; gfx::Rect clip_rect_; diff --git a/content/common/cursors/webcursor_unittest.cc b/content/common/cursors/webcursor_unittest.cc index a57b843..31c6ea1 100644 --- a/content/common/cursors/webcursor_unittest.cc +++ b/content/common/cursors/webcursor_unittest.cc @@ -31,13 +31,6 @@ TEST(WebCursorTest, OKCursorSerialization) { ok_custom_pickle.WriteUInt32(0); PickleIterator iter(ok_custom_pickle); EXPECT_TRUE(custom_cursor.Deserialize(&iter)); - -#if defined(TOOLKIT_GTK) - // On GTK+ using platforms, we should get a real native GdkCursor object back - // (and the memory used should automatically be freed by the WebCursor object - // for valgrind tests). - EXPECT_TRUE(custom_cursor.GetCustomCursor()); -#endif } TEST(WebCursorTest, BrokenCursorSerialization) { @@ -193,13 +186,6 @@ TEST(WebCursorTest, EmptyImage) { // cursor. PickleIterator iter(broken_cursor_pickle); ASSERT_TRUE(custom_cursor.Deserialize(&iter)); - -#if defined(TOOLKIT_GTK) - // On GTK+ using platforms, we make sure that we get NULL back from this - // method; the relevant GDK methods take NULL as a request to use the default - // cursor. - EXPECT_EQ(NULL, custom_cursor.GetCustomCursor()); -#endif } TEST(WebCursorTest, Scale2) { @@ -222,13 +208,6 @@ TEST(WebCursorTest, Scale2) { ok_custom_pickle.WriteUInt32(0); PickleIterator iter(ok_custom_pickle); EXPECT_TRUE(custom_cursor.Deserialize(&iter)); - -#if defined(TOOLKIT_GTK) - // On GTK+ using platforms, we should get a real native GdkCursor object back - // (and the memory used should automatically be freed by the WebCursor object - // for valgrind tests). - EXPECT_TRUE(custom_cursor.GetCustomCursor()); -#endif } } // namespace content diff --git a/content/common/gpu/client/gl_helper_unittest.cc b/content/common/gpu/client/gl_helper_unittest.cc index 38b45ce..9e7af8c 100644 --- a/content/common/gpu/client/gl_helper_unittest.cc +++ b/content/common/gpu/client/gl_helper_unittest.cc @@ -39,10 +39,6 @@ #include "base/mac/scoped_nsautorelease_pool.h" #endif -#if defined(TOOLKIT_GTK) -#include "ui/gfx/gtk_util.h" -#endif - namespace content { using blink::WebGLId; @@ -1671,9 +1667,6 @@ int main(int argc, char** argv) { #if defined(OS_MACOSX) base::mac::ScopedNSAutoreleasePool pool; #endif -#if defined(TOOLKIT_GTK) - gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); -#endif gpu::ApplyGpuDriverBugWorkarounds(CommandLine::ForCurrentProcess()); content::UnitTestTestSuite runner(suite); diff --git a/content/common/plugin_process_messages.h b/content/common/plugin_process_messages.h index fb76a9e6..5eb7544 100644 --- a/content/common/plugin_process_messages.h +++ b/content/common/plugin_process_messages.h @@ -61,16 +61,6 @@ IPC_MESSAGE_CONTROL2(PluginProcessHostMsg_PluginWindowDestroyed, HWND /* parent */) #endif -#if defined(USE_X11) -// On X11, the mapping between NativeViewId and X window ids -// is known only to the browser. This message lets the plugin process -// ask about a NativeViewId that was provided by the renderer. -// It will get 0 back if it's a bogus input. -IPC_SYNC_MESSAGE_CONTROL1_1(PluginProcessHostMsg_MapNativeViewId, - gfx::NativeViewId /* input: native view id */, - gfx::PluginWindowHandle /* output: X window id */) -#endif - #if defined(OS_MACOSX) // On Mac OS X, we need the browser to keep track of plugin windows so // that it can add and remove them from stacking groups, hide and show the diff --git a/content/common/sandbox_linux/bpf_ppapi_policy_linux.cc b/content/common/sandbox_linux/bpf_ppapi_policy_linux.cc index 9e0e257e..3a59bfc 100644 --- a/content/common/sandbox_linux/bpf_ppapi_policy_linux.cc +++ b/content/common/sandbox_linux/bpf_ppapi_policy_linux.cc @@ -18,18 +18,6 @@ using sandbox::SyscallSets; namespace content { -namespace { - -inline bool IsUsingToolKitGtk() { -#if defined(TOOLKIT_GTK) - return true; -#else - return false; -#endif -} - -} // namespace - PpapiProcessPolicy::PpapiProcessPolicy() {} PpapiProcessPolicy::~PpapiProcessPolicy() {} @@ -51,17 +39,6 @@ ErrorCode PpapiProcessPolicy::EvaluateSyscall(SandboxBPF* sandbox, case __NR_ioctl: return ErrorCode(ENOTTY); // Flash Access. default: - if (IsUsingToolKitGtk()) { -#if defined(__x86_64__) || defined(__arm__) - if (SyscallSets::IsSystemVSharedMemory(sysno)) - return ErrorCode(ErrorCode::ERR_ALLOWED); -#endif -#if defined(__i386__) - if (SyscallSets::IsSystemVIpc(sysno)) - return ErrorCode(ErrorCode::ERR_ALLOWED); -#endif - } - // Default on the baseline policy. return SandboxBPFBasePolicy::EvaluateSyscall(sandbox, sysno); } diff --git a/content/common/sandbox_linux/bpf_renderer_policy_linux.cc b/content/common/sandbox_linux/bpf_renderer_policy_linux.cc index f4c19a6..eba2eca 100644 --- a/content/common/sandbox_linux/bpf_renderer_policy_linux.cc +++ b/content/common/sandbox_linux/bpf_renderer_policy_linux.cc @@ -18,18 +18,6 @@ using sandbox::SyscallSets; namespace content { -namespace { - -inline bool IsUsingToolKitGtk() { -#if defined(TOOLKIT_GTK) - return true; -#else - return false; -#endif -} - -} // namespace - RendererProcessPolicy::RendererProcessPolicy() {} RendererProcessPolicy::~RendererProcessPolicy() {} @@ -72,17 +60,6 @@ ErrorCode RendererProcessPolicy::EvaluateSyscall(SandboxBPF* sandbox, case __NR_prlimit64: return ErrorCode(EPERM); // See crbug.com/160157. default: - if (IsUsingToolKitGtk()) { -#if defined(__x86_64__) || defined(__arm__) - if (SyscallSets::IsSystemVSharedMemory(sysno)) - return ErrorCode(ErrorCode::ERR_ALLOWED); -#endif -#if defined(__i386__) - if (SyscallSets::IsSystemVIpc(sysno)) - return ErrorCode(ErrorCode::ERR_ALLOWED); -#endif - } - // Default on the content baseline policy. return SandboxBPFBasePolicy::EvaluateSyscall(sandbox, sysno); } diff --git a/content/common/swapped_out_messages.cc b/content/common/swapped_out_messages.cc index 29709ed..e835966 100644 --- a/content/common/swapped_out_messages.cc +++ b/content/common/swapped_out_messages.cc @@ -88,11 +88,6 @@ bool SwappedOutMessages::CanHandleWhileSwappedOut( case ViewHostMsg_RequestMove::ID: // Sends an ACK. case AccessibilityHostMsg_Events::ID: -#if defined(USE_X11) - // Synchronous message when leaving a page with plugin. In this case, - // we want to destroy the plugin rather than return an error message. - case ViewHostMsg_DestroyPluginContainer::ID: -#endif return true; default: break; diff --git a/content/common/view_messages.h b/content/common/view_messages.h index 34ea98c..87b1e1e 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h @@ -1467,20 +1467,6 @@ IPC_MESSAGE_ROUTED3(ViewHostMsg_RequestPpapiBrokerPermission, GURL /* document_url */, base::FilePath /* plugin_path */) -#if defined(USE_X11) -// A renderer sends this when it needs a browser-side widget for -// hosting a windowed plugin. id is the XID of the plugin window, for which -// the container is created. -IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_CreatePluginContainer, - gfx::PluginWindowHandle /* id */) - -// Destroy a plugin container previously created using CreatePluginContainer. -// id is the XID of the plugin window corresponding to the container that is -// to be destroyed. -IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_DestroyPluginContainer, - gfx::PluginWindowHandle /* id */) -#endif - // Send the tooltip text for the current mouse position to the browser. IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText, base::string16 /* tooltip text string */, diff --git a/content/content_browsertests.isolate b/content/content_browsertests.isolate index de3675f..87c8da4 100644 --- a/content/content_browsertests.isolate +++ b/content/content_browsertests.isolate @@ -34,7 +34,6 @@ '<(PRODUCT_DIR)/libclearkeycdmadapter.so', '<(PRODUCT_DIR)/libffmpegsumo.so', '<(PRODUCT_DIR)/plugins/libtest_netscape_plugin.so', - '<(PRODUCT_DIR)/plugins/libnpapi_test_plugin.so', ], }, }], diff --git a/content/content_plugin.gypi b/content/content_plugin.gypi index 9219580..2b53523 100644 --- a/content/content_plugin.gypi +++ b/content/content_plugin.gypi @@ -4,7 +4,7 @@ { 'conditions': [ - ['enable_plugins==1', { + ['enable_plugins==1 and OS!="linux"', { 'dependencies': [ '../skia/skia.gyp:skia', '../third_party/WebKit/public/blink.gyp:blink', @@ -21,7 +21,6 @@ 'plugin/plugin_interpose_util_mac.mm', 'plugin/plugin_interpose_util_mac.h', 'plugin/plugin_main.cc', - 'plugin/plugin_main_linux.cc', 'plugin/plugin_main_mac.mm', 'plugin/plugin_thread.cc', 'plugin/plugin_thread.h', @@ -36,21 +35,11 @@ # These are layered in conditionals in the event other platforms # end up using this module as well. 'conditions': [ - ['os_bsd==1', { - 'sources/': [ - ['exclude', '^plugin/plugin_main_linux\\.cc$'], - ], - }], ['OS=="win"', { 'include_dirs': [ '<(DEPTH)/third_party/wtl/include', ], }], - ['use_x11 == 1', { - 'dependencies': [ - '../build/linux/system.gyp:xext', - ], - }], ], }], ], diff --git a/content/content_shell.gypi b/content/content_shell.gypi index e319a37..ec76c47 100644 --- a/content/content_shell.gypi +++ b/content/content_shell.gypi @@ -173,7 +173,6 @@ 'shell/renderer/shell_render_process_observer.h', 'shell/renderer/shell_render_view_observer.cc', 'shell/renderer/shell_render_view_observer.h', - 'shell/renderer/test_runner/key_code_mapping.cc', 'shell/renderer/test_runner/key_code_mapping.h', 'shell/renderer/test_runner/MockColorChooser.cpp', 'shell/renderer/test_runner/MockColorChooser.h', @@ -558,11 +557,11 @@ }, 'msvs_large_pdb': 1, }], # OS=="win" - ['OS == "win" or toolkit_uses_gtk == 1', { + ['OS == "win"', { 'dependencies': [ '../sandbox/sandbox.gyp:sandbox', ], - }], # OS=="win" or toolkit_uses_gtk == 1 + }], # OS=="win" ['OS=="mac"', { 'product_name': '<(content_shell_product_name)', 'dependencies!': [ diff --git a/content/content_tests.gypi b/content/content_tests.gypi index 48cd25a..c20f743 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -259,7 +259,7 @@ '../third_party/WebKit/public/blink.gyp:blink', ], }], - ['OS == "win" or toolkit_uses_gtk == 1', { + ['OS == "win"', { 'dependencies': [ '../sandbox/sandbox.gyp:sandbox', ], @@ -1210,7 +1210,7 @@ ['exclude', '^browser/compositor/'], ], }], - ['OS!="android" and OS!="ios"', { + ['OS!="android" and OS!="ios" and OS!="linux"', { # npapi test plugin doesn't build on android or ios 'dependencies': [ # Runtime dependencies @@ -1651,7 +1651,7 @@ }, ], }], - ['OS!="android" and OS!="ios"', { + ['OS!="android" and OS!="ios" and OS!="linux"', { # npapi test plugin doesn't build on android or ios 'targets': [ { diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc index fe4d3ce..0dac81d 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -139,8 +139,6 @@ int GpuMain(const MainFunctionParams& parameters) { gfx::kGLImplementationDesktopName) { message_loop_type = base::MessageLoop::TYPE_UI; } -#elif defined(TOOLKIT_GTK) - message_loop_type = base::MessageLoop::TYPE_GPU; #elif defined(OS_LINUX) message_loop_type = base::MessageLoop::TYPE_DEFAULT; #endif diff --git a/content/plugin/plugin_main.cc b/content/plugin/plugin_main.cc index 63dc5f9..bcf8856 100644 --- a/content/plugin/plugin_main.cc +++ b/content/plugin/plugin_main.cc @@ -38,9 +38,6 @@ void TrimInterposeEnvironment(); // Initializes the global Cocoa application object. void InitializeChromeApplication(); -#elif defined(OS_LINUX) -// Work around an unimplemented instruction in 64-bit Flash. -void WorkaroundFlashLAHF(); #endif // main() routine for running as the plugin process. @@ -60,13 +57,7 @@ int PluginMain(const MainFunctionParams& parameters) { const CommandLine& parsed_command_line = parameters.command_line; -#if defined(OS_LINUX) - -#if defined(ARCH_CPU_64_BITS) - WorkaroundFlashLAHF(); -#endif - -#elif defined(OS_WIN) +#if defined(OS_WIN) base::win::ScopedCOMInitializer com_initializer; #endif diff --git a/content/plugin/plugin_main_linux.cc b/content/plugin/plugin_main_linux.cc deleted file mode 100644 index 7566b13..0000000 --- a/content/plugin/plugin_main_linux.cc +++ /dev/null @@ -1,74 +0,0 @@ -// 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 <signal.h> -#include <string.h> -#include <sys/types.h> -#include <syscall.h> -#include <unistd.h> - -#include "build/build_config.h" - -// This whole file is only useful on 64-bit architectures. -#if defined(ARCH_CPU_64_BITS) - -namespace content { - -namespace { - -// Signal handler for SIGILL; see WorkaroundFlashLAHF(). -void SignalHandler(int signum, siginfo_t* info, void* void_context) { - const char kLAHFInstruction = 0x9f; - ucontext_t* context = static_cast<ucontext_t*>(void_context); - greg_t* regs = context->uc_mcontext.gregs; - char instruction = *reinterpret_cast<char*>(regs[REG_RIP]); - - // Check whether this is the kind of SIGILL we care about. - // (info->si_addr can be NULL when we get a SIGILL via other means, - // like with kill.) - if (signum != SIGILL || instruction != kLAHFInstruction) { - // Not the problem we're interested in. Reraise the signal. We - // need to be careful to handle threads etc. properly. - - struct sigaction sa = { { NULL } }; - sigemptyset(&sa.sa_mask); - sa.sa_handler = SIG_DFL; - sigaction(signum, &sa, NULL); - - // block the current signal - sigset_t block_set; - sigemptyset(&block_set); - sigaddset(&block_set, signum); - sigprocmask(SIG_BLOCK, &block_set, NULL); - - // Re-raise signal. It won't be delivered until we return. - syscall(SYS_tkill, syscall(SYS_gettid), signum); - return; - } - - // LAHF moves the low byte of the EFLAGS register to AH. Emulate that. - reinterpret_cast<char*>(®s[REG_RAX])[1] = - reinterpret_cast<char*>(®s[REG_EFL])[0]; - // And advance the instruction pointer past the (one-byte) instruction. - ++regs[REG_RIP]; -} - -} // namespace - -// 64-bit Flash sometimes uses the LAHF instruction which isn't -// available on some CPUs. We can work around it by catching SIGILL -// (illegal instruction), checking if the signal was caused by this -// particular circumstance, emulating the instruction, and resuming. -// This function registers the signal handler. -void WorkaroundFlashLAHF() { - struct sigaction action = { { NULL } }; - action.sa_flags = SA_SIGINFO; - action.sa_sigaction = &SignalHandler; - - sigaction(SIGILL, &action, NULL); -} - -} // namespace content - -#endif // defined(ARCH_CPU_64_BITS) diff --git a/content/plugin/plugin_thread.cc b/content/plugin/plugin_thread.cc index 0a6a1c5..9c7519a 100644 --- a/content/plugin/plugin_thread.cc +++ b/content/plugin/plugin_thread.cc @@ -29,10 +29,6 @@ #include "third_party/WebKit/public/web/WebKit.h" #include "ipc/ipc_channel_handle.h" -#if defined(USE_X11) -#include "ui/base/x/x11_util.h" -#endif - namespace content { namespace { diff --git a/content/plugin/webplugin_proxy.cc b/content/plugin/webplugin_proxy.cc index c87aac2..090f369 100644 --- a/content/plugin/webplugin_proxy.cc +++ b/content/plugin/webplugin_proxy.cc @@ -32,10 +32,6 @@ #include "content/plugin/webplugin_accelerated_surface_proxy_mac.h" #endif -#if defined(USE_X11) -#include "ui/base/x/x11_util_internal.h" -#endif - #if defined(OS_WIN) #include "content/common/plugin_process_messages.h" #include "content/public/common/sandbox_init.h" @@ -67,36 +63,9 @@ WebPluginProxy::WebPluginProxy( windowless_buffer_index_(0), host_render_view_routing_id_(host_render_view_routing_id), weak_factory_(this) { -#if defined(USE_X11) - windowless_shm_pixmaps_[0] = None; - windowless_shm_pixmaps_[1] = None; - use_shm_pixmap_ = false; - - // If the X server supports SHM pixmaps - // and the color depth and masks match, - // then consider using SHM pixmaps for windowless plugin painting. - XDisplay* display = gfx::GetXDisplay(); - if (ui::QuerySharedMemorySupport(display) == ui::SHARED_MEMORY_PIXMAP && - gfx::BitsPerPixelForPixmapDepth( - display, DefaultDepth(display, DefaultScreen(display))) == 32) { - Visual* vis = DefaultVisual(display, DefaultScreen(display)); - - if (vis->red_mask == 0xff0000 && - vis->green_mask == 0xff00 && - vis->blue_mask == 0xff) - use_shm_pixmap_ = true; - } -#endif } WebPluginProxy::~WebPluginProxy() { -#if defined(USE_X11) - if (windowless_shm_pixmaps_[0] != None) - XFreePixmap(gfx::GetXDisplay(), windowless_shm_pixmaps_[0]); - if (windowless_shm_pixmaps_[1] != None) - XFreePixmap(gfx::GetXDisplay(), windowless_shm_pixmaps_[1]); -#endif - #if defined(OS_MACOSX) // Destroy the surface early, since it may send messages during cleanup. if (accelerated_surface_) @@ -126,8 +95,6 @@ void WebPluginProxy::WillDestroyWindow(gfx::PluginWindowHandle window) { PluginThread::current()->Send( new PluginProcessHostMsg_PluginWindowDestroyed( window, ::GetParent(window))); -#elif defined(USE_X11) - // Nothing to do. #else NOTIMPLEMENTED(); #endif @@ -384,10 +351,6 @@ void WebPluginProxy::Paint(const gfx::Rect& rect) { // See above comment about windowless_context_ changing. // http::/crbug.com/139462 skia::RefPtr<skia::PlatformCanvas> saved_canvas = windowless_canvas(); -#if defined(USE_X11) - scoped_refptr<SharedTransportDIB> local_dib_ref( - windowless_dibs_[windowless_buffer_index_]); -#endif saved_canvas->save(); @@ -437,9 +400,6 @@ void WebPluginProxy::UpdateGeometry( DCHECK(0 <= windowless_buffer_index && windowless_buffer_index <= 1); windowless_buffer_index_ = windowless_buffer_index; -#if defined(USE_X11) - delegate_->SetWindowlessShmPixmap(windowless_shm_pixmap()); -#endif #if defined(OS_MACOSX) delegate_->UpdateGeometryAndContext( @@ -533,72 +493,6 @@ void WebPluginProxy::SetWindowlessBuffers( &windowless_contexts_[1]); } -#elif defined(TOOLKIT_GTK) - -void WebPluginProxy::CreateDIBAndCanvasFromHandle( - const TransportDIB::Handle& dib_handle, - const gfx::Rect& window_rect, - scoped_refptr<SharedTransportDIB>* dib_out, - skia::RefPtr<skia::PlatformCanvas>* canvas) { - TransportDIB* dib = TransportDIB::Map(dib_handle); - // dib may be NULL if the renderer has already destroyed the TransportDIB by - // the time we receive the handle, e.g. in case of multiple resizes. - if (dib) { - *canvas = skia::AdoptRef( - dib->GetPlatformCanvas(window_rect.width(), window_rect.height())); - } else { - canvas->clear(); - } - *dib_out = new SharedTransportDIB(dib); -} - -void WebPluginProxy::CreateShmPixmapFromDIB( - TransportDIB* dib, - const gfx::Rect& window_rect, - XID* pixmap_out) { - if (dib) { - XDisplay* display = gfx::GetXDisplay(); - XID root_window = ui::GetX11RootWindow(); - XShmSegmentInfo shminfo = {0}; - - if (*pixmap_out != None) - XFreePixmap(display, *pixmap_out); - - shminfo.shmseg = dib->MapToX(display); - // Create a shared memory pixmap based on the image buffer. - *pixmap_out = XShmCreatePixmap(display, root_window, - NULL, &shminfo, - window_rect.width(), window_rect.height(), - DefaultDepth(display, - DefaultScreen(display))); - } -} - -void WebPluginProxy::SetWindowlessBuffers( - const TransportDIB::Handle& windowless_buffer0, - const TransportDIB::Handle& windowless_buffer1, - const gfx::Rect& window_rect) { - CreateDIBAndCanvasFromHandle(windowless_buffer0, - window_rect, - &windowless_dibs_[0], - &windowless_canvases_[0]); - CreateDIBAndCanvasFromHandle(windowless_buffer1, - window_rect, - &windowless_dibs_[1], - &windowless_canvases_[1]); - - // If SHM pixmaps support is available, create SHM pixmaps to pass to the - // delegate for windowless plugin painting. - if (delegate_->IsWindowless() && use_shm_pixmap_) { - CreateShmPixmapFromDIB(windowless_dibs_[0]->dib(), - window_rect, - &windowless_shm_pixmaps_[0]); - CreateShmPixmapFromDIB(windowless_dibs_[1]->dib(), - window_rect, - &windowless_shm_pixmaps_[1]); - } -} - #else void WebPluginProxy::SetWindowlessBuffers( diff --git a/content/plugin/webplugin_proxy.h b/content/plugin/webplugin_proxy.h index dfa06c5..314bd5a 100644 --- a/content/plugin/webplugin_proxy.h +++ b/content/plugin/webplugin_proxy.h @@ -23,9 +23,6 @@ #include "skia/ext/refptr.h" #include "third_party/skia/include/core/SkCanvas.h" #include "url/gurl.h" -#if defined(USE_X11) -#include "ui/base/x/x11_util.h" -#endif #include "ui/gl/gpu_preference.h" #include "ui/surface/transport_dib.h" @@ -170,17 +167,6 @@ class WebPluginProxy : public WebPlugin, const gfx::Rect& window_rect, scoped_ptr<TransportDIB>* dib_out, base::ScopedCFTypeRef<CGContextRef>* cg_context_out); -#elif defined(USE_X11) - static void CreateDIBAndCanvasFromHandle( - const TransportDIB::Handle& dib_handle, - const gfx::Rect& window_rect, - scoped_refptr<SharedTransportDIB>* dib_out, - skia::RefPtr<SkCanvas>* canvas); - - static void CreateShmPixmapFromDIB( - TransportDIB* dib, - const gfx::Rect& window_rect, - XID* pixmap_out); #endif // Updates the shared memory sections where windowless plugins paint. @@ -196,13 +182,6 @@ class WebPluginProxy : public WebPlugin, skia::RefPtr<SkCanvas> windowless_canvas() const { return windowless_canvases_[windowless_buffer_index_]; } - -#if defined(USE_X11) - XID windowless_shm_pixmap() const { - return windowless_shm_pixmaps_[windowless_buffer_index_]; - } -#endif - #endif typedef base::hash_map<int, WebPluginResourceClient*> ResourceClientMap; @@ -230,15 +209,6 @@ class WebPluginProxy : public WebPlugin, scoped_ptr<WebPluginAcceleratedSurfaceProxy> accelerated_surface_; #else skia::RefPtr<SkCanvas> windowless_canvases_[2]; - -#if defined(USE_X11) - scoped_refptr<SharedTransportDIB> windowless_dibs_[2]; - // If we can use SHM pixmaps for windowless plugin painting or not. - bool use_shm_pixmap_; - // The SHM pixmaps for windowless plugin painting. - XID windowless_shm_pixmaps_[2]; -#endif - #endif // Contains the routing id of the host render view. diff --git a/content/public/browser/native_web_keyboard_event.h b/content/public/browser/native_web_keyboard_event.h index fdc05a1..3e4db80 100644 --- a/content/public/browser/native_web_keyboard_event.h +++ b/content/public/browser/native_web_keyboard_event.h @@ -28,7 +28,7 @@ struct CONTENT_EXPORT NativeWebKeyboardEvent : wchar_t character, int state, double time_stamp_seconds); -#elif defined(OS_MACOSX) || defined(TOOLKIT_GTK) +#elif defined(OS_MACOSX) // TODO(suzhe): Limit these constructors to Linux native Gtk port. // For Linux Views port, after using RenderWidgetHostViewViews to replace // RenderWidgetHostViewGtk, we can use constructors for TOOLKIT_VIEWS defined @@ -67,7 +67,7 @@ struct CONTENT_EXPORT NativeWebKeyboardEvent : // Currently, it's only used by Linux and Mac ports. bool skip_in_browser; -#if defined(USE_AURA) || defined(TOOLKIT_GTK) +#if defined(USE_AURA) // True if the key event matches an edit command. In order to ensure the edit // command always work in web page, the browser should not pre-handle this key // event as a reserved accelerator. See http://crbug.com/54573 diff --git a/content/public/browser/render_widget_host.h b/content/public/browser/render_widget_host.h index b5e8281..70ba230 100644 --- a/content/public/browser/render_widget_host.h +++ b/content/public/browser/render_widget_host.h @@ -16,9 +16,7 @@ #include "ui/gfx/size.h" #include "ui/surface/transport_dib.h" -#if defined(TOOLKIT_GTK) -#include "ui/base/x/x11_util.h" -#elif defined(OS_MACOSX) +#if defined(OS_MACOSX) #include "skia/ext/platform_device.h" #endif @@ -193,11 +191,7 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Sender { virtual void LockBackingStore() = 0; virtual void UnlockBackingStore() = 0; #endif -#if defined(TOOLKIT_GTK) - // Paint the backing store into the target's |dest_rect|. - virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect, - GdkWindow* target) = 0; -#elif defined(OS_MACOSX) +#if defined(OS_MACOSX) virtual gfx::Size GetBackingStoreSize() = 0; virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect, CGContextRef target) = 0; diff --git a/content/public/common/common_param_traits.h b/content/public/common/common_param_traits.h index 8800fe1..f527f16 100644 --- a/content/public/common/common_param_traits.h +++ b/content/public/common/common_param_traits.h @@ -204,24 +204,6 @@ struct ParamTraits<TransportDIB::Id> { }; #endif -#if defined(TOOLKIT_GTK) -template<> -struct ParamTraits<TransportDIB::Id> { - typedef TransportDIB::Id param_type; - static void Write(Message* m, const param_type& p) { - WriteParam(m, p.shmkey); - } - static bool Read(const Message* m, PickleIterator* iter, param_type* r) { - return ReadParam(m, iter, &r->shmkey); - } - static void Log(const param_type& p, std::string* l) { - l->append("TransportDIB("); - LogParam(p.shmkey, l); - l->append(")"); - } -}; -#endif - template <> struct CONTENT_EXPORT ParamTraits<SkBitmap> { typedef SkBitmap param_type; diff --git a/content/public/test/mock_render_process_host.cc b/content/public/test/mock_render_process_host.cc index 8576af8..b07f5e5 100644 --- a/content/public/test/mock_render_process_host.cc +++ b/content/public/test/mock_render_process_host.cc @@ -151,8 +151,6 @@ TransportDIB* MockRenderProcessHost::MapTransportDIB(TransportDIB::Id dib_id) { &duped, 0, TRUE, DUPLICATE_SAME_ACCESS)) duped = NULL; return TransportDIB::Map(duped); -#elif defined(TOOLKIT_GTK) - return TransportDIB::Map(dib_id.shmkey); #elif defined(OS_ANDROID) // On Android, Handles and Ids are the same underlying type. return TransportDIB::Map(dib_id); diff --git a/content/renderer/npapi/webplugin_delegate_proxy.cc b/content/renderer/npapi/webplugin_delegate_proxy.cc index 1a78e76..e578b27a 100644 --- a/content/renderer/npapi/webplugin_delegate_proxy.cc +++ b/content/renderer/npapi/webplugin_delegate_proxy.cc @@ -4,10 +4,6 @@ #include "content/renderer/npapi/webplugin_delegate_proxy.h" -#if defined(USE_X11) -#include <cairo/cairo.h> -#endif - #include <algorithm> #include "base/auto_reset.h" @@ -652,7 +648,7 @@ bool WebPluginDelegateProxy::CreateSharedBitmap( if (!memory->get()) return false; #endif -#if defined(OS_POSIX) && !defined(TOOLKIT_GTK) && !defined(OS_ANDROID) +#if defined(OS_POSIX) && !defined(OS_ANDROID) TransportDIB::Handle handle; IPC::Message* msg = new ViewHostMsg_AllocTransportDIB(size, false, &handle); if (!RenderThreadImpl::current()->Send(msg)) diff --git a/content/renderer/npapi/webplugin_impl.cc b/content/renderer/npapi/webplugin_impl.cc index f9caddc..892309b 100644 --- a/content/renderer/npapi/webplugin_impl.cc +++ b/content/renderer/npapi/webplugin_impl.cc @@ -578,13 +578,6 @@ void WebPluginImpl::SetWindow(gfx::PluginWindowHandle window) { #else accepts_input_events_ = false; -#if defined(USE_X11) - // Tell the view delegate that the plugin window was created, so that it - // can create necessary container widgets. - render_frame_->Send(new ViewHostMsg_CreatePluginContainer( - render_frame_->GetRenderWidget()->routing_id(), window)); -#endif // USE_X11 - #endif // OS_MACOSX } else { DCHECK(!window_); // Make sure not called twice. @@ -600,13 +593,8 @@ void WebPluginImpl::SetAcceptsInputEvents(bool accepts) { void WebPluginImpl::WillDestroyWindow(gfx::PluginWindowHandle window) { DCHECK_EQ(window, window_); window_ = gfx::kNullPluginWindow; - if (render_view_.get()) { -#if defined(USE_X11) - render_frame_->Send(new ViewHostMsg_DestroyPluginContainer( - render_frame_->GetRenderWidget()->routing_id(), window)); -#endif + if (render_view_.get()) render_frame_->GetRenderWidget()->CleanupWindowInPluginMoves(window); - } } GURL WebPluginImpl::CompleteURL(const char* url) { diff --git a/content/renderer/pepper/ppb_image_data_impl.cc b/content/renderer/pepper/ppb_image_data_impl.cc index 80cc38d..6abd8f5 100644 --- a/content/renderer/pepper/ppb_image_data_impl.cc +++ b/content/renderer/pepper/ppb_image_data_impl.cc @@ -29,7 +29,7 @@ namespace { // Returns true if the ImageData shared memory should be allocated in the // browser process for the current platform. bool IsBrowserAllocated() { -#if defined(OS_POSIX) && !defined(TOOLKIT_GTK) && !defined(OS_ANDROID) +#if defined(OS_POSIX) && !defined(OS_ANDROID) // On the Mac, shared memory has to be created in the browser in order to // work in the sandbox. return true; @@ -243,8 +243,6 @@ int32_t ImageDataPlatformBackend::GetSharedMemory(int* handle, *byte_count = dib_->size(); #if defined(OS_WIN) *handle = reinterpret_cast<intptr_t>(dib_->handle()); -#elif defined(TOOLKIT_GTK) - *handle = static_cast<intptr_t>(dib_->handle()); #else *handle = static_cast<intptr_t>(dib_->handle().fd); #endif diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc index 8582499..f125ebc 100644 --- a/content/renderer/render_process_impl.cc +++ b/content/renderer/render_process_impl.cc @@ -111,7 +111,7 @@ int RenderProcessImpl::GetEnabledBindings() const { // Platform specific code for dealing with bitmap transport... TransportDIB* RenderProcessImpl::CreateTransportDIB(size_t size) { -#if defined(OS_POSIX) && !defined(TOOLKIT_GTK) && !defined(OS_ANDROID) +#if defined(OS_POSIX) && !defined(OS_ANDROID) // POSIX creates transport DIBs in the browser, so we need to do a sync IPC to // get one. The TransportDIB is cached in the browser. TransportDIB::Handle handle; @@ -122,8 +122,7 @@ TransportDIB* RenderProcessImpl::CreateTransportDIB(size_t size) { return NULL; return TransportDIB::Map(handle); #else - // Windows, legacy GTK and Android create transport DIBs inside the - // renderer. + // Windows and Android create transport DIBs inside the renderer. return TransportDIB::Create(size, transport_dib_next_sequence_number_++); #endif } @@ -132,7 +131,7 @@ void RenderProcessImpl::FreeTransportDIB(TransportDIB* dib) { if (!dib) return; -#if defined(OS_POSIX) && !defined(TOOLKIT_GTK) && !defined(OS_ANDROID) +#if defined(OS_POSIX) && !defined(OS_ANDROID) // On POSIX we need to tell the browser that it can drop a reference to the // shared memory. IPC::Message* msg = new ViewHostMsg_FreeTransportDIB(dib->id()); diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 0a5e1809..c9090b2 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -3333,7 +3333,7 @@ void RenderViewImpl::OnSetRendererPrefs( webview()->themeChanged(); } } -#endif // defined(USE_DEFAULT_RENDER_THEME) || defined(TOOLKIT_GTK) +#endif // defined(USE_DEFAULT_RENDER_THEME) if (RenderThreadImpl::current()) // Will be NULL during unit tests. RenderThreadImpl::current()->SetFlingCurveParameters( diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc index ca92d5e..39ddabb 100644 --- a/content/renderer/renderer_webkitplatformsupport_impl.cc +++ b/content/renderer/renderer_webkitplatformsupport_impl.cc @@ -108,7 +108,7 @@ #include "third_party/WebKit/public/platform/win/WebSandboxSupport.h" #endif -#if defined(TOOLKIT_GTK) || defined(USE_AURA) +#if defined(USE_AURA) #include "content/renderer/webscrollbarbehavior_impl_gtkoraura.h" #elif !defined(OS_MACOSX) #include "third_party/WebKit/public/platform/WebScrollbarBehavior.h" diff --git a/content/renderer/webscrollbarbehavior_impl_gtkoraura.cc b/content/renderer/webscrollbarbehavior_impl_gtkoraura.cc index 8398858..e9d77bb 100644 --- a/content/renderer/webscrollbarbehavior_impl_gtkoraura.cc +++ b/content/renderer/webscrollbarbehavior_impl_gtkoraura.cc @@ -13,7 +13,7 @@ bool WebScrollbarBehaviorImpl::shouldCenterOnThumb( blink::WebScrollbarBehavior::Button mouseButton, bool shiftKeyPressed, bool altKeyPressed) { -#if defined(TOOLKIT_GTK) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) if (mouseButton == blink::WebScrollbarBehavior::ButtonMiddle) return true; #endif @@ -25,10 +25,6 @@ bool WebScrollbarBehaviorImpl::shouldSnapBackToDragOrigin( const blink::WebPoint& eventPoint, const blink::WebRect& scrollbarRect, bool isHorizontal) { -#if defined(TOOLKIT_GTK) - return false; -#endif - // Constants used to figure the drag rect outside which we should snap the // scrollbar thumb back to its origin. These calculations are based on // observing the behavior of the MSVC8 main window scrollbar + some @@ -48,4 +44,4 @@ bool WebScrollbarBehaviorImpl::shouldSnapBackToDragOrigin( return !noSnapRect.Contains(eventPoint); } -} // namespace content
\ No newline at end of file +} // namespace content diff --git a/content/shell/browser/shell.h b/content/shell/browser/shell.h index 4acffff4..8125262 100644 --- a/content/shell/browser/shell.h +++ b/content/shell/browser/shell.h @@ -212,24 +212,6 @@ class Shell : public WebContentsDelegate, void InnerShowDevTools(const std::string& settings); void OnDevToolsWebContentsDestroyed(); -#if defined(TOOLKIT_GTK) - CHROMEGTK_CALLBACK_0(Shell, void, OnBackButtonClicked); - CHROMEGTK_CALLBACK_0(Shell, void, OnForwardButtonClicked); - CHROMEGTK_CALLBACK_0(Shell, void, OnReloadButtonClicked); - CHROMEGTK_CALLBACK_0(Shell, void, OnStopButtonClicked); - CHROMEGTK_CALLBACK_0(Shell, void, OnURLEntryActivate); - CHROMEGTK_CALLBACK_0(Shell, gboolean, OnWindowDestroyed); - - CHROMEG_CALLBACK_3(Shell, gboolean, OnCloseWindowKeyPressed, GtkAccelGroup*, - GObject*, guint, GdkModifierType); - CHROMEG_CALLBACK_3(Shell, gboolean, OnNewWindowKeyPressed, GtkAccelGroup*, - GObject*, guint, GdkModifierType); - CHROMEG_CALLBACK_3(Shell, gboolean, OnHighlightURLView, GtkAccelGroup*, - GObject*, guint, GdkModifierType); - CHROMEG_CALLBACK_3(Shell, gboolean, OnReloadKeyPressed, GtkAccelGroup*, - GObject*, guint, GdkModifierType); -#endif - scoped_ptr<ShellJavaScriptDialogManager> dialog_manager_; scoped_ptr<WebContents> web_contents_; @@ -244,19 +226,7 @@ class Shell : public WebContentsDelegate, gfx::Size content_size_; -#if defined(TOOLKIT_GTK) - GtkWidget* vbox_; - - GtkToolItem* back_button_; - GtkToolItem* forward_button_; - GtkToolItem* reload_button_; - GtkToolItem* stop_button_; - - GtkWidget* spinner_; - GtkToolItem* spinner_item_; - - int ui_elements_height_; // height of menubar, toolbar, etc. -#elif defined(OS_ANDROID) +#if defined(OS_ANDROID) base::android::ScopedJavaGlobalRef<jobject> java_object_; #elif defined(USE_AURA) #if defined(OS_CHROMEOS) diff --git a/content/shell/browser/shell_javascript_dialog_manager.cc b/content/shell/browser/shell_javascript_dialog_manager.cc index 7f3b678..ef284e2 100644 --- a/content/shell/browser/shell_javascript_dialog_manager.cc +++ b/content/shell/browser/shell_javascript_dialog_manager.cc @@ -43,7 +43,7 @@ void ShellJavaScriptDialogManager::RunJavaScriptDialog( return; } -#if defined(OS_MACOSX) || defined(OS_WIN) || defined(TOOLKIT_GTK) +#if defined(OS_MACOSX) || defined(OS_WIN) *did_suppress_message = false; if (dialog_) { @@ -88,7 +88,7 @@ void ShellJavaScriptDialogManager::RunBeforeUnloadDialog( return; } -#if defined(OS_MACOSX) || defined(OS_WIN) || defined(TOOLKIT_GTK) +#if defined(OS_MACOSX) || defined(OS_WIN) if (dialog_) { // Seriously!? callback.Run(true, base::string16()); @@ -117,7 +117,7 @@ void ShellJavaScriptDialogManager::RunBeforeUnloadDialog( void ShellJavaScriptDialogManager::CancelActiveAndPendingDialogs( WebContents* web_contents) { -#if defined(OS_MACOSX) || defined(OS_WIN) || defined(TOOLKIT_GTK) +#if defined(OS_MACOSX) || defined(OS_WIN) if (dialog_) { dialog_->Cancel(); dialog_.reset(); @@ -132,7 +132,7 @@ void ShellJavaScriptDialogManager::WebContentsDestroyed( } void ShellJavaScriptDialogManager::DialogClosed(ShellJavaScriptDialog* dialog) { -#if defined(OS_MACOSX) || defined(OS_WIN) || defined(TOOLKIT_GTK) +#if defined(OS_MACOSX) || defined(OS_WIN) DCHECK_EQ(dialog, dialog_.get()); dialog_.reset(); #else diff --git a/content/shell/browser/shell_javascript_dialog_manager.h b/content/shell/browser/shell_javascript_dialog_manager.h index 5bcfb65..d60eebb 100644 --- a/content/shell/browser/shell_javascript_dialog_manager.h +++ b/content/shell/browser/shell_javascript_dialog_manager.h @@ -50,7 +50,7 @@ class ShellJavaScriptDialogManager : public JavaScriptDialogManager { } private: -#if defined(OS_MACOSX) || defined(OS_WIN) || defined(TOOLKIT_GTK) +#if defined(OS_MACOSX) || defined(OS_WIN) // The dialog being shown. No queueing. scoped_ptr<ShellJavaScriptDialog> dialog_; #else diff --git a/content/shell/browser/shell_login_dialog.cc b/content/shell/browser/shell_login_dialog.cc index b531b65..fe7da40 100644 --- a/content/shell/browser/shell_login_dialog.cc +++ b/content/shell/browser/shell_login_dialog.cc @@ -59,7 +59,7 @@ ShellLoginDialog::~ShellLoginDialog() { // referenced/dereferenced. } -#if !defined(OS_MACOSX) && !defined(TOOLKIT_GTK) +#if !defined(OS_MACOSX) // Bogus implementations for linking. They are never called because // ResourceDispatcherHostDelegate::CreateLoginDelegate returns NULL. // TODO: implement ShellLoginDialog for other platforms, drop this #if diff --git a/content/shell/browser/shell_resource_dispatcher_host_delegate.cc b/content/shell/browser/shell_resource_dispatcher_host_delegate.cc index b50e80c..8c901a6 100644 --- a/content/shell/browser/shell_resource_dispatcher_host_delegate.cc +++ b/content/shell/browser/shell_resource_dispatcher_host_delegate.cc @@ -28,7 +28,7 @@ ShellResourceDispatcherHostDelegate::CreateLoginDelegate( return NULL; } -#if !defined(OS_MACOSX) && !defined(TOOLKIT_GTK) +#if !defined(OS_MACOSX) // TODO: implement ShellLoginDialog for other platforms, drop this #if return NULL; #else diff --git a/content/shell/browser/webkit_test_controller.cc b/content/shell/browser/webkit_test_controller.cc index 4932e58..fe53946a 100644 --- a/content/shell/browser/webkit_test_controller.cc +++ b/content/shell/browser/webkit_test_controller.cc @@ -258,7 +258,7 @@ bool WebKitTestController::PrepareForLayoutTest( current_pid_ = base::kNullProcessId; main_window_->LoadURL(test_url); } else { -#if defined(TOOLKIT_GTK) || defined(OS_MACOSX) +#if defined(OS_MACOSX) // Shell::SizeTo is not implemented on all platforms. main_window_->SizeTo(initial_size_); #endif diff --git a/content/shell/renderer/test_runner/event_sender.cc b/content/shell/renderer/test_runner/event_sender.cc index 3734672..53e2f11 100644 --- a/content/shell/renderer/test_runner/event_sender.cc +++ b/content/shell/renderer/test_runner/event_sender.cc @@ -29,8 +29,6 @@ #include "third_party/WebKit/public/web/mac/WebInputEventFactory.h" #elif defined(OS_ANDROID) #include "third_party/WebKit/public/web/android/WebInputEventFactory.h" -#elif defined(TOOLKIT_GTK) -#include "third_party/WebKit/public/web/gtk/WebInputEventFactory.h" #endif using blink::WebContextMenuData; @@ -50,8 +48,7 @@ using blink::WebTouchPoint; using blink::WebVector; using blink::WebView; -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_ANDROID) || \ - defined(TOOLKIT_GTK) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_ANDROID) using blink::WebInputEventFactory; #endif @@ -1243,10 +1240,6 @@ void EventSender::KeyDown(const std::string& code_str, event_down.modifiers = modifiers; event_down.windowsKeyCode = code; -#if defined(OS_LINUX) && defined(TOOLKIT_GTK) - event_down.nativeKeyCode = NativeKeyCodeForWindowsKeyCode(code); -#endif - if (generate_char) { event_down.text[0] = text; event_down.unmodifiedText[0] = text; @@ -1254,8 +1247,7 @@ void EventSender::KeyDown(const std::string& code_str, event_down.setKeyIdentifierFromWindowsKeyCode(); -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_ANDROID) || \ - defined(TOOLKIT_GTK) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_ANDROID) if (event_down.modifiers != 0) event_down.isSystemKey = WebInputEventFactory::isSystemKeyEvent(event_down); #endif diff --git a/content/shell/renderer/test_runner/key_code_mapping.cc b/content/shell/renderer/test_runner/key_code_mapping.cc deleted file mode 100644 index aab57dc..0000000 --- a/content/shell/renderer/test_runner/key_code_mapping.cc +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright 2014 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/shell/renderer/test_runner/key_code_mapping.h" - -#include "build/build_config.h" - -namespace content { - -int NativeKeyCodeForWindowsKeyCode(int keysym) { -#if defined(OS_LINUX) && defined(TOOLKIT_GTK) - // See /usr/share/X11/xkb/keycodes/* - static const int ascii_to_key_code[] = { - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 22, - 23, - 0, - 0, - 0, - 36, - 0, - 0, - 50, - 37, - 64, - 127, - 66, - 0, - 0, - 0, - 0, - 131, - 0, - 9, - 100, - 102, - 0, - 0, - 65, // ' ' - 112, // '!' - 117, // '"' - 115, // '#' - 110, // '$' - 113, // '%' - 111, // '&' - 114, // ''' - 116, // '(' - 0, // ')' - 107, // '*' - 0, // '+' - 0, // ',' - 118, // '-' - 119, // '.' - 146, // '/' - 19, // '0' - 10, // '1' - 11, // '2' - 12, // '3' - 13, // '4' - 14, // '5' - 15, // '6' - 16, // '7' - 17, // '8' - 18, // '9' - 0, // ':' - 0, // ';' - 0, // '<' - 0, // '=' - 0, // '>' - 0, // '?' - 0, // '@' - 38, // 'A' - 56, // 'B' - 54, // 'C' - 40, // 'D' - 26, // 'E' - 41, // 'F' - 42, // 'G' - 43, // 'H' - 31, // 'I' - 44, // 'J' - 45, // 'K' - 46, // 'L' - 58, // 'M' - 57, // 'N' - 32, // 'O' - 33, // 'P' - 24, // 'Q' - 27, // 'R' - 39, // 'S' - 28, // 'T' - 30, // 'U' - 55, // 'V' - 25, // 'W' - 53, // 'X' - 29, // 'Y' - 52, // 'Z' - 133, // '[' - 134, // '\' - 135, // ']' - 0, // '^' - 0, // '_' - 90, // '`' - 38, // 'a' - 56, // 'b' - 54, // 'c' - 40, // 'd' - 26, // 'e' - 41, // 'f' - 42, // 'g' - 43, // 'h' - 31, // 'i' - 44, // 'j' - 45, // 'k' - 46, // 'l' - 58, // 'm' - 57, // 'n' - 32, // 'o' - 33, // 'p' - 24, // 'q' - 27, // 'r' - 39, // 's' - 28, // 't' - 30, // 'u' - 55, // 'v' - 25, // 'w' - 53, // 'x' - 29, // 'y' - 52, // 'z' - 96, // '{' - 0, // '|' - 0, // '}' - 0, // '~' - 0, // DEL - }; - - if (keysym <= 127) - return ascii_to_key_code[keysym]; - - switch (keysym) { - case VKEY_PRIOR: - return 112; - case VKEY_NEXT: - return 117; - case VKEY_END: - return 115; - case VKEY_HOME: - return 110; - case VKEY_LEFT: - return 113; - case VKEY_UP: - return 111; - case VKEY_RIGHT: - return 114; - case VKEY_DOWN: - return 116; - case VKEY_SNAPSHOT: - return 107; - case VKEY_INSERT: - return 118; - case VKEY_DELETE: - return 119; - case VKEY_APPS: - return 135; - case VKEY_F1: - case VKEY_F1 + 1: - case VKEY_F1 + 2: - case VKEY_F1 + 3: - case VKEY_F1 + 4: - case VKEY_F1 + 5: - case VKEY_F1 + 6: - case VKEY_F1 + 7: - case VKEY_F1 + 8: - case VKEY_F1 + 9: - case VKEY_F1 + 10: - case VKEY_F1 + 11: - case VKEY_F1 + 12: - case VKEY_F1 + 13: - case VKEY_F1 + 14: - case VKEY_F1 + 15: - case VKEY_F1 + 16: - case VKEY_F1 + 17: - case VKEY_F1 + 18: - case VKEY_F1 + 19: - case VKEY_F1 + 20: - case VKEY_F1 + 21: - case VKEY_F1 + 22: - case VKEY_F1 + 23: - return 67 + (keysym - VKEY_F1); - case VKEY_LSHIFT: - return 50; - case VKEY_RSHIFT: - return 62; - case VKEY_LCONTROL: - return 37; - case VKEY_RCONTROL: - return 105; - case VKEY_LMENU: - return 64; - case VKEY_RMENU: - return 108; - case VKEY_NUMLOCK: - return 77; - - default: - return 0; - } -#else - return keysym - keysym; -#endif -} - -} // namespace content diff --git a/content/shell/renderer/test_runner/key_code_mapping.h b/content/shell/renderer/test_runner/key_code_mapping.h index 7aac449a..b7cb5ce 100644 --- a/content/shell/renderer/test_runner/key_code_mapping.h +++ b/content/shell/renderer/test_runner/key_code_mapping.h @@ -34,9 +34,6 @@ enum { VKEY_RMENU = 0xA5, }; -// Map a windows keycode to a native keycode on defined(__linux__) && defined(TOOLKIT_GTK). -int NativeKeyCodeForWindowsKeyCode(int keysym); - } // namespace content #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_KEY_CODE_MAPPING_H_ diff --git a/content/test/plugin/plugin_javascript_open_popup.cc b/content/test/plugin/plugin_javascript_open_popup.cc index 761f9eb..0b8daf8 100644 --- a/content/test/plugin/plugin_javascript_open_popup.cc +++ b/content/test/plugin/plugin_javascript_open_popup.cc @@ -7,9 +7,6 @@ #include "build/build_config.h" #include "base/logging.h" -#if defined(USE_X11) -#include "third_party/npapi/bindings/npapi_x11.h" -#endif #include "content/test/plugin/plugin_client.h" namespace NPAPIClient { @@ -75,33 +72,6 @@ bool ExecuteJavascriptPopupWindowTargetPluginTest::CheckWindow( return false; } -#elif defined(USE_X11) -// This code blindly follows the same sorts of verifications done on -// the Windows side. Does it make sense on X? Maybe not really, but -// it can't hurt to do extra validations. -bool ExecuteJavascriptPopupWindowTargetPluginTest::CheckWindow( - NPWindow* window) { - Window xwindow = reinterpret_cast<Window>(window->window); - // Grab a pointer to the extra SetWindow data so we can grab the display out. - NPSetWindowCallbackStruct* extra = - static_cast<NPSetWindowCallbackStruct*>(window->ws_info); - - if (xwindow) { - Window root, parent; - Window* wins = NULL; - unsigned int num_child; - Status status = XQueryTree(extra->display, xwindow, &root, &parent, - &wins, &num_child); - if (wins) - XFree(wins); - DCHECK(status != 0); - if (!parent || parent == root) - SetError("Windowed plugin instantiated with NULL parent"); - return true; - } - - return false; -} #elif defined(OS_MACOSX) bool ExecuteJavascriptPopupWindowTargetPluginTest::CheckWindow( NPWindow* window) { diff --git a/content/test/plugin/plugin_windowless_test.cc b/content/test/plugin/plugin_windowless_test.cc index 9b126c9..5d78bef 100644 --- a/content/test/plugin/plugin_windowless_test.cc +++ b/content/test/plugin/plugin_windowless_test.cc @@ -10,10 +10,6 @@ #include "base/strings/string_util.h" #include "content/test/plugin/plugin_client.h" -#if defined(TOOLKIT_GTK) -#include <gdk/gdkx.h> -#endif - // NPEvent does not exist on the Mac. #if defined(OS_MACOSX) typedef NPCocoaEvent WindowlessPluginTestEvent; @@ -37,8 +33,6 @@ bool IsPaintEvent(WindowlessPluginTestEvent* np_event) { return np_event->event == WM_PAINT; #elif defined(OS_MACOSX) return np_event->type == NPCocoaEventDrawRect; -#elif defined(TOOLKIT_GTK) - return np_event->type == GraphicsExpose; #else NOTIMPLEMENTED(); return false; diff --git a/content/test/test_render_view_host.cc b/content/test/test_render_view_host.cc index ce796e6..54acf9d 100644 --- a/content/test/test_render_view_host.cc +++ b/content/test/test_render_view_host.cc @@ -180,16 +180,6 @@ gfx::Rect TestRenderWidgetHostView::GetBoundsInRootWindow() { return gfx::Rect(); } -#if defined(TOOLKIT_GTK) -GdkEventButton* TestRenderWidgetHostView::GetLastMouseDown() { - return NULL; -} - -gfx::NativeView TestRenderWidgetHostView::BuildInputMethodsGtkMenu() { - return NULL; -} -#endif // defined(TOOLKIT_GTK) - void TestRenderWidgetHostView::OnSwapCompositorFrame( uint32 output_surface_id, scoped_ptr<cc::CompositorFrame> frame) { diff --git a/content/test/test_render_view_host.h b/content/test/test_render_view_host.h index 3251326..2bf2e4f 100644 --- a/content/test/test_render_view_host.h +++ b/content/test/test_render_view_host.h @@ -79,10 +79,6 @@ class TestRenderWidgetHostView : public RenderWidgetHostViewBase { virtual bool IsSpeaking() const OVERRIDE; virtual void StopSpeaking() OVERRIDE; #endif // defined(OS_MACOSX) -#if defined(TOOLKIT_GTK) - virtual GdkEventButton* GetLastMouseDown() OVERRIDE; - virtual gfx::NativeView BuildInputMethodsGtkMenu() OVERRIDE; -#endif // defined(TOOLKIT_GTK) virtual void OnSwapCompositorFrame( uint32 output_surface_id, scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; diff --git a/gpu/command_buffer/tests/gl_tests_main.cc b/gpu/command_buffer/tests/gl_tests_main.cc index 4a689a2..460ecae 100644 --- a/gpu/command_buffer/tests/gl_tests_main.cc +++ b/gpu/command_buffer/tests/gl_tests_main.cc @@ -18,10 +18,6 @@ #include "ui/gl/android/gl_jni_registrar.h" #endif -#if defined(TOOLKIT_GTK) -#include "ui/gfx/gtk_util.h" -#endif - int main(int argc, char** argv) { #if defined(OS_ANDROID) ui::gl::android::RegisterJni(base::android::AttachCurrentThread()); @@ -32,9 +28,6 @@ int main(int argc, char** argv) { #if defined(OS_MACOSX) base::mac::ScopedNSAutoreleasePool pool; #endif -#if defined(TOOLKIT_GTK) - gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); -#endif gfx::GLSurface::InitializeOneOff(); ::gles2::Initialize(); gpu::ApplyGpuDriverBugWorkarounds(CommandLine::ForCurrentProcess()); diff --git a/gpu/gles2_conform_support/native/main.cc b/gpu/gles2_conform_support/native/main.cc index cb5617a..ea1cdf3 100644 --- a/gpu/gles2_conform_support/native/main.cc +++ b/gpu/gles2_conform_support/native/main.cc @@ -10,10 +10,6 @@ #endif #include "ui/gl/gl_surface.h" -#if defined(TOOLKIT_GTK) -#include "ui/gfx/gtk_util.h" -#endif - extern "C" { #if defined(GLES2_CONFORM_SUPPORT_ONLY) #include "gpu/gles2_conform_support/gtf/gtf_stubs.h" @@ -30,10 +26,6 @@ int main(int argc, char *argv[]) { #if defined(OS_MACOSX) base::mac::ScopedNSAutoreleasePool pool; #endif -#if defined(TOOLKIT_GTK) - gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); -#endif - GTFMain(argc, argv); return 0; |