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

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

Issue 1811713002: Perform a full GC by default when requesting a heap snapshot. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 LocationManager extends Observable { 7 class LocationManager extends Observable {
8 final _defaultPath = '/vm'; 8 final _defaultPath = '/vm';
9 9
10 final ObservatoryApplication _app; 10 final ObservatoryApplication _app;
(...skipping 16 matching lines...) Expand all
27 // use the default. 27 // use the default.
28 applicationPath = makeLink(_defaultPath); 28 applicationPath = makeLink(_defaultPath);
29 } 29 }
30 // Update current application path. 30 // Update current application path.
31 window.history.replaceState(applicationPath, 31 window.history.replaceState(applicationPath,
32 document.title, 32 document.title,
33 applicationPath); 33 applicationPath);
34 _updateApplicationLocation(applicationPath); 34 _updateApplicationLocation(applicationPath);
35 } 35 }
36 36
37 bool getBoolParameter(String name, bool defaultValue) {
38 var value = uri.queryParameters[name];
39 if ("true" == value) return true;
40 if ("false" == value) return false;
41 return defaultValue;
42 }
43
37 /// Called whenever the browser changes the location bar (e.g. forward or 44 /// Called whenever the browser changes the location bar (e.g. forward or
38 /// back button press). 45 /// back button press).
39 void _onBrowserNavigation(PopStateEvent event) { 46 void _onBrowserNavigation(PopStateEvent event) {
40 _updateApplicationLocation(window.location.hash); 47 _updateApplicationLocation(window.location.hash);
41 _visit(); 48 _visit();
42 } 49 }
43 50
44 /// Given an application url, generate an href link. 51 /// Given an application url, generate an href link.
45 String makeLink(String url) => '#$url'; 52 String makeLink(String url) => '#$url';
46 53
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // let browser handle. 167 // let browser handle.
161 return; 168 return;
162 } 169 }
163 event.preventDefault(); 170 event.preventDefault();
164 // 'currentTarget' is the dom element that would process the event. 171 // 'currentTarget' is the dom element that would process the event.
165 // If we use 'target' we might get an <em> element or somesuch. 172 // If we use 'target' we might get an <em> element or somesuch.
166 var target = event.currentTarget; 173 var target = event.currentTarget;
167 go(target.attributes['href']); 174 go(target.attributes['href']);
168 } 175 }
169 } 176 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/class_view.dart » ('j') | runtime/vm/object_graph.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698