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

Unified Diff: mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h

Issue 415143004: Get rid of ViewManagerTransactions & pending queue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h b/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h
index 39f7ecf496142b01bff4a7fb5d228040c9bee86b..7f48e98be35e0f1aa6f739cf91f8853b576502ba 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h
@@ -63,11 +63,11 @@ class ViewManagerClientImpl : public ViewManager,
void Embed(const String& url, Id node_id);
- void set_changes_acked_callback(const base::Callback<void(void)>& callback) {
- changes_acked_callback_ = callback;
+ void set_change_acked_callback(const base::Callback<void(void)>& callback) {
+ change_acked_callback_ = callback;
}
- void ClearChangesAckedCallback() {
- changes_acked_callback_ = base::Callback<void(void)>();
+ void ClearChangeAckedCallback() {
+ change_acked_callback_ = base::Callback<void(void)>();
}
// Start/stop tracking nodes & views. While tracked, they can be retrieved via
@@ -80,9 +80,7 @@ class ViewManagerClientImpl : public ViewManager,
private:
friend class RootObserver;
- friend class ViewManagerTransaction;
- typedef ScopedVector<ViewManagerTransaction> Transactions;
typedef std::map<Id, Node*> IdToNodeMap;
typedef std::map<Id, View*> IdToViewMap;
@@ -126,26 +124,22 @@ class ViewManagerClientImpl : public ViewManager,
virtual void Embed(const String& url) OVERRIDE;
virtual void DispatchOnViewInputEvent(Id view_id, EventPtr event) OVERRIDE;
- // Sync the client model with the service by enumerating the pending
- // transaction queue and applying them in order.
- void Sync();
-
- // Removes |transaction| from the pending queue. |transaction| must be at the
- // front of the queue.
- void RemoveFromPendingQueue(ViewManagerTransaction* transaction);
-
void AddRoot(Node* root);
void RemoveRoot(Node* root);
+ void OnActionCompleted(bool success);
+ void OnActionCompletedWithErrorCode(ErrorCode code);
+
+ base::Callback<void(bool)> ActionCompletedCallback();
+ base::Callback<void(ErrorCode)> ActionCompletedCallbackWithErrorCode();
+
bool connected_;
ConnectionSpecificId connection_id_;
ConnectionSpecificId next_id_;
std::string creator_url_;
- Transactions pending_transactions_;
-
- base::Callback<void(void)> changes_acked_callback_;
+ base::Callback<void(void)> change_acked_callback_;
ViewManagerDelegate* delegate_;
WindowManagerDelegate* window_manager_delegate_;
« no previous file with comments | « no previous file | mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698