Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: mojo/services/html_viewer/html_viewer.cc

Issue 477923004: Create native_viewport_service, don't build it into mojo_shell unless Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove workaround for thunks Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/services/html_viewer/html_viewer.cc
diff --git a/mojo/services/html_viewer/html_viewer.cc b/mojo/services/html_viewer/html_viewer.cc
index aa8d46bfb299d1bc5330006a5c5aa56880c4da95..e51837c6e31de238fed187856e7194c69ba58288 100644
--- a/mojo/services/html_viewer/html_viewer.cc
+++ b/mojo/services/html_viewer/html_viewer.cc
@@ -19,6 +19,13 @@
#include "mojo/services/public/interfaces/navigation/navigation.mojom.h"
#include "third_party/WebKit/public/web/WebKit.h"
+#if !defined(COMPONENT_BUILD)
+#include "base/i18n/icu_util.h"
+#include "base/path_service.h"
+#include "ui/base/resource/resource_bundle.h"
+#include "ui/base/ui_base_paths.h"
+#endif
+
namespace mojo {
class HTMLViewer;
@@ -63,6 +70,20 @@ class HTMLViewer : public ApplicationDelegate, public ViewManagerDelegate {
application_impl_ = app;
blink_platform_impl_.reset(new BlinkPlatformImpl(app));
blink::initialize(blink_platform_impl_.get());
+
+#if !defined(COMPONENT_BUILD)
+ base::i18n::InitializeICU();
+
+ ui::RegisterPathProvider();
+
+ base::FilePath ui_test_pak_path;
+ CHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
+ ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
+
+// There is a bunch of static state in gfx::Font, by running this now,
+// before any other apps load, we ensure all the state is set up.
+// gfx::Font();
Ben Goodger (Google) 2014/09/02 22:24:16 ??
DaveMoore 2014/09/02 22:39:06 Sorry. Unnecessary.
+#endif
}
virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)

Powered by Google App Engine
This is Rietveld 408576698