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

Side by Side Diff: runtime/observatory/lib/src/app/page.dart

Issue 2202973002: Converted Observatory isolate-reconnect element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fixed typo Created 4 years, 4 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of app; 5 part of app;
6 6
7 class IsolateNotFound implements Exception { 7 class IsolateNotFound implements Exception {
8 String isolateId; 8 String isolateId;
9 IsolateNotFound(this.isolateId); 9 IsolateNotFound(this.isolateId);
10 String toString() => "IsolateNotFound: $isolateId"; 10 String toString() => "IsolateNotFound: $isolateId";
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 assert(element != null); 382 assert(element != null);
383 assert(canVisit(uri)); 383 assert(canVisit(uri));
384 } 384 }
385 385
386 bool canVisit(Uri uri) => uri.path == 'vm-connect'; 386 bool canVisit(Uri uri) => uri.path == 'vm-connect';
387 } 387 }
388 388
389 class IsolateReconnectPage extends Page { 389 class IsolateReconnectPage extends Page {
390 IsolateReconnectPage(app) : super(app); 390 IsolateReconnectPage(app) : super(app);
391 391
392 DivElement container = new DivElement();
393
392 void onInstall() { 394 void onInstall() {
393 if (element == null) { 395 element = container;
394 element = new Element.tag('isolate-reconnect');
395 }
396 assert(element != null);
397 } 396 }
398 397
399 void _visit(Uri uri) { 398 void _visit(Uri uri) {
400 app.vm.reload(); 399 app.vm.reload();
400 container.children = [
401 new IsolateReconnectElement(app.vm, app.events, app.notifications,
402 uri.queryParameters['isolateId'],
403 Uri.parse(uri.queryParameters['originalUri']))
404 ];
401 assert(element != null); 405 assert(element != null);
402 assert(canVisit(uri)); 406 assert(canVisit(uri));
403 } 407 }
404 408
405 bool canVisit(Uri uri) => uri.path == 'isolate-reconnect'; 409 bool canVisit(Uri uri) => uri.path == 'isolate-reconnect';
406 } 410 }
407 411
408 class MetricsPage extends Page { 412 class MetricsPage extends Page {
409 // Page state, retained as long as ObservatoryApplication. 413 // Page state, retained as long as ObservatoryApplication.
410 String selectedMetricId; 414 String selectedMetricId;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 assert(element != null); 478 assert(element != null);
475 } 479 }
476 480
477 void _visit(Uri uri) { 481 void _visit(Uri uri) {
478 assert(element != null); 482 assert(element != null);
479 assert(canVisit(uri)); 483 assert(canVisit(uri));
480 } 484 }
481 485
482 bool canVisit(Uri uri) => uri.path == 'timeline'; 486 bool canVisit(Uri uri) => uri.path == 'timeline';
483 } 487 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/app/location_manager.dart ('k') | runtime/observatory/lib/src/elements/css/shared.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698