| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 : m_widget(widget) | 85 : m_widget(widget) |
| 86 { | 86 { |
| 87 ASSERT(m_widget->m_widgetClient); | 87 ASSERT(m_widget->m_widgetClient); |
| 88 } | 88 } |
| 89 | 89 |
| 90 private: | 90 private: |
| 91 virtual void closeWindowSoon() OVERRIDE | 91 virtual void closeWindowSoon() OVERRIDE |
| 92 { | 92 { |
| 93 // This should never be called since the only way to close the | 93 // This should never be called since the only way to close the |
| 94 // invisible page is via closeHelperPlugin(). | 94 // invisible page is via closeHelperPlugin(). |
| 95 ASSERT_NOT_REACHED(); | 95 ASSERT_NOT_REACHED(); |
| 96 m_widget->closeHelperPlugin(); | 96 m_widget->closeHelperPlugin(); |
| 97 } | 97 } |
| 98 | 98 |
| 99 virtual void* webView() const OVERRIDE | 99 virtual void* webView() const OVERRIDE |
| 100 { | 100 { |
| 101 return m_widget->m_webView; | 101 return m_widget->m_webView; |
| 102 } | 102 } |
| 103 | 103 |
| 104 WebHelperPluginImpl* m_widget; | 104 WebHelperPluginImpl* m_widget; |
| 105 }; | 105 }; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 // A WebHelperPluginImpl instance usually has two references. | 244 // A WebHelperPluginImpl instance usually has two references. |
| 245 // - One owned by the instance itself. It represents the visible widget. | 245 // - One owned by the instance itself. It represents the visible widget. |
| 246 // - One owned by the hosting element. It's released when the hosting | 246 // - One owned by the hosting element. It's released when the hosting |
| 247 // element asks the WebHelperPluginImpl to close. | 247 // element asks the WebHelperPluginImpl to close. |
| 248 // We need them because the closing operation is asynchronous and the widget | 248 // We need them because the closing operation is asynchronous and the widget |
| 249 // can be closed while the hosting element is unaware of it. | 249 // can be closed while the hosting element is unaware of it. |
| 250 return adoptRef(new WebHelperPluginImpl(client)).leakRef(); | 250 return adoptRef(new WebHelperPluginImpl(client)).leakRef(); |
| 251 } | 251 } |
| 252 | 252 |
| 253 } // namespace WebKit | 253 } // namespace WebKit |
| OLD | NEW |