Commit 55c5bbea authored by aa@chromium.org's avatar aa@chromium.org

Move mojo/examples/html_viewer to mojo/services/html_viewer.

BUG=389369
R=darin@chromium.org

Review URL: https://codereview.chromium.org/393983004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283426 0039d316-1c4b-4281-b951-d872f2087c98
parent 6ab979ad
...@@ -91,50 +91,6 @@ ...@@ -91,50 +91,6 @@
}, },
'includes': [ 'build/package_app.gypi' ], 'includes': [ 'build/package_app.gypi' ],
}, },
{
'target_name': 'mojo_html_viewer',
'type': 'loadable_module',
'dependencies': [
'../net/net.gyp:net',
'../skia/skia.gyp:skia',
'../third_party/WebKit/public/blink.gyp:blink',
'../ui/native_theme/native_theme.gyp:native_theme',
'../url/url.gyp:url_lib',
'mojo_application',
'mojo_common_lib',
'mojo_cpp_bindings',
'mojo_environment_chromium',
'mojo_navigation_bindings',
'mojo_network_bindings',
'mojo_launcher_bindings',
'mojo_utility',
'mojo_view_manager_lib',
'<(mojo_system_for_loadable_module)',
],
'include_dirs': [
'third_party/WebKit'
],
'sources': [
'examples/html_viewer/blink_input_events_type_converters.cc',
'examples/html_viewer/blink_input_events_type_converters.h',
'examples/html_viewer/blink_platform_impl.cc',
'examples/html_viewer/blink_platform_impl.h',
'examples/html_viewer/html_viewer.cc',
'examples/html_viewer/html_document_view.cc',
'examples/html_viewer/html_document_view.h',
'examples/html_viewer/webmimeregistry_impl.cc',
'examples/html_viewer/webmimeregistry_impl.h',
'examples/html_viewer/webstoragenamespace_impl.cc',
'examples/html_viewer/webstoragenamespace_impl.h',
'examples/html_viewer/webthemeengine_impl.cc',
'examples/html_viewer/webthemeengine_impl.h',
'examples/html_viewer/webthread_impl.cc',
'examples/html_viewer/webthread_impl.h',
'examples/html_viewer/weburlloader_impl.cc',
'examples/html_viewer/weburlloader_impl.h',
'public/cpp/application/lib/mojo_main_chromium.cc',
],
},
{ {
'target_name': 'mojo_media_viewer_bindings', 'target_name': 'mojo_media_viewer_bindings',
'type': 'static_library', 'type': 'static_library',
......
...@@ -18,6 +18,50 @@ ...@@ -18,6 +18,50 @@
'mojo_cpp_bindings', 'mojo_cpp_bindings',
], ],
}, },
{
'target_name': 'mojo_html_viewer',
'type': 'loadable_module',
'dependencies': [
'../net/net.gyp:net',
'../skia/skia.gyp:skia',
'../third_party/WebKit/public/blink.gyp:blink',
'../ui/native_theme/native_theme.gyp:native_theme',
'../url/url.gyp:url_lib',
'mojo_application',
'mojo_common_lib',
'mojo_cpp_bindings',
'mojo_environment_chromium',
'mojo_navigation_bindings',
'mojo_network_bindings',
'mojo_launcher_bindings',
'mojo_utility',
'mojo_view_manager_lib',
'<(mojo_system_for_loadable_module)',
],
'include_dirs': [
'third_party/WebKit'
],
'sources': [
'public/cpp/application/lib/mojo_main_chromium.cc',
'services/html_viewer/blink_input_events_type_converters.cc',
'services/html_viewer/blink_input_events_type_converters.h',
'services/html_viewer/blink_platform_impl.cc',
'services/html_viewer/blink_platform_impl.h',
'services/html_viewer/html_viewer.cc',
'services/html_viewer/html_document_view.cc',
'services/html_viewer/html_document_view.h',
'services/html_viewer/webmimeregistry_impl.cc',
'services/html_viewer/webmimeregistry_impl.h',
'services/html_viewer/webstoragenamespace_impl.cc',
'services/html_viewer/webstoragenamespace_impl.h',
'services/html_viewer/webthemeengine_impl.cc',
'services/html_viewer/webthemeengine_impl.h',
'services/html_viewer/webthread_impl.cc',
'services/html_viewer/webthread_impl.h',
'services/html_viewer/weburlloader_impl.cc',
'services/html_viewer/weburlloader_impl.h',
],
},
{ {
'target_name': 'mojo_input_events_lib', 'target_name': 'mojo_input_events_lib',
'type': '<(component)', 'type': '<(component)',
......
include_rules = [ include_rules = [
"+mojo/services",
"+net/base", "+net/base",
"+skia", "+skia",
"+third_party/WebKit/public", "+third_party/WebKit/public",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "mojo/examples/html_viewer/blink_input_events_type_converters.h" #include "mojo/services/html_viewer/blink_input_events_type_converters.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "third_party/WebKit/public/web/WebInputEvent.h" #include "third_party/WebKit/public/web/WebInputEvent.h"
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef MOJO_EXAMPLES_HTML_VIEWER_BLINK_INPUT_EVENTS_TYPE_CONVERTERS_H_ #ifndef MOJO_SERVICES_HTML_VIEWER_BLINK_INPUT_EVENTS_TYPE_CONVERTERS_H_
#define MOJO_EXAMPLES_HTML_VIEWER_BLINK_INPUT_EVENTS_TYPE_CONVERTERS_H_ #define MOJO_SERVICES_HTML_VIEWER_BLINK_INPUT_EVENTS_TYPE_CONVERTERS_H_
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "mojo/services/public/interfaces/input_events/input_events.mojom.h" #include "mojo/services/public/interfaces/input_events/input_events.mojom.h"
...@@ -23,4 +23,4 @@ class TypeConverter<EventPtr, scoped_ptr<blink::WebInputEvent> > { ...@@ -23,4 +23,4 @@ class TypeConverter<EventPtr, scoped_ptr<blink::WebInputEvent> > {
} // namespace mojo } // namespace mojo
#endif // MOJO_EXAMPLES_HTML_VIEWER_BLINK_INPUT_EVENTS_TYPE_CONVERTERS_H_ #endif // MOJO_SERVICES_HTML_VIEWER_BLINK_INPUT_EVENTS_TYPE_CONVERTERS_H_
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "mojo/examples/html_viewer/blink_platform_impl.h" #include "mojo/services/html_viewer/blink_platform_impl.h"
#include <cmath> #include <cmath>
...@@ -10,16 +10,15 @@ ...@@ -10,16 +10,15 @@
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/synchronization/waitable_event.h" #include "base/synchronization/waitable_event.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "mojo/examples/html_viewer/webthread_impl.h"
#include "mojo/examples/html_viewer/weburlloader_impl.h"
#include "mojo/public/cpp/application/application_impl.h" #include "mojo/public/cpp/application/application_impl.h"
#include "mojo/services/html_viewer/webthread_impl.h"
#include "mojo/services/html_viewer/weburlloader_impl.h"
#include "net/base/data_url.h" #include "net/base/data_url.h"
#include "net/base/mime_util.h" #include "net/base/mime_util.h"
#include "net/base/net_errors.h" #include "net/base/net_errors.h"
#include "third_party/WebKit/public/platform/WebWaitableEvent.h" #include "third_party/WebKit/public/platform/WebWaitableEvent.h"
namespace mojo { namespace mojo {
namespace examples {
namespace { namespace {
// TODO(darin): Figure out what our UA should really be. // TODO(darin): Figure out what our UA should really be.
...@@ -213,5 +212,4 @@ void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { ...@@ -213,5 +212,4 @@ void BlinkPlatformImpl::DestroyCurrentThread(void* thread) {
delete impl; delete impl;
} }
} // namespace examples
} // namespace mojo } // namespace mojo
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef MOJO_EXAMPLE_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_ #ifndef MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_
#define MOJO_EXAMPLE_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_ #define MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/threading/thread_local_storage.h" #include "base/threading/thread_local_storage.h"
#include "base/timer/timer.h" #include "base/timer/timer.h"
#include "mojo/examples/html_viewer/webmimeregistry_impl.h" #include "mojo/services/html_viewer/webmimeregistry_impl.h"
#include "mojo/examples/html_viewer/webthemeengine_impl.h" #include "mojo/services/html_viewer/webthemeengine_impl.h"
#include "mojo/services/public/interfaces/network/network_service.mojom.h" #include "mojo/services/public/interfaces/network/network_service.mojom.h"
#include "third_party/WebKit/public/platform/Platform.h" #include "third_party/WebKit/public/platform/Platform.h"
#include "third_party/WebKit/public/platform/WebScrollbarBehavior.h" #include "third_party/WebKit/public/platform/WebScrollbarBehavior.h"
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
namespace mojo { namespace mojo {
class ApplicationImpl; class ApplicationImpl;
namespace examples {
class BlinkPlatformImpl : public blink::Platform { class BlinkPlatformImpl : public blink::Platform {
public: public:
explicit BlinkPlatformImpl(ApplicationImpl* app); explicit BlinkPlatformImpl(ApplicationImpl* app);
...@@ -75,7 +73,6 @@ class BlinkPlatformImpl : public blink::Platform { ...@@ -75,7 +73,6 @@ class BlinkPlatformImpl : public blink::Platform {
blink::WebScrollbarBehavior scrollbar_behavior_; blink::WebScrollbarBehavior scrollbar_behavior_;
}; };
} // namespace examples
} // namespace mojo } // namespace mojo
#endif // MOJO_EXAMPLE_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_ #endif // MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "mojo/examples/html_viewer/html_document_view.h" #include "mojo/services/html_viewer/html_document_view.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/location.h" #include "base/location.h"
#include "base/single_thread_task_runner.h" #include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h" #include "base/thread_task_runner_handle.h"
#include "mojo/examples/html_viewer/blink_input_events_type_converters.h" #include "mojo/services/html_viewer/blink_input_events_type_converters.h"
#include "mojo/examples/html_viewer/webstoragenamespace_impl.h" #include "mojo/services/html_viewer/webstoragenamespace_impl.h"
#include "mojo/examples/html_viewer/weburlloader_impl.h" #include "mojo/services/html_viewer/weburlloader_impl.h"
#include "mojo/services/public/cpp/view_manager/node.h" #include "mojo/services/public/cpp/view_manager/node.h"
#include "mojo/services/public/cpp/view_manager/view.h" #include "mojo/services/public/cpp/view_manager/view.h"
#include "mojo/services/public/cpp/view_manager/view_observer.h" #include "mojo/services/public/cpp/view_manager/view_observer.h"
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "third_party/skia/include/core/SkDevice.h" #include "third_party/skia/include/core/SkDevice.h"
namespace mojo { namespace mojo {
namespace examples {
namespace { namespace {
void ConfigureSettings(blink::WebSettings* settings) { void ConfigureSettings(blink::WebSettings* settings) {
...@@ -169,7 +168,6 @@ void HTMLDocumentView::didAddMessageToConsole( ...@@ -169,7 +168,6 @@ void HTMLDocumentView::didAddMessageToConsole(
const blink::WebString& source_name, const blink::WebString& source_name,
unsigned source_line, unsigned source_line,
const blink::WebString& stack_trace) { const blink::WebString& stack_trace) {
printf("### console: %s\n", std::string(message.text.utf8()).c_str());
} }
void HTMLDocumentView::didNavigateWithinPage( void HTMLDocumentView::didNavigateWithinPage(
...@@ -218,5 +216,4 @@ void HTMLDocumentView::Repaint() { ...@@ -218,5 +216,4 @@ void HTMLDocumentView::Repaint() {
view_->SetContents(canvas->getDevice()->accessBitmap(false)); view_->SetContents(canvas->getDevice()->accessBitmap(false));
} }
} // namespace examples
} // namespace mojo } // namespace mojo
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef MOJO_EXAMPLES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_ #ifndef MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_
#define MOJO_EXAMPLES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_ #define MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
...@@ -24,8 +24,6 @@ class ViewManager; ...@@ -24,8 +24,6 @@ class ViewManager;
class View; class View;
} }
namespace examples {
// A view for a single HTML document. // A view for a single HTML document.
class HTMLDocumentView : public blink::WebViewClient, class HTMLDocumentView : public blink::WebViewClient,
public blink::WebFrameClient, public blink::WebFrameClient,
...@@ -86,7 +84,6 @@ class HTMLDocumentView : public blink::WebViewClient, ...@@ -86,7 +84,6 @@ class HTMLDocumentView : public blink::WebViewClient,
DISALLOW_COPY_AND_ASSIGN(HTMLDocumentView); DISALLOW_COPY_AND_ASSIGN(HTMLDocumentView);
}; };
} // namespace examples
} // namespace mojo } // namespace mojo
#endif // MOJO_EXAMPLES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_ #endif // MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
// found in the LICENSE file. // found in the LICENSE file.
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "mojo/examples/html_viewer/blink_platform_impl.h"
#include "mojo/examples/html_viewer/html_document_view.h"
#include "mojo/public/cpp/application/application_connection.h" #include "mojo/public/cpp/application/application_connection.h"
#include "mojo/public/cpp/application/application_delegate.h" #include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/application/application_impl.h" #include "mojo/public/cpp/application/application_impl.h"
#include "mojo/services/html_viewer/blink_platform_impl.h"
#include "mojo/services/html_viewer/html_document_view.h"
#include "mojo/services/public/cpp/view_manager/node.h" #include "mojo/services/public/cpp/view_manager/node.h"
#include "mojo/services/public/cpp/view_manager/types.h" #include "mojo/services/public/cpp/view_manager/types.h"
#include "mojo/services/public/cpp/view_manager/view.h" #include "mojo/services/public/cpp/view_manager/view.h"
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include "third_party/WebKit/public/web/WebKit.h" #include "third_party/WebKit/public/web/WebKit.h"
namespace mojo { namespace mojo {
namespace examples {
class HTMLViewer; class HTMLViewer;
...@@ -102,16 +101,12 @@ void NavigatorImpl::Navigate( ...@@ -102,16 +101,12 @@ void NavigatorImpl::Navigate(
uint32_t node_id, uint32_t node_id,
navigation::NavigationDetailsPtr navigation_details, navigation::NavigationDetailsPtr navigation_details,
navigation::ResponseDetailsPtr response_details) { navigation::ResponseDetailsPtr response_details) {
printf("In HTMLViewer, rendering url: %s\n",
response_details->response->url.data());
viewer_->Load(response_details->response.Pass()); viewer_->Load(response_details->response.Pass());
} }
}
// static // static
ApplicationDelegate* ApplicationDelegate::Create() { ApplicationDelegate* ApplicationDelegate::Create() {
return new examples::HTMLViewer; return new HTMLViewer;
} }
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "mojo/examples/html_viewer/webmimeregistry_impl.h" #include "mojo/services/html_viewer/webmimeregistry_impl.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebString.h"
namespace mojo { namespace mojo {
namespace examples {
namespace { namespace {
std::string ToASCIIOrEmpty(const blink::WebString& string) { std::string ToASCIIOrEmpty(const blink::WebString& string) {
...@@ -93,5 +92,4 @@ blink::WebString WebMimeRegistryImpl::mimeTypeFromFile( ...@@ -93,5 +92,4 @@ blink::WebString WebMimeRegistryImpl::mimeTypeFromFile(
return blink::WebString(); return blink::WebString();
} }
} // namespace examples
} // namespace mojo } // namespace mojo
...@@ -2,14 +2,13 @@ ...@@ -2,14 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef MOJO_EXAMPLES_HTML_VIEWER_WEBMIMEREGISTRY_IMPL_H_ #ifndef MOJO_SERVICES_HTML_VIEWER_WEBMIMEREGISTRY_IMPL_H_
#define MOJO_EXAMPLES_HTML_VIEWER_WEBMIMEREGISTRY_IMPL_H_ #define MOJO_SERVICES_HTML_VIEWER_WEBMIMEREGISTRY_IMPL_H_
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "third_party/WebKit/public/platform/WebMimeRegistry.h" #include "third_party/WebKit/public/platform/WebMimeRegistry.h"
namespace mojo { namespace mojo {
namespace examples {
class WebMimeRegistryImpl : public blink::WebMimeRegistry { class WebMimeRegistryImpl : public blink::WebMimeRegistry {
public: public:
...@@ -44,7 +43,6 @@ class WebMimeRegistryImpl : public blink::WebMimeRegistry { ...@@ -44,7 +43,6 @@ class WebMimeRegistryImpl : public blink::WebMimeRegistry {
const blink::WebString& path); const blink::WebString& path);
}; };
} // namespace examples
} // namespace mojo } // namespace mojo
#endif // MOJO_EXAMPLES_HTML_VIEWER_WEBMIMEREGISTRY_IMPL_H_ #endif // MOJO_SERVICES_HTML_VIEWER_WEBMIMEREGISTRY_IMPL_H_
...@@ -2,14 +2,13 @@ ...@@ -2,14 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "mojo/examples/html_viewer/webstoragenamespace_impl.h" #include "mojo/services/html_viewer/webstoragenamespace_impl.h"
#include <stdio.h> #include <stdio.h>
#include "third_party/WebKit/public/platform/WebStorageArea.h" #include "third_party/WebKit/public/platform/WebStorageArea.h"
namespace mojo { namespace mojo {
namespace examples {
namespace { namespace {
class DummyWebStorageAreaImpl : public blink::WebStorageArea { class DummyWebStorageAreaImpl : public blink::WebStorageArea {
...@@ -43,5 +42,4 @@ bool WebStorageNamespaceImpl::isSameNamespace( ...@@ -43,5 +42,4 @@ bool WebStorageNamespaceImpl::isSameNamespace(
return false; return false;
} }
} // namespace examples
} // namespace mojo } // namespace mojo
...@@ -2,14 +2,13 @@ ...@@ -2,14 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef MOJO_EXAMPLES_HTML_VIEWER_WEBSTORAGENAMESPACE_IMPL_H_ #ifndef MOJO_SERVICES_HTML_VIEWER_WEBSTORAGENAMESPACE_IMPL_H_
#define MOJO_EXAMPLES_HTML_VIEWER_WEBSTORAGENAMESPACE_IMPL_H_ #define MOJO_SERVICES_HTML_VIEWER_WEBSTORAGENAMESPACE_IMPL_H_
#include "base/macros.h" #include "base/macros.h"
#include "third_party/WebKit/public/platform/WebStorageNamespace.h" #include "third_party/WebKit/public/platform/WebStorageNamespace.h"
namespace mojo { namespace mojo {
namespace examples {
class WebStorageNamespaceImpl : public blink::WebStorageNamespace { class WebStorageNamespaceImpl : public blink::WebStorageNamespace {
public: public:
...@@ -26,7 +25,6 @@ class WebStorageNamespaceImpl : public blink::WebStorageNamespace { ...@@ -26,7 +25,6 @@ class WebStorageNamespaceImpl : public blink::WebStorageNamespace {
DISALLOW_COPY_AND_ASSIGN(WebStorageNamespaceImpl); DISALLOW_COPY_AND_ASSIGN(WebStorageNamespaceImpl);
}; };
} // namespace examples
} // namespace mojo } // namespace mojo
#endif // MOJO_EXAMPLES_HTML_VIEWER_WEBSTORAGENAMESPACE_IMPL_H_ #endif // MOJO_SERVICES_HTML_VIEWER_WEBSTORAGENAMESPACE_IMPL_H_
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "mojo/examples/html_viewer/webthemeengine_impl.h" #include "mojo/services/html_viewer/webthemeengine_impl.h"
#include "skia/ext/platform_canvas.h" #include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/public/platform/WebRect.h" #include "third_party/WebKit/public/platform/WebRect.h"
...@@ -15,7 +15,6 @@ using blink::WebRect; ...@@ -15,7 +15,6 @@ using blink::WebRect;
using blink::WebThemeEngine; using blink::WebThemeEngine;
namespace mojo { namespace mojo {
namespace examples {
static ui::NativeTheme::Part NativeThemePart( static ui::NativeTheme::Part NativeThemePart(
WebThemeEngine::Part part) { WebThemeEngine::Part part) {
...@@ -200,5 +199,4 @@ void WebThemeEngineImpl::paintStateTransition(blink::WebCanvas* canvas, ...@@ -200,5 +199,4 @@ void WebThemeEngineImpl::paintStateTransition(blink::WebCanvas* canvas,
gfx::Rect(rect)); gfx::Rect(rect));
} }
} // namespace examples
} // namespace mojo } // namespace mojo
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef MOJO_EXAMPLES_HTML_VIEWER_WEBTHEMEENGINE_IMPL_H_ #ifndef MOJO_SERVICES_HTML_VIEWER_WEBTHEMEENGINE_IMPL_H_
#define MOJO_EXAMPLES_HTML_VIEWER_WEBTHEMEENGINE_IMPL_H_ #define MOJO_SERVICES_HTML_VIEWER_WEBTHEMEENGINE_IMPL_H_
#include "third_party/WebKit/public/platform/WebThemeEngine.h" #include "third_party/WebKit/public/platform/WebThemeEngine.h"
namespace mojo { namespace mojo {
namespace examples {
class WebThemeEngineImpl : public blink::WebThemeEngine { class WebThemeEngineImpl : public blink::WebThemeEngine {
public: public:
...@@ -28,7 +27,6 @@ class WebThemeEngineImpl : public blink::WebThemeEngine { ...@@ -28,7 +27,6 @@ class WebThemeEngineImpl : public blink::WebThemeEngine {
const blink::WebRect& rect); const blink::WebRect& rect);
}; };
} // namespace examples
} // namespace mojo } // namespace mojo
#endif // MOJO_EXAMPLES_HTML_VIEWER_WEBTHEMEENGINE_IMPL_H_ #endif // MOJO_SERVICES_HTML_VIEWER_WEBTHEMEENGINE_IMPL_H_
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// An implementation of WebThread in terms of base::MessageLoop and // An implementation of WebThread in terms of base::MessageLoop and
// base::Thread // base::Thread
#include "mojo/examples/html_viewer/webthread_impl.h" #include "mojo/services/html_viewer/webthread_impl.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/bind_helpers.h" #include "base/bind_helpers.h"
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "base/threading/platform_thread.h" #include "base/threading/platform_thread.h"
namespace mojo { namespace mojo {
namespace examples {
WebThreadBase::WebThreadBase() {} WebThreadBase::WebThreadBase() {}
WebThreadBase::~WebThreadBase() {} WebThreadBase::~WebThreadBase() {}
...@@ -129,5 +128,4 @@ bool WebThreadImplForMessageLoop::isCurrentThread() const { ...@@ -129,5 +128,4 @@ bool WebThreadImplForMessageLoop::isCurrentThread() const {
WebThreadImplForMessageLoop::~WebThreadImplForMessageLoop() {} WebThreadImplForMessageLoop::~WebThreadImplForMessageLoop() {}
} // namespace examples
} // namespace mojo } // namespace mojo
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef MOJO_EXAMPLES_HTML_VIEWER_WEBTHREAD_IMPL_H_ #ifndef MOJO_SERVICES_HTML_VIEWER_WEBTHREAD_IMPL_H_
#define MOJO_EXAMPLES_HTML_VIEWER_WEBTHREAD_IMPL_H_ #define MOJO_SERVICES_HTML_VIEWER_WEBTHREAD_IMPL_H_
#include <map> #include <map>
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include "third_party/WebKit/public/platform/WebThread.h" #include "third_party/WebKit/public/platform/WebThread.h"
namespace mojo { namespace mojo {
namespace examples {
class WebThreadBase : public blink::WebThread { class WebThreadBase : public blink::WebThread {
public: public:
...@@ -69,7 +68,6 @@ class WebThreadImplForMessageLoop : public WebThreadBase { ...@@ -69,7 +68,6 @@ class WebThreadImplForMessageLoop : public WebThreadBase {
scoped_refptr<base::MessageLoopProxy> message_loop_; scoped_refptr<base::MessageLoopProxy> message_loop_;
}; };
} // namespace examples
} // namespace mojo } // namespace mojo
#endif // MOJO_EXAMPLES_HTML_VIEWER_WEBTHREAD_IMPL_H_ #endif // MOJO_SERVICES_HTML_VIEWER_WEBTHREAD_IMPL_H_
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "mojo/examples/html_viewer/weburlloader_impl.h" #include "mojo/services/html_viewer/weburlloader_impl.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/logging.h" #include "base/logging.h"
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include "third_party/WebKit/public/platform/WebURLResponse.h" #include "third_party/WebKit/public/platform/WebURLResponse.h"
namespace mojo { namespace mojo {
namespace examples {
namespace { namespace {
blink::WebURLResponse ToWebURLResponse(const URLResponsePtr& url_response) { blink::WebURLResponse ToWebURLResponse(const URLResponsePtr& url_response) {
...@@ -187,5 +186,4 @@ void WebURLLoaderImpl::OnResponseBodyStreamReady(MojoResult result) { ...@@ -187,5 +186,4 @@ void WebURLLoaderImpl::OnResponseBodyStreamReady(MojoResult result) {
ReadMore(); ReadMore();
} }
} // namespace examples
} // namespace mojo } // namespace mojo
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef MOJO_EXAMPLE_HTML_VIEWER_WEBURLLOADER_IMPL_H_ #ifndef MOJO_SERVICES_HTML_VIEWER_WEBURLLOADER_IMPL_H_
#define MOJO_EXAMPLE_HTML_VIEWER_WEBURLLOADER_IMPL_H_ #define MOJO_SERVICES_HTML_VIEWER_WEBURLLOADER_IMPL_H_
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "mojo/common/handle_watcher.h" #include "mojo/common/handle_watcher.h"
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
namespace mojo { namespace mojo {
class NetworkService; class NetworkService;
namespace examples {
// The concrete type of WebURLRequest::ExtraData. // The concrete type of WebURLRequest::ExtraData.
class WebURLRequestExtraData : public blink::WebURLRequest::ExtraData { class WebURLRequestExtraData : public blink::WebURLRequest::ExtraData {
public: public:
...@@ -59,7 +57,6 @@ class WebURLLoaderImpl : public blink::WebURLLoader { ...@@ -59,7 +57,6 @@ class WebURLLoaderImpl : public blink::WebURLLoader {
DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl);
}; };
} // namespace examples
} // namespace mojo } // namespace mojo
#endif // MOJO_EXAMPLE_HTML_VIEWER_WEBURLLOADER_IMPL_H_ #endif // MOJO_SERVICES_HTML_VIEWER_WEBURLLOADER_IMPL_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment