| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). |
| 5 * Copyright (C) 2009 Joseph Pecoraro | 5 * Copyright (C) 2009 Joseph Pecoraro |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * | 10 * |
| (...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2007 */ | 2007 */ |
| 2008 constructor(message, okCallback, cancelCallback) { | 2008 constructor(message, okCallback, cancelCallback) { |
| 2009 super(true); | 2009 super(true); |
| 2010 this.registerRequiredCSS('ui/confirmDialog.css'); | 2010 this.registerRequiredCSS('ui/confirmDialog.css'); |
| 2011 this.contentElement.createChild('div', 'message').createChild('span').textCo
ntent = message; | 2011 this.contentElement.createChild('div', 'message').createChild('span').textCo
ntent = message; |
| 2012 var buttonsBar = this.contentElement.createChild('div', 'button'); | 2012 var buttonsBar = this.contentElement.createChild('div', 'button'); |
| 2013 buttonsBar.appendChild(UI.createTextButton(Common.UIString('Ok'), okCallback
)); | 2013 buttonsBar.appendChild(UI.createTextButton(Common.UIString('Ok'), okCallback
)); |
| 2014 buttonsBar.appendChild(UI.createTextButton(Common.UIString('Cancel'), cancel
Callback)); | 2014 buttonsBar.appendChild(UI.createTextButton(Common.UIString('Cancel'), cancel
Callback)); |
| 2015 } | 2015 } |
| 2016 }; | 2016 }; |
| 2017 |
| 2018 /** |
| 2019 * @param {!UI.ToolbarToggle} toolbarButton |
| 2020 * @return {!Element} |
| 2021 */ |
| 2022 UI.createInlineButton = function(toolbarButton) { |
| 2023 var element = createElement('span'); |
| 2024 var shadowRoot = UI.createShadowRootWithCoreStyles(element, 'ui/inlineButton.c
ss'); |
| 2025 element.classList.add('inline-button'); |
| 2026 var toolbar = new UI.Toolbar(''); |
| 2027 toolbar.appendToolbarItem(toolbarButton); |
| 2028 shadowRoot.appendChild(toolbar.element); |
| 2029 return element; |
| 2030 }; |
| OLD | NEW |