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

Side by Side Diff: mojo/examples/media_viewer/media_viewer.cc

Issue 668483002: Change mojo URLs from mojo://mojo_foo to mojo://foo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 public ViewObserver { 196 public ViewObserver {
197 public: 197 public:
198 MediaViewer() 198 MediaViewer()
199 : shell_(nullptr), 199 : shell_(nullptr),
200 app_(NULL), 200 app_(NULL),
201 view_manager_(NULL), 201 view_manager_(NULL),
202 root_view_(NULL), 202 root_view_(NULL),
203 control_view_(NULL), 203 control_view_(NULL),
204 content_view_(NULL), 204 content_view_(NULL),
205 control_panel_(this) { 205 control_panel_(this) {
206 handler_map_["image/png"] = "mojo:mojo_png_viewer"; 206 handler_map_["image/png"] = "mojo:png_viewer";
207 } 207 }
208 208
209 virtual ~MediaViewer() { 209 virtual ~MediaViewer() {
210 if (root_view_) 210 if (root_view_)
211 root_view_->RemoveObserver(this); 211 root_view_->RemoveObserver(this);
212 } 212 }
213 213
214 private: 214 private:
215 typedef std::map<std::string, std::string> HandlerMap; 215 typedef std::map<std::string, std::string> HandlerMap;
216 216
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 DISALLOW_COPY_AND_ASSIGN(MediaViewer); 319 DISALLOW_COPY_AND_ASSIGN(MediaViewer);
320 }; 320 };
321 321
322 } // namespace examples 322 } // namespace examples
323 } // namespace mojo 323 } // namespace mojo
324 324
325 MojoResult MojoMain(MojoHandle shell_handle) { 325 MojoResult MojoMain(MojoHandle shell_handle) {
326 mojo::ApplicationRunnerChromium runner(new mojo::examples::MediaViewer); 326 mojo::ApplicationRunnerChromium runner(new mojo::examples::MediaViewer);
327 return runner.Run(shell_handle); 327 return runner.Run(shell_handle);
328 } 328 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698