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

Unified Diff: mojo/shell/context.cc

Issue 514063003: Update view_manager and window_manager to make use of content handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@viewman2
Patch Set: Created 6 years, 4 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/shell/context.cc
diff --git a/mojo/shell/context.cc b/mojo/shell/context.cc
index 706c511489a72a1f4564f3c3f22e7cc3536ee1c5..48fba5c98f915386569413409eb93e01d6d579c2 100644
--- a/mojo/shell/context.cc
+++ b/mojo/shell/context.cc
@@ -72,6 +72,11 @@ static base::LazyInstance<Setup>::Leaky setup = LAZY_INSTANCE_INITIALIZER;
void InitContentHandlers(DynamicApplicationLoader* loader,
base::CommandLine* command_line) {
+ // Default content handlers.
+ loader->RegisterContentHandler("image/png", GURL("mojo://mojo_png_viewer/"));
+ loader->RegisterContentHandler("text/html", GURL("mojo://mojo_html_viewer/"));
+
+ // Command-line-specified content handlers.
std::string handlers_spec = command_line->GetSwitchValueASCII(
switches::kContentHandlers);
if (handlers_spec.empty())

Powered by Google App Engine
This is Rietveld 408576698