summaryrefslogtreecommitdiffstats
path: root/mandoline
diff options
context:
space:
mode:
authorsky <sky@chromium.org>2015-11-09 15:09:28 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-09 23:10:28 +0000
commitdc64ac503d3a0b8b2cf38bd0a815a8434940a749 (patch)
tree7460cca4e427b4129203e89bb96be7454a9b1470 /mandoline
parent6dd0789c30b90b711359c7b21d699e9a2fc9ff0c (diff)
downloadchromium_src-dc64ac503d3a0b8b2cf38bd0a815a8434940a749.zip
chromium_src-dc64ac503d3a0b8b2cf38bd0a815a8434940a749.tar.gz
chromium_src-dc64ac503d3a0b8b2cf38bd0a815a8434940a749.tar.bz2
Adds logic to deal with properties that are set by both wm and client
This addresses these problems. 1. current responses are callbacks, which are on a different pipe than client pipe. 2. a request being canceled. 3. a change being iniated by the wm while the client is making a change. Solution for 1 is to get rid of callback and have a dedicated function on WindowTreeClient (OnChangeCompleted). In addition to the callback function every client function takes an id (supplied by the client) that is then echoed back to OnChangeCompleted() when done. Solution for 2 and 3 involves tracking requests to server and dealing with both incoming and outgoing changes while waiting on a response. If an incoming change occurs while waiting on the response the value supplied from the server is recordered. If the server returns that the initiated command failed, then we revert to the updated value. If the server returns failure, and we have made another reuqest outstanding we continue waiting (and don't change anything locally). See description of InFlightChange for complete details. I need to do some refactoring to test this, will do that next. BUG=none TEST=none R=ben@chromium.org Review URL: https://codereview.chromium.org/1423803006 Cr-Commit-Position: refs/heads/master@{#358698}
Diffstat (limited to 'mandoline')
-rw-r--r--mandoline/ui/desktop_ui/browser_window.cc2
-rw-r--r--mandoline/ui/phone_ui/phone_browser_application_delegate.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/mandoline/ui/desktop_ui/browser_window.cc b/mandoline/ui/desktop_ui/browser_window.cc
index 4b4e698..5a9dcaf 100644
--- a/mandoline/ui/desktop_ui/browser_window.cc
+++ b/mandoline/ui/desktop_ui/browser_window.cc
@@ -90,7 +90,7 @@ BrowserWindow::BrowserWindow(mojo::ApplicationImpl* app,
mus::mojom::WindowTreeHostClientPtr host_client;
host_client_binding_.Bind(GetProxy(&host_client));
mus::CreateWindowTreeHost(host_factory, host_client.Pass(), this, &host_,
- nullptr);
+ nullptr, nullptr);
}
void BrowserWindow::LoadURL(const GURL& url) {
diff --git a/mandoline/ui/phone_ui/phone_browser_application_delegate.cc b/mandoline/ui/phone_ui/phone_browser_application_delegate.cc
index d6f40fb..b9fa5e9 100644
--- a/mandoline/ui/phone_ui/phone_browser_application_delegate.cc
+++ b/mandoline/ui/phone_ui/phone_browser_application_delegate.cc
@@ -47,7 +47,7 @@ void PhoneBrowserApplicationDelegate::Initialize(mojo::ApplicationImpl* app) {
break;
}
}
- mus::CreateSingleWindowTreeHost(app_, this, &host_, nullptr);
+ mus::CreateSingleWindowTreeHost(app_, this, &host_, nullptr, nullptr);
}
bool PhoneBrowserApplicationDelegate::ConfigureIncomingConnection(