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

Side by Side Diff: mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc

Issue 397803003: Makes it so a node can only the root of one connection at a time (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge again Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | mojo/services/public/interfaces/view_manager/view_manager.mojom » ('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 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
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
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
OLDNEW
« no previous file with comments | « no previous file | mojo/services/public/interfaces/view_manager/view_manager.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698