Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * | 10 * |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 112 /** | 112 /** |
| 113 * @override | 113 * @override |
| 114 * @param {!UI.Context} context | 114 * @param {!UI.Context} context |
| 115 * @param {string} actionId | 115 * @param {string} actionId |
| 116 * @return {boolean} | 116 * @return {boolean} |
| 117 */ | 117 */ |
| 118 handleAction(context, actionId) { | 118 handleAction(context, actionId) { |
| 119 if (!Elements.inspectElementModeController) | 119 if (!Elements.inspectElementModeController) |
| 120 return false; | 120 return false; |
| 121 Elements.inspectElementModeController._toggleInspectMode(); | 121 Elements.inspectElementModeController._toggleInspectMode(); |
| 122 if (Elements.inspectElementModeController.isInInspectElementMode()) | |
| 123 Host.userMetrics.actionTaken(Host.UserMetrics.Action.InspectElementModeTog gleOn); | |
|
pfeldman
2017/02/07 19:15:27
Are we after certain actionability here?
| |
| 124 else | |
| 125 Host.userMetrics.actionTaken(Host.UserMetrics.Action.InspectElementModeTog gleOff); | |
| 122 return true; | 126 return true; |
| 123 } | 127 } |
| 124 }; | 128 }; |
| 125 | 129 |
| 126 /** @type {?Elements.InspectElementModeController} */ | 130 /** @type {?Elements.InspectElementModeController} */ |
| 127 Elements.inspectElementModeController = | 131 Elements.inspectElementModeController = |
| 128 Runtime.queryParam('isSharedWorker') ? null : new Elements.InspectElementMod eController(); | 132 Runtime.queryParam('isSharedWorker') ? null : new Elements.InspectElementMod eController(); |
| OLD | NEW |