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

Side by Side Diff: mojo/runner/context.cc

Issue 1342093002: Mandoline: let html_viewer handle more contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « mojo/runner/BUILD.gn ('k') | mojo/shell/fetcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/runner/context.h" 5 #include "mojo/runner/context.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 private: 58 private:
59 DISALLOW_COPY_AND_ASSIGN(Setup); 59 DISALLOW_COPY_AND_ASSIGN(Setup);
60 }; 60 };
61 61
62 void InitContentHandlers(shell::ApplicationManager* manager, 62 void InitContentHandlers(shell::ApplicationManager* manager,
63 const base::CommandLine& command_line) { 63 const base::CommandLine& command_line) {
64 // Default content handlers. 64 // Default content handlers.
65 manager->RegisterContentHandler("application/pdf", GURL("mojo:pdf_viewer")); 65 manager->RegisterContentHandler("application/pdf", GURL("mojo:pdf_viewer"));
66 manager->RegisterContentHandler("image/png", GURL("mojo:png_viewer")); 66 manager->RegisterContentHandler("image/png", GURL("mojo:png_viewer"));
67 manager->RegisterContentHandler("text/html", GURL("mojo:html_viewer")); 67 manager->RegisterContentHandler("text/html", GURL("mojo:html_viewer"));
68 manager->RegisterContentHandler("text/plain", GURL("mojo:html_viewer"));
68 69
69 // Command-line-specified content handlers. 70 // Command-line-specified content handlers.
70 std::string handlers_spec = 71 std::string handlers_spec =
71 command_line.GetSwitchValueASCII(switches::kContentHandlers); 72 command_line.GetSwitchValueASCII(switches::kContentHandlers);
72 if (handlers_spec.empty()) 73 if (handlers_spec.empty())
73 return; 74 return;
74 75
75 #if defined(OS_ANDROID) 76 #if defined(OS_ANDROID)
76 // TODO(eseidel): On Android we pass command line arguments is via the 77 // TODO(eseidel): On Android we pass command line arguments is via the
77 // 'parameters' key on the intent, which we specify during 'am shell start' 78 // 'parameters' key on the intent, which we specify during 'am shell start'
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 base::MessageLoop::current()->Quit(); 311 base::MessageLoop::current()->Quit();
311 } else { 312 } else {
312 app_complete_callback_.Run(); 313 app_complete_callback_.Run();
313 } 314 }
314 } 315 }
315 } 316 }
316 } 317 }
317 318
318 } // namespace runner 319 } // namespace runner
319 } // namespace mojo 320 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/runner/BUILD.gn ('k') | mojo/shell/fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698