diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-05 20:14:17 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-05 20:14:17 +0000 |
commit | 1c142a5d402b0a0a33ca345dbc65af719ff7f294 (patch) | |
tree | 83c68ddffcb391bf1acb218aac1cd19d91df7cf8 /content | |
parent | f6c30c92b7d0d3202bced1f0b991dc0e72a3ff66 (diff) | |
download | chromium_src-1c142a5d402b0a0a33ca345dbc65af719ff7f294.zip chromium_src-1c142a5d402b0a0a33ca345dbc65af719ff7f294.tar.gz chromium_src-1c142a5d402b0a0a33ca345dbc65af719ff7f294.tar.bz2 |
Removes use_mojo
Now that we've sorted out the build issues on all platforms it can be
removed.
BUG=353602
TEST=none
R=jam@chromium.org
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/226213002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262032 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/app/content_main_runner.cc | 9 | ||||
-rw-r--r-- | content/browser/renderer_host/render_process_host_impl.cc | 11 | ||||
-rw-r--r-- | content/browser/renderer_host/render_process_host_impl.h | 14 | ||||
-rw-r--r-- | content/browser/renderer_host/render_view_host_impl.cc | 34 | ||||
-rw-r--r-- | content/browser/renderer_host/render_view_host_impl.h | 5 | ||||
-rw-r--r-- | content/browser/webui/web_ui_data_source_impl.cc | 7 | ||||
-rw-r--r-- | content/common/content_message_generator.h | 5 | ||||
-rw-r--r-- | content/content.gyp | 6 | ||||
-rw-r--r-- | content/content_app.gypi | 6 | ||||
-rw-r--r-- | content/content_browser.gypi | 15 | ||||
-rw-r--r-- | content/content_common.gypi | 15 | ||||
-rw-r--r-- | content/content_renderer.gypi | 21 | ||||
-rw-r--r-- | content/content_resources.grd | 2 | ||||
-rw-r--r-- | content/content_tests.gypi | 31 | ||||
-rw-r--r-- | content/public/browser/render_view_host.h | 13 | ||||
-rw-r--r-- | content/public/browser/web_ui_data_source.h | 2 | ||||
-rw-r--r-- | content/renderer/render_thread_impl.cc | 7 | ||||
-rw-r--r-- | content/renderer/render_view_impl.cc | 7 | ||||
-rw-r--r-- | content/test/content_test_launcher.cc | 11 |
19 files changed, 52 insertions, 169 deletions
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc index d64eb45..a00066f 100644 --- a/content/app/content_main_runner.cc +++ b/content/app/content_main_runner.cc @@ -61,6 +61,7 @@ #endif #if !defined(OS_IOS) +#include "content/app/mojo/mojo_init.h" #include "content/public/plugin/content_plugin_client.h" #include "content/public/renderer/content_renderer_client.h" #include "content/public/utility/content_utility_client.h" @@ -101,10 +102,6 @@ int tc_set_new_mode(int mode); } #endif -#if defined(USE_MOJO) -#include "content/app/mojo/mojo_init.h" -#endif - namespace content { extern int GpuMain(const content::MainFunctionParams&); #if defined(ENABLE_PLUGINS) @@ -665,7 +662,7 @@ class ContentMainRunnerImpl : public ContentMainRunner { std::string process_type = command_line.GetSwitchValueASCII(switches::kProcessType); -#if defined(USE_MOJO) +#if !defined(OS_IOS) // Initialize mojo here so that services can be registered. InitializeMojo(); #endif @@ -812,7 +809,7 @@ class ContentMainRunnerImpl : public ContentMainRunner { delegate_->ProcessExiting(process_type); } -#if defined(USE_MOJO) +#if !defined(OS_IOS) ShutdownMojo(); #endif diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index 5315c88..b8515fa 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -86,6 +86,7 @@ #include "content/browser/renderer_host/pepper/pepper_message_filter.h" #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" #include "content/browser/renderer_host/render_message_filter.h" +#include "content/browser/renderer_host/render_process_host_mojo_impl.h" #include "content/browser/renderer_host/render_view_host_delegate.h" #include "content/browser/renderer_host/render_view_host_impl.h" #include "content/browser/renderer_host/render_widget_helper.h" @@ -160,10 +161,6 @@ #include "content/common/media/media_stream_messages.h" #endif -#if defined(USE_MOJO) -#include "content/browser/renderer_host/render_process_host_mojo_impl.h" -#endif - extern bool g_exited_main_message_loop; static const char* kSiteProcessMapKeyName = "content_site_process_map"; @@ -1933,9 +1930,7 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead) { ClearTransportDIBCache(); -#if defined(USE_MOJO) render_process_host_mojo_.reset(); -#endif // It's possible that one of the calls out to the observers might have caused // this object to be no longer needed. @@ -2080,10 +2075,8 @@ void RenderProcessHostImpl::OnProcessLaunched() { EnableAecDump(WebRTCInternals::GetInstance()->aec_dump_file_path()); #endif -#if defined(USE_MOJO) if (render_process_host_mojo_.get()) render_process_host_mojo_->OnProcessLaunched(); -#endif } scoped_refptr<AudioRendererHost> @@ -2157,7 +2150,6 @@ void RenderProcessHostImpl::DecrementWorkerRefCount() { Cleanup(); } -#if defined(USE_MOJO) void RenderProcessHostImpl::SetWebUIHandle( int32 view_routing_id, mojo::ScopedMessagePipeHandle handle) { @@ -2165,6 +2157,5 @@ void RenderProcessHostImpl::SetWebUIHandle( render_process_host_mojo_.reset(new RenderProcessHostMojoImpl(this)); render_process_host_mojo_->SetWebUIHandle(view_routing_id, handle.Pass()); } -#endif } // namespace content diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h index ac07b62..9ab3d81 100644 --- a/content/browser/renderer_host/render_process_host_impl.h +++ b/content/browser/renderer_host/render_process_host_impl.h @@ -21,11 +21,8 @@ #include "content/public/browser/render_process_host.h" #include "ipc/ipc_channel_proxy.h" #include "ipc/ipc_platform_file.h" -#include "ui/surface/transport_dib.h" - -#if defined(USE_MOJO) #include "mojo/public/cpp/system/core.h" -#endif +#include "ui/surface/transport_dib.h" struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; @@ -46,6 +43,7 @@ class GpuMessageFilter; class MessagePortMessageFilter; class PeerConnectionTrackerHost; class RendererMainThread; +class RenderProcessHostMojoImpl; class RenderWidgetHelper; class RenderWidgetHost; class RenderWidgetHostImpl; @@ -54,10 +52,6 @@ class ScreenOrientationDispatcherHost; class StoragePartition; class StoragePartitionImpl; -#if defined(USE_MOJO) -class RenderProcessHostMojoImpl; -#endif - // Implements a concrete RenderProcessHost for the browser process for talking // to actual renderer processes (as opposed to mocks). // @@ -241,10 +235,8 @@ class CONTENT_EXPORT RenderProcessHostImpl void IncrementWorkerRefCount(); void DecrementWorkerRefCount(); -#if defined(USE_MOJO) void SetWebUIHandle(int32 view_routing_id, mojo::ScopedMessagePipeHandle handle); -#endif protected: // A proxy for our IPC::Channel that lives on the IO thread (see @@ -438,9 +430,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // Records the time when the process starts surviving for workers for UMA. base::TimeTicks survive_for_worker_start_time_; -#if defined(USE_MOJO) scoped_ptr<RenderProcessHostMojoImpl> render_process_host_mojo_; -#endif base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc index c790c8f..55fdda0 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc @@ -697,24 +697,6 @@ void RenderViewHostImpl::SetHasPendingCrossSiteRequest( GetProcess()->GetID(), GetRoutingID(), has_pending_request); } -#if defined(OS_ANDROID) -void RenderViewHostImpl::ActivateNearestFindResult(int request_id, - float x, - float y) { - Send(new InputMsg_ActivateNearestFindResult(GetRoutingID(), - request_id, x, y)); -} - -void RenderViewHostImpl::RequestFindMatchRects(int current_version) { - Send(new ViewMsg_FindMatchRects(GetRoutingID(), current_version)); -} - -void RenderViewHostImpl::DisableFullscreenEncryptedMediaPlayback() { - media_player_manager_->DisableFullscreenEncryptedMediaPlayback(); -} -#endif - -#if defined(USE_MOJO) void RenderViewHostImpl::SetWebUIHandle(mojo::ScopedMessagePipeHandle handle) { // Never grant any bindings to browser plugin guests. if (GetProcess()->IsGuest()) { @@ -732,6 +714,22 @@ void RenderViewHostImpl::SetWebUIHandle(mojo::ScopedMessagePipeHandle handle) { static_cast<RenderProcessHostImpl*>(GetProcess()); process->SetWebUIHandle(GetRoutingID(), handle.Pass()); } + +#if defined(OS_ANDROID) +void RenderViewHostImpl::ActivateNearestFindResult(int request_id, + float x, + float y) { + Send(new InputMsg_ActivateNearestFindResult(GetRoutingID(), + request_id, x, y)); +} + +void RenderViewHostImpl::RequestFindMatchRects(int current_version) { + Send(new ViewMsg_FindMatchRects(GetRoutingID(), current_version)); +} + +void RenderViewHostImpl::DisableFullscreenEncryptedMediaPlayback() { + media_player_manager_->DisableFullscreenEncryptedMediaPlayback(); +} #endif void RenderViewHostImpl::DragTargetDragEnter( diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h index d810b74..7db9a2a 100644 --- a/content/browser/renderer_host/render_view_host_impl.h +++ b/content/browser/renderer_host/render_view_host_impl.h @@ -220,6 +220,7 @@ class CONTENT_EXPORT RenderViewHostImpl const WebPreferences& prefs) OVERRIDE; virtual void GetAudioOutputControllers( const GetAudioOutputControllersCallback& callback) const OVERRIDE; + virtual void SetWebUIHandle(mojo::ScopedMessagePipeHandle handle) OVERRIDE; #if defined(OS_ANDROID) virtual void ActivateNearestFindResult(int request_id, @@ -229,10 +230,6 @@ class CONTENT_EXPORT RenderViewHostImpl virtual void DisableFullscreenEncryptedMediaPlayback() OVERRIDE; #endif -#if defined(USE_MOJO) - virtual void SetWebUIHandle(mojo::ScopedMessagePipeHandle handle) OVERRIDE; -#endif - void set_delegate(RenderViewHostDelegate* d) { CHECK(d); // http://crbug.com/82827 delegate_ = d; diff --git a/content/browser/webui/web_ui_data_source_impl.cc b/content/browser/webui/web_ui_data_source_impl.cc index 990278e..c2eb6ce 100644 --- a/content/browser/webui/web_ui_data_source_impl.cc +++ b/content/browser/webui/web_ui_data_source_impl.cc @@ -11,13 +11,10 @@ #include "base/strings/string_util.h" #include "content/public/common/content_client.h" #include "grit/content_resources.h" +#include "mojo/public/js/bindings/constants.h" #include "ui/base/webui/jstemplate_builder.h" #include "ui/base/webui/web_ui_util.h" -#if defined(USE_MOJO) -#include "mojo/public/js/bindings/constants.h" -#endif - namespace content { // static @@ -25,7 +22,6 @@ WebUIDataSource* WebUIDataSource::Create(const std::string& source_name) { return new WebUIDataSourceImpl(source_name); } -#if defined(USE_MOJO) // static WebUIDataSource* WebUIDataSource::AddMojoDataSource( BrowserContext* browser_context) { @@ -46,7 +42,6 @@ WebUIDataSource* WebUIDataSource::AddMojoDataSource( URLDataManager::AddWebUIDataSource(browser_context, mojo_source); return mojo_source; } -#endif // static void WebUIDataSource::Add(BrowserContext* browser_context, diff --git a/content/common/content_message_generator.h b/content/common/content_message_generator.h index d773cb9..31bd785 100644 --- a/content/common/content_message_generator.h +++ b/content/common/content_message_generator.h @@ -40,6 +40,7 @@ #include "content/common/memory_benchmark_messages.h" #include "content/common/message_port_messages.h" #include "content/common/mime_registry_messages.h" +#include "content/common/mojo/mojo_messages.h" #include "content/common/p2p_messages.h" #include "content/common/pepper_messages.h" #include "content/common/plugin_process_messages.h" @@ -61,7 +62,3 @@ #include "content/common/media/cdm_messages.h" #include "content/common/media/media_player_messages_android.h" #endif // defined(OS_ANDROID) - -#if defined(USE_MOJO) -#include "content/common/mojo/mojo_messages.h" -#endif diff --git a/content/content.gyp b/content/content.gyp index bc344e7..d4cacf7 100644 --- a/content/content.gyp +++ b/content/content.gyp @@ -22,13 +22,9 @@ ], }, 'conditions': [ - ['use_mojo==1', { - 'includes': [ - 'content_common_mojo_bindings.gypi', - ], - }], ['OS != "ios"', { 'includes': [ + 'content_common_mojo_bindings.gypi', '../build/win_precompile.gypi', ], 'targets': [ diff --git a/content/content_app.gypi b/content/content_app.gypi index a66a12d..501cd0b 100644 --- a/content/content_app.gypi +++ b/content/content_app.gypi @@ -62,14 +62,10 @@ ['OS=="ios"', { 'sources!': [ 'app/content_main.cc', - ], - }], - ['use_mojo==0', { - 'sources!': [ 'app/mojo/mojo_init.cc', 'app/mojo/mojo_init.h', ], - }, { + }, { # OS!="ios" 'dependencies': [ '../mojo/mojo.gyp:mojo_environment_chromium', '../mojo/mojo.gyp:mojo_service_manager', diff --git a/content/content_browser.gypi b/content/content_browser.gypi index 34fca9c..e850c4b 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi @@ -1401,18 +1401,6 @@ 'browser/gamepad/gamepad_platform_data_fetcher.cc', ] }], - ['use_mojo==1', { - 'dependencies': [ - '../mojo/mojo.gyp:mojo_bindings', - '../mojo/mojo.gyp:mojo_system', - 'content_common_mojo_bindings', - ], - }, { # use_mojo==0 - 'sources!': [ - 'browser/renderer_host/render_process_host_mojo_impl.cc', - 'browser/renderer_host/render_process_host_mojo_impl.h', - ], - }], ['OS=="ios"', { 'sources/': [ # iOS only needs a small portion of content; exclude all the @@ -1442,7 +1430,10 @@ }, { # OS!="ios" 'dependencies': [ 'browser/devtools/devtools_resources.gyp:devtools_resources', + 'content_common_mojo_bindings', '../cc/cc.gyp:cc', + '../mojo/mojo.gyp:mojo_bindings', + '../mojo/mojo.gyp:mojo_system', '../net/net.gyp:http_server', '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase', '../ui/surface/surface.gyp:surface', diff --git a/content/content_common.gypi b/content/content_common.gypi index 5f51794..01b5f42 100644 --- a/content/content_common.gypi +++ b/content/content_common.gypi @@ -500,6 +500,9 @@ '../ipc/ipc.gyp:ipc', '../media/media.gyp:media', '../media/media.gyp:shared_memory_support', + '../mojo/mojo.gyp:mojo_environment_chromium', + '../mojo/mojo.gyp:mojo_system', + '../mojo/mojo.gyp:mojo_system_impl', '../third_party/WebKit/public/blink.gyp:blink', '../ui/gl/gl.gyp:gl', '../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu', @@ -509,18 +512,6 @@ 'content.gyp:webkit_version', ], }], - ['use_mojo==0', { - 'sources!': [ - 'common/mojo/mojo_channel_init.cc', - 'common/mojo/mojo_channel_init.h', - ], - }, { - 'dependencies': [ - '../mojo/mojo.gyp:mojo_environment_chromium', - '../mojo/mojo.gyp:mojo_system', - '../mojo/mojo.gyp:mojo_system_impl', - ], - }], ['OS=="mac"', { 'dependencies': [ '../webkit/webkit_resources.gyp:webkit_resources', diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi index 159321d..45dd77c 100644 --- a/content/content_renderer.gypi +++ b/content/content_renderer.gypi @@ -4,9 +4,12 @@ { 'dependencies': [ + 'content_common_mojo_bindings', '../gin/gin.gyp:gin', '../jingle/jingle.gyp:jingle_glue', '../media/media.gyp:media', + '../mojo/mojo.gyp:mojo_environment_chromium', + '../mojo/mojo.gyp:mojo_js_bindings_lib', '../net/net.gyp:net', '../skia/skia.gyp:skia', '../third_party/WebKit/public/blink.gyp:blink', @@ -580,24 +583,6 @@ '../base/allocator/allocator.gyp:allocator', ], }], - ['use_mojo==0', { - 'sources!': [ - 'renderer/mojo/mojo_render_process_observer.cc', - 'renderer/mojo/mojo_render_process_observer.h', - 'renderer/web_ui_mojo.cc', - 'renderer/web_ui_mojo.h', - 'renderer/web_ui_mojo_context_state.cc', - 'renderer/web_ui_mojo_context_state.h', - 'renderer/web_ui_runner.cc', - 'renderer/web_ui_runner.h', - ], - }, { - 'dependencies': [ - 'content_common_mojo_bindings', - '../mojo/mojo.gyp:mojo_environment_chromium', - '../mojo/mojo.gyp:mojo_js_bindings_lib', - ], - }], ['OS=="android"', { 'sources!': [ 'renderer/accessibility/renderer_accessibility_focus_only.cc', diff --git a/content/content_resources.grd b/content/content_resources.grd index 694fffd..e689fc6 100644 --- a/content/content_resources.grd +++ b/content/content_resources.grd @@ -34,7 +34,7 @@ <include name="IDR_RENDERER_SANDBOX_PROFILE" file="renderer/renderer.sb" type="BINDATA" /> <include name="IDR_UTILITY_SANDBOX_PROFILE" file="utility/utility.sb" type="BINDATA" /> </if> - <if expr="use_mojo"> + <if expr="not is_ios"> <include name="IDR_MOJO_CODEC_JS" file="../mojo/public/js/bindings/codec.js" flattenhtml="true" type="BINDATA" /> <include name="IDR_MOJO_CONNECTION_JS" file="../mojo/public/js/bindings/connection.js" flattenhtml="true" type="BINDATA" /> <include name="IDR_MOJO_CONNECTOR_JS" file="../mojo/public/js/bindings/connector.js" flattenhtml="true" type="BINDATA" /> diff --git a/content/content_tests.gypi b/content/content_tests.gypi index 9502cd7..0d9efcc 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -924,7 +924,7 @@ 'public/test/content_browser_test_utils_mac.mm', ], 'conditions': [ - ['use_mojo==1 and OS=="android"', { + ['OS=="android"', { 'dependencies': [ 'content.gyp:content_app_both', ], @@ -968,12 +968,18 @@ 'content_resources.gyp:content_resources', 'content_shell_lib', 'content_shell_pak', + 'web_ui_test_mojo_bindings', '../base/base.gyp:test_support_base', '../gin/gin.gyp:gin', '../gpu/gpu.gyp:gpu', '../ipc/ipc.gyp:test_support_ipc', '../media/media.gyp:media_test_support', '../media/media.gyp:shared_memory_support', + '../mojo/mojo.gyp:mojo_bindings', + '../mojo/mojo.gyp:mojo_environment_chromium', + '../mojo/mojo.gyp:mojo_service_manager', + '../mojo/mojo.gyp:mojo_system', + '../mojo/mojo.gyp:mojo_system_impl', '../net/net.gyp:net_test_support', '../ppapi/ppapi_internal.gyp:ppapi_host', '../ppapi/ppapi_internal.gyp:ppapi_ipc', @@ -1102,19 +1108,6 @@ 'browser/web_contents/touch_editable_impl_aura_browsertest.cc', ], }], - ['use_mojo==0', { - 'sources!': [ - 'browser/webui/web_ui_mojo_browsertest.cc', - ], - }, { # use_mojo==1 - 'dependencies': [ - 'web_ui_test_mojo_bindings', - '../mojo/mojo.gyp:mojo_bindings', - '../mojo/mojo.gyp:mojo_environment_chromium', - '../mojo/mojo.gyp:mojo_system', - '../mojo/mojo.gyp:mojo_system_impl', - ], - }], ['OS=="win"', { 'resource_include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)/webkit', @@ -1202,16 +1195,6 @@ ['exclude', '^browser/compositor/'], ], }], - ['use_mojo==1', { - 'dependencies': [ - '../mojo/mojo.gyp:mojo_environment_chromium', - '../mojo/mojo.gyp:mojo_service_manager', - ], - },{ - 'sources!': [ - 'app/mojo/mojo_browsertest.cc', - ], - }], ['OS!="android" and OS!="ios"', { # npapi test plugin doesn't build on android or ios 'dependencies': [ diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h index 09104c5..74a2909 100644 --- a/content/public/browser/render_view_host.h +++ b/content/public/browser/render_view_host.h @@ -12,11 +12,8 @@ #include "content/public/browser/render_widget_host.h" #include "content/public/common/file_chooser_params.h" #include "content/public/common/page_zoom.h" -#include "third_party/WebKit/public/web/WebDragOperation.h" - -#if defined(USE_MOJO) #include "mojo/public/cpp/system/core.h" -#endif +#include "third_party/WebKit/public/web/WebDragOperation.h" class GURL; struct WebPreferences; @@ -218,6 +215,9 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { virtual void GetAudioOutputControllers( const GetAudioOutputControllersCallback& callback) const = 0; + // Sets the mojo handle for WebUI pages. + virtual void SetWebUIHandle(mojo::ScopedMessagePipeHandle handle) = 0; + #if defined(OS_ANDROID) // Selects and zooms to the find result nearest to the point (x,y) // defined in find-in-page coordinates. @@ -230,11 +230,6 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { virtual void DisableFullscreenEncryptedMediaPlayback() = 0; #endif -#if defined(USE_MOJO) - // Sets the mojo handle for WebUI pages. - virtual void SetWebUIHandle(mojo::ScopedMessagePipeHandle handle) = 0; -#endif - private: // This interface should only be implemented inside content. friend class RenderViewHostImpl; diff --git a/content/public/browser/web_ui_data_source.h b/content/public/browser/web_ui_data_source.h index ca4c9e8..89c8dc2 100644 --- a/content/public/browser/web_ui_data_source.h +++ b/content/public/browser/web_ui_data_source.h @@ -25,13 +25,11 @@ class WebUIDataSource { CONTENT_EXPORT static WebUIDataSource* Create(const std::string& source_name); -#if defined(USE_MOJO) // Adds the necessary resources for mojo bindings returning the // WebUIDataSource that handles the resources. Callers do not own the return // value. CONTENT_EXPORT static WebUIDataSource* AddMojoDataSource( BrowserContext* browser_context); -#endif // Adds a WebUI data source to |browser_context|. CONTENT_EXPORT static void Add(BrowserContext* browser_context, diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index 3157515..a2a0ef4 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -82,6 +82,7 @@ #include "content/renderer/media/video_capture_impl_manager.h" #include "content/renderer/media/video_capture_message_filter.h" #include "content/renderer/media/webrtc_identity_service.h" +#include "content/renderer/mojo/mojo_render_process_observer.h" #include "content/renderer/p2p/socket_dispatcher.h" #include "content/renderer/render_process_impl.h" #include "content/renderer/render_view_impl.h" @@ -146,10 +147,6 @@ #include "content/renderer/npapi/plugin_channel_host.h" #endif -#if defined(USE_MOJO) -#include "content/renderer/mojo/mojo_render_process_observer.h" -#endif - using base::ThreadRestrictions; using blink::WebDocument; using blink::WebFrame; @@ -397,10 +394,8 @@ void RenderThreadImpl::Init() { AddFilter((new EmbeddedWorkerContextMessageFilter())->GetFilter()); -#if defined(USE_MOJO) // MojoRenderProcessObserver deletes itself as necessary. new MojoRenderProcessObserver(this); -#endif GetContentClient()->renderer()->RenderThreadStarted(); diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 666772c..f99c6ff 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -118,6 +118,7 @@ #include "content/renderer/v8_value_converter_impl.h" #include "content/renderer/web_ui_extension.h" #include "content/renderer/web_ui_extension_data.h" +#include "content/renderer/web_ui_mojo.h" #include "content/renderer/websharedworker_proxy.h" #include "media/audio/audio_output_device.h" #include "media/base/audio_renderer_mixer_input.h" @@ -238,10 +239,6 @@ #include "content/renderer/media/rtc_peer_connection_handler.h" #endif -#if defined(USE_MOJO) -#include "content/renderer/web_ui_mojo.h" -#endif - using blink::WebAXObject; using blink::WebApplicationCacheHost; using blink::WebApplicationCacheHostClient; @@ -3354,10 +3351,8 @@ void RenderViewImpl::OnAllowBindings(int enabled_bindings_flags) { !(enabled_bindings_ & BINDINGS_POLICY_WEB_UI)) { // WebUIExtensionData deletes itself when we're destroyed. new WebUIExtensionData(this); -#if defined(USE_MOJO) // WebUIMojo deletes itself when we're destroyed. new WebUIMojo(this); -#endif } enabled_bindings_ |= enabled_bindings_flags; diff --git a/content/test/content_test_launcher.cc b/content/test/content_test_launcher.cc index d819165..d351e91 100644 --- a/content/test/content_test_launcher.cc +++ b/content/test/content_test_launcher.cc @@ -21,17 +21,13 @@ #if defined(OS_ANDROID) #include "base/message_loop/message_loop.h" +#include "content/app/mojo/mojo_init.h" #include "content/common/url_schemes.h" #include "content/public/common/content_paths.h" #include "content/public/test/nested_message_pump_android.h" #include "content/shell/browser/shell_content_browser_client.h" #include "content/shell/common/shell_content_client.h" #include "ui/base/ui_base_paths.h" - -#if defined(USE_MOJO) -#include "content/app/mojo/mojo_init.h" -#endif - #endif namespace content { @@ -73,19 +69,16 @@ class ContentBrowserTestSuite : public ContentTestSuiteBase { ui::RegisterPathProvider(); RegisterInProcessThreads(); -#if defined(USE_MOJO) InitializeMojo(); #endif -#endif - ContentTestSuiteBase::Initialize(); } virtual void Shutdown() OVERRIDE { ContentTestSuiteBase::Shutdown(); -#if defined(OS_ANDROID) && defined(USE_MOJO) +#if defined(OS_ANDROID) ShutdownMojo(); #endif } |