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

Side by Side Diff: mojo/services/view_manager/view_manager_unittest.cc

Issue 383763003: Trigger Node destruction notifications from Node's dtor (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/services/view_manager/view_manager_service_impl.cc ('k') | no next file » | 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 408
409 // Callback from EmbedRoot(). |result| is the result of the 409 // Callback from EmbedRoot(). |result| is the result of the
410 // Embed() call and |run_loop| the nested RunLoop. 410 // Embed() call and |run_loop| the nested RunLoop.
411 void EmbedRootCallback(bool* result_cache, 411 void EmbedRootCallback(bool* result_cache,
412 base::RunLoop* run_loop, 412 base::RunLoop* run_loop,
413 bool result) { 413 bool result) {
414 *result_cache = result; 414 *result_cache = result;
415 run_loop->Quit(); 415 run_loop->Quit();
416 } 416 }
417 417
418 // Resposible for establishing the initial ViewManagerService connection. Blocks 418 // Responsible for establishing the initial ViewManagerService connection.
419 // until result is determined. 419 // Blocks until result is determined.
420 bool EmbedRoot(ViewManagerInitService* view_manager_init, 420 bool EmbedRoot(ViewManagerInitService* view_manager_init,
421 const std::string& url) { 421 const std::string& url) {
422 bool result = false; 422 bool result = false;
423 base::RunLoop run_loop; 423 base::RunLoop run_loop;
424 view_manager_init->EmbedRoot(url, base::Bind(&EmbedRootCallback, 424 view_manager_init->EmbedRoot(url, base::Bind(&EmbedRootCallback,
425 &result, &run_loop)); 425 &result, &run_loop));
426 run_loop.Run(); 426 run_loop.Run();
427 return result; 427 return result;
428 } 428 }
429 429
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 // originating connection. 1376 // originating connection.
1377 1377
1378 // TODO(beng): Add tests for focus: 1378 // TODO(beng): Add tests for focus:
1379 // - focus between two nodes known to a connection 1379 // - focus between two nodes known to a connection
1380 // - focus between nodes unknown to one of the connections. 1380 // - focus between nodes unknown to one of the connections.
1381 // - focus between nodes unknown to either connection. 1381 // - focus between nodes unknown to either connection.
1382 1382
1383 } // namespace service 1383 } // namespace service
1384 } // namespace view_manager 1384 } // namespace view_manager
1385 } // namespace mojo 1385 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/view_manager/view_manager_service_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698