diff options
author | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-27 01:57:10 +0000 |
---|---|---|
committer | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-27 01:57:10 +0000 |
commit | fd911dd1acb736447191b7d67ddf67db2c7260ee (patch) | |
tree | 34575b2e2253290f527eee5d8e885c210320915e | |
parent | f87d6dacd3b806d40986ef8bd671b7fd630fef3c (diff) | |
download | chromium_src-fd911dd1acb736447191b7d67ddf67db2c7260ee.zip chromium_src-fd911dd1acb736447191b7d67ddf67db2c7260ee.tar.gz chromium_src-fd911dd1acb736447191b7d67ddf67db2c7260ee.tar.bz2 |
android build: progress on content and libjingle.
BUG=None
TEST=
Review URL: http://codereview.chromium.org/9271028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119334 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/all_android.gyp | 23 | ||||
-rw-r--r-- | content/app/content_main.cc | 6 | ||||
-rw-r--r-- | content/browser/in_process_webkit/dom_storage_area.h | 7 | ||||
-rw-r--r-- | content/browser/renderer_host/mock_render_process_host.cc | 3 | ||||
-rw-r--r-- | content/common/np_channel_base.h | 4 | ||||
-rw-r--r-- | content/content_browser.gypi | 6 | ||||
-rw-r--r-- | content/content_renderer.gypi | 7 | ||||
-rw-r--r-- | content/public/browser/browser_context.h | 6 | ||||
-rw-r--r-- | content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc | 2 | ||||
-rw-r--r-- | content/renderer/pepper_plugin_delegate_impl.cc | 2 | ||||
-rw-r--r-- | content/renderer/render_process_impl.cc | 5 | ||||
-rw-r--r-- | content/renderer/webplugin_delegate_proxy.cc | 6 |
12 files changed, 61 insertions, 16 deletions
diff --git a/build/all_android.gyp b/build/all_android.gyp index 2333441..ae2370c 100644 --- a/build/all_android.gyp +++ b/build/all_android.gyp @@ -19,7 +19,8 @@ { # The current list of tests for android. This is temporary # until the full set supported. If adding a new test here, - # please also add it to build/android/run_tests.py + # please also add it to build/android/run_tests.py, else the + # test is not run. 'target_name': 'android_builder_tests', 'type': 'none', 'dependencies': [ @@ -27,16 +28,32 @@ '../sql/sql.gyp:sql_unittests', '../ipc/ipc.gyp:ipc_tests', '../net/net.gyp:net_unittests', + # From here down: not added to run_tests.py yet. + '../jingle/jingle.gyp:jingle_unittests', ], }, { - # Experimental / in-progress targets that are expected to fail. + # Experimental / in-progress targets that are expected to fail + # but we still try to compile them on bots (turning the stage + # orange, not red). 'target_name': 'android_experimental', 'type': 'none', 'dependencies': [ '../webkit/webkit.gyp:pull_in_webkit_unit_tests', '../webkit/webkit.gyp:pull_in_DumpRenderTree', - '../chrome/chrome.gyp:unit_tests' + '../chrome/chrome.gyp:unit_tests', + ], + }, + { + # In-progress targets that are expected to fail and are NOT run + # on any bot. + 'target_name': 'android_in_progress', + 'type': 'none', + 'dependencies': [ + '../content/content.gyp:content_browsertests', + '../content/content.gyp:content_unittests', + '../chrome/chrome.gyp:sync_unit_tests', + '../ui/ui.gyp:gfx_unittests', ], }, ], # targets diff --git a/content/app/content_main.cc b/content/app/content_main.cc index 82a0136..6b1ccf3 100644 --- a/content/app/content_main.cc +++ b/content/app/content_main.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -141,7 +141,7 @@ void CommonSubprocessInit(const std::string& process_type) { MSG msg; PeekMessage(&msg, NULL, 0, 0, PM_REMOVE); #endif -#if defined(OS_POSIX) && !defined(OS_MACOSX) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) // Various things break when you're using a locale where the decimal // separator isn't a period. See e.g. bugs 22782 and 39964. For // all processes except the browser process (where we call system @@ -308,9 +308,11 @@ int ContentMain(int argc, tc_set_new_mode(1); #endif +#if !defined(OS_ANDROID) // Set C library locale to make sure CommandLine can parse argument values // in correct encoding. setlocale(LC_ALL, ""); +#endif SetupSignalHandlers(); diff --git a/content/browser/in_process_webkit/dom_storage_area.h b/content/browser/in_process_webkit/dom_storage_area.h index a663ee0..be4520f 100644 --- a/content/browser/in_process_webkit/dom_storage_area.h +++ b/content/browser/in_process_webkit/dom_storage_area.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -60,7 +60,12 @@ class DOMStorageArea { }; #if defined(COMPILER_GCC) +#if defined(OS_ANDROID) +// Android stlport uses std namespace +namespace std { +#else namespace __gnu_cxx { +#endif template<> struct hash<DOMStorageArea*> { diff --git a/content/browser/renderer_host/mock_render_process_host.cc b/content/browser/renderer_host/mock_render_process_host.cc index 2eafb5f..60cd0b7 100644 --- a/content/browser/renderer_host/mock_render_process_host.cc +++ b/content/browser/renderer_host/mock_render_process_host.cc @@ -118,6 +118,9 @@ TransportDIB* MockRenderProcessHost::GetTransportDIB(TransportDIB::Id dib_id) { // On Mac, TransportDIBs are always created in the browser, so we cannot map // one from a dib_id. transport_dib_ = TransportDIB::Create(100 * 100 * 4, 0); +#elif defined(OS_ANDROID) + // On Android, Handles and Ids are the same underlying type. + transport_dib_ = TransportDIB::Map(dib_id); #elif defined(OS_POSIX) transport_dib_ = TransportDIB::Map(dib_id.shmkey); #endif diff --git a/content/common/np_channel_base.h b/content/common/np_channel_base.h index d02e9c6..c931949 100644 --- a/content/common/np_channel_base.h +++ b/content/common/np_channel_base.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -23,7 +23,7 @@ class MessageLoopProxy; } #if defined(COMPILER_GCC) -namespace __gnu_cxx { +namespace BASE_HASH_NAMESPACE { template<> struct hash<NPObject*> { diff --git a/content/content_browser.gypi b/content/content_browser.gypi index 123c962..2e7b62d 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi @@ -751,6 +751,12 @@ '../dbus/dbus.gyp:dbus', ], }], + ['OS=="android"', { + 'sources!': [ + # A main loop would be handled in Java. + 'browser/browser_main_loop.cc', + 'browser/browser_main_loop.h', + ]}], ['OS=="mac"', { 'sources': [ # Build necessary Mozilla sources diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi index 36c0ac9..37ee955 100644 --- a/content/content_renderer.gypi +++ b/content/content_renderer.gypi @@ -257,6 +257,13 @@ '../base/allocator/allocator.gyp:allocator', ], }], + # TODO(jrg): remove the OS=="android" section? + # Understand better how media_stream_ is tied into Chromium. + ['enable_webrtc==0 and OS=="android"', { + 'sources/': [ + ['exclude', '^renderer/media/media_stream_'], + ], + }], ['enable_webrtc==1', { 'dependencies': [ '../third_party/libjingle/libjingle.gyp:libjingle_peerconnection', diff --git a/content/public/browser/browser_context.h b/content/public/browser/browser_context.h index 7a4d95a..cc8cce5 100644 --- a/content/public/browser/browser_context.h +++ b/content/public/browser/browser_context.h @@ -106,8 +106,8 @@ class BrowserContext { } // namespace content -#if defined(COMPILER_GCC) && !defined(OS_ANDROID) -namespace __gnu_cxx { +#if defined(COMPILER_GCC) +namespace BASE_HASH_NAMESPACE { template<> struct hash<content::BrowserContext*> { @@ -116,7 +116,7 @@ struct hash<content::BrowserContext*> { } }; -} // namespace __gnu_cxx +} // namespace BASE_HASH_NAMESPACE #endif #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ diff --git a/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc b/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc index 37ab0fe..cf65d36 100644 --- a/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc +++ b/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc @@ -412,7 +412,7 @@ bool WebGraphicsContext3DCommandBufferImpl::readBackFramebuffer( void WebGraphicsContext3DCommandBufferImpl::synthesizeGLError( WGC3Denum error) { - if (find(synthetic_errors_.begin(), synthetic_errors_.end(), error) == + if (std::find(synthetic_errors_.begin(), synthetic_errors_.end(), error) == synthetic_errors_.end()) { synthetic_errors_.push_back(error); } diff --git a/content/renderer/pepper_plugin_delegate_impl.cc b/content/renderer/pepper_plugin_delegate_impl.cc index ffc7fc1..f2152b1 100644 --- a/content/renderer/pepper_plugin_delegate_impl.cc +++ b/content/renderer/pepper_plugin_delegate_impl.cc @@ -142,7 +142,7 @@ class PlatformImage2DImpl *byte_count = dib_->size(); #if defined(OS_WIN) return reinterpret_cast<intptr_t>(dib_->handle()); -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_ANDROID) return static_cast<intptr_t>(dib_->handle().fd); #elif defined(OS_POSIX) return static_cast<intptr_t>(dib_->handle()); diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc index 2dc5db2..54a9e5f 100644 --- a/content/renderer/render_process_impl.cc +++ b/content/renderer/render_process_impl.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -107,7 +107,8 @@ bool RenderProcessImpl::InProcessPlugins() { // Platform specific code for dealing with bitmap transport... TransportDIB* RenderProcessImpl::CreateTransportDIB(size_t size) { -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_WIN) || defined(OS_LINUX) || \ + defined(OS_OPENBSD) || defined(OS_ANDROID) // Windows and Linux create transport DIBs inside the renderer return TransportDIB::Create(size, transport_dib_next_sequence_number_++); #elif defined(OS_MACOSX) diff --git a/content/renderer/webplugin_delegate_proxy.cc b/content/renderer/webplugin_delegate_proxy.cc index b638a20..5553439 100644 --- a/content/renderer/webplugin_delegate_proxy.cc +++ b/content/renderer/webplugin_delegate_proxy.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -751,6 +751,9 @@ void WebPluginDelegateProxy::Paint(WebKit::WebCanvas* canvas, bool WebPluginDelegateProxy::BackgroundChanged( gfx::NativeDrawingContext context, const gfx::Rect& rect) { +#if defined(OS_ANDROID) + NOTIMPLEMENTED(); +#else #if defined(OS_WIN) HBITMAP hbitmap = static_cast<HBITMAP>(GetCurrentObject(context, OBJ_BITMAP)); if (hbitmap == NULL) { @@ -890,6 +893,7 @@ bool WebPluginDelegateProxy::BackgroundChanged( return true; } #endif +#endif // OS_ANDROID return false; } |