| 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 "mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h" | 5 #include "mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "mojo/public/cpp/application/application_connection.h" | 9 #include "mojo/public/cpp/application/application_connection.h" |
| 10 #include "mojo/public/cpp/application/connect.h" | 10 #include "mojo/public/cpp/application/connect.h" |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 Id node_id, | 471 Id node_id, |
| 472 ViewManagerClientImpl* client) | 472 ViewManagerClientImpl* client) |
| 473 : ViewManagerTransaction(client), | 473 : ViewManagerTransaction(client), |
| 474 url_(url), | 474 url_(url), |
| 475 node_id_(node_id) {} | 475 node_id_(node_id) {} |
| 476 virtual ~EmbedTransaction() {} | 476 virtual ~EmbedTransaction() {} |
| 477 | 477 |
| 478 private: | 478 private: |
| 479 // Overridden from ViewManagerTransaction: | 479 // Overridden from ViewManagerTransaction: |
| 480 virtual void DoCommit() OVERRIDE { | 480 virtual void DoCommit() OVERRIDE { |
| 481 GetAndAdvanceNextServerChangeId(); |
| 481 service()->Embed(url_, node_id_, ActionCompletedCallback()); | 482 service()->Embed(url_, node_id_, ActionCompletedCallback()); |
| 482 } | 483 } |
| 483 virtual void DoActionCompleted(bool success) OVERRIDE { | 484 virtual void DoActionCompleted(bool success) OVERRIDE { |
| 484 // TODO(beng): recovery? | 485 // TODO(beng): recovery? |
| 485 } | 486 } |
| 486 | 487 |
| 487 const String url_; | 488 const String url_; |
| 488 const Id node_id_; | 489 const Id node_id_; |
| 489 | 490 |
| 490 DISALLOW_COPY_AND_ASSIGN(EmbedTransaction); | 491 DISALLOW_COPY_AND_ASSIGN(EmbedTransaction); |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 | 909 |
| 909 // static | 910 // static |
| 910 void ViewManager::ConfigureIncomingConnection( | 911 void ViewManager::ConfigureIncomingConnection( |
| 911 ApplicationConnection* connection, | 912 ApplicationConnection* connection, |
| 912 ViewManagerDelegate* delegate) { | 913 ViewManagerDelegate* delegate) { |
| 913 connection->AddService<ViewManagerClientImpl>(delegate); | 914 connection->AddService<ViewManagerClientImpl>(delegate); |
| 914 } | 915 } |
| 915 | 916 |
| 916 } // namespace view_manager | 917 } // namespace view_manager |
| 917 } // namespace mojo | 918 } // namespace mojo |
| OLD | NEW |