| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 content_node_->SetBounds(content_bounds); | 290 content_node_->SetBounds(content_bounds); |
| 291 | 291 |
| 292 if (pending_navigate_request_) { | 292 if (pending_navigate_request_) { |
| 293 scoped_ptr<PendingNavigateRequest> request( | 293 scoped_ptr<PendingNavigateRequest> request( |
| 294 pending_navigate_request_.release()); | 294 pending_navigate_request_.release()); |
| 295 | 295 |
| 296 Navigate(request->node_id, request->navigation_details.Pass(), | 296 Navigate(request->node_id, request->navigation_details.Pass(), |
| 297 request->response_details.Pass()); | 297 request->response_details.Pass()); |
| 298 } | 298 } |
| 299 } | 299 } |
| 300 virtual void OnViewManagerDisconnected( |
| 301 view_manager::ViewManager* view_manager) OVERRIDE { |
| 302 DCHECK_EQ(view_manager_, view_manager); |
| 303 view_manager_ = NULL; |
| 304 base::MessageLoop::current()->Quit(); |
| 305 } |
| 300 | 306 |
| 301 // Overridden from ControlPanel::Delegate: | 307 // Overridden from ControlPanel::Delegate: |
| 302 virtual void ButtonPressed(ControlPanel::ControlType type) OVERRIDE { | 308 virtual void ButtonPressed(ControlPanel::ControlType type) OVERRIDE { |
| 303 switch (type) { | 309 switch (type) { |
| 304 case ControlPanel::CONTROL_ZOOM_IN: | 310 case ControlPanel::CONTROL_ZOOM_IN: |
| 305 zoomable_media_->ZoomIn(); | 311 zoomable_media_->ZoomIn(); |
| 306 break; | 312 break; |
| 307 case ControlPanel::CONTROL_ACTUAL_SIZE: | 313 case ControlPanel::CONTROL_ACTUAL_SIZE: |
| 308 zoomable_media_->ZoomToActualSize(); | 314 zoomable_media_->ZoomToActualSize(); |
| 309 break; | 315 break; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 } | 348 } |
| 343 | 349 |
| 344 } // namespace examples | 350 } // namespace examples |
| 345 | 351 |
| 346 // static | 352 // static |
| 347 ApplicationDelegate* ApplicationDelegate::Create() { | 353 ApplicationDelegate* ApplicationDelegate::Create() { |
| 348 return new examples::MediaViewer; | 354 return new examples::MediaViewer; |
| 349 } | 355 } |
| 350 | 356 |
| 351 } // namespace mojo | 357 } // namespace mojo |
| OLD | NEW |