| OLD | NEW |
| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 } | 203 } |
| 204 | 204 |
| 205 virtual ~MediaViewer() { | 205 virtual ~MediaViewer() { |
| 206 if (root_view_) | 206 if (root_view_) |
| 207 root_view_->RemoveObserver(this); | 207 root_view_->RemoveObserver(this); |
| 208 } | 208 } |
| 209 | 209 |
| 210 private: | 210 private: |
| 211 typedef std::map<std::string, std::string> HandlerMap; | 211 typedef std::map<std::string, std::string> HandlerMap; |
| 212 | 212 |
| 213 struct PendingNavigateRequest { | |
| 214 uint32_t view_id; | |
| 215 NavigationDetailsPtr navigation_details; | |
| 216 ResponseDetailsPtr response_details; | |
| 217 }; | |
| 218 | |
| 219 | 213 |
| 220 // Overridden from ApplicationDelegate: | 214 // Overridden from ApplicationDelegate: |
| 221 virtual void Initialize(ApplicationImpl* app) OVERRIDE { | 215 virtual void Initialize(ApplicationImpl* app) OVERRIDE { |
| 222 view_manager_client_factory_.reset( | 216 view_manager_client_factory_.reset( |
| 223 new ViewManagerClientFactory(app->shell(), this)); | 217 new ViewManagerClientFactory(app->shell(), this)); |
| 224 app_ = app; | 218 app_ = app; |
| 225 views_init_.reset(new ViewsInit); | 219 views_init_.reset(new ViewsInit); |
| 226 } | 220 } |
| 227 | 221 |
| 228 virtual bool ConfigureIncomingConnection(ApplicationConnection* connection) | 222 virtual bool ConfigureIncomingConnection(ApplicationConnection* connection) |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 DISALLOW_COPY_AND_ASSIGN(MediaViewer); | 312 DISALLOW_COPY_AND_ASSIGN(MediaViewer); |
| 319 }; | 313 }; |
| 320 | 314 |
| 321 } // namespace examples | 315 } // namespace examples |
| 322 } // namespace mojo | 316 } // namespace mojo |
| 323 | 317 |
| 324 MojoResult MojoMain(MojoHandle shell_handle) { | 318 MojoResult MojoMain(MojoHandle shell_handle) { |
| 325 mojo::ApplicationRunnerChromium runner(new mojo::examples::MediaViewer); | 319 mojo::ApplicationRunnerChromium runner(new mojo::examples::MediaViewer); |
| 326 return runner.Run(shell_handle); | 320 return runner.Run(shell_handle); |
| 327 } | 321 } |
| OLD | NEW |