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

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: rebase 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/shell/context.cc
diff --git a/mojo/shell/context.cc b/mojo/shell/context.cc
index 6ab04b328f7ef8527434d9bccba9a8d170b1f785..203dec89aba13ba9782874ba4faaa495f1769441 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