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

Unified Diff: mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc

Issue 311423003: Provide an API to the example window manager app that supports closing a window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 6 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
Index: mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
diff --git a/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc b/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
index 51a65d8c83ecaa4d151974555e5b1a85b5026dbb..4710cf1643af2d1182393730d14d9cb3016e893f 100644
--- a/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
+++ b/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
@@ -52,7 +52,7 @@ void WaitForAllChangesToBeAcked(ViewManager* manager) {
class ConnectServiceLoader : public ServiceLoader {
public:
- explicit ConnectServiceLoader(base::Callback<void(ViewManager*)> callback)
+ explicit ConnectServiceLoader(const ViewManager::RootCallback& callback)
: callback_(callback) {}
virtual ~ConnectServiceLoader() {}
@@ -62,7 +62,8 @@ class ConnectServiceLoader : public ServiceLoader {
const GURL& url,
ScopedMessagePipeHandle shell_handle) OVERRIDE {
scoped_ptr<Application> app(new Application(shell_handle.Pass()));
- ViewManager::Create(app.get(), callback_);
+ // TODO(beng): test removed callback.
+ ViewManager::Create(app.get(), callback_, ViewManager::RootCallback());
apps_.push_back(app.release());
}
virtual void OnServiceError(ServiceManager* manager,
@@ -70,7 +71,7 @@ class ConnectServiceLoader : public ServiceLoader {
}
ScopedVector<Application> apps_;
- base::Callback<void(ViewManager*)> callback_;
+ ViewManager::RootCallback callback_;
DISALLOW_COPY_AND_ASSIGN(ConnectServiceLoader);
};
@@ -327,7 +328,7 @@ class ViewManagerTest : public testing::Test {
private:
// Overridden from testing::Test:
virtual void SetUp() OVERRIDE {
- base::Callback<void(ViewManager*)> ready_callback =
+ ViewManager::RootCallback ready_callback =
base::Bind(&ViewManagerTest::OnViewManagerLoaded,
base::Unretained(this));
test_helper_.Init();
@@ -362,7 +363,7 @@ class ViewManagerTest : public testing::Test {
return result;
}
- void OnViewManagerLoaded(ViewManager* view_manager) {
+ void OnViewManagerLoaded(ViewManager* view_manager, ViewTreeNode* root) {
loaded_view_manager_ = view_manager;
connect_loop_->Quit();
}

Powered by Google App Engine
This is Rietveld 408576698