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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 | 65 |
66 private: | 66 private: |
67 explicit WebHelperPluginImpl(WebWidgetClient*); | 67 explicit WebHelperPluginImpl(WebWidgetClient*); |
68 bool initializePage(const String& pluginType, const WebDocument& hostDocumen t); | 68 bool initializePage(const String& pluginType, const WebDocument& hostDocumen t); |
69 void destroyPage(); | 69 void destroyPage(); |
70 | 70 |
71 // WebWidget methods: | 71 // WebWidget methods: |
72 virtual void layout() OVERRIDE; | 72 virtual void layout() OVERRIDE; |
73 virtual void setFocus(bool) OVERRIDE; | 73 virtual void setFocus(bool) OVERRIDE; |
74 virtual void close() OVERRIDE; | 74 virtual void close() OVERRIDE; |
75 virtual bool isHelperPlugin() const OVERRIDE { return true; } | |
75 | 76 |
76 WebWidgetClient* m_widgetClient; | 77 WebWidgetClient* m_widgetClient; |
77 WebViewImpl* m_webView; | 78 WebViewImpl* m_webView; |
78 WebFrameImpl* m_mainFrame; | 79 WebFrameImpl* m_mainFrame; |
79 OwnPtr<WebCore::Page> m_page; | 80 OwnPtr<WebCore::Page> m_page; |
80 OwnPtr<HelperPluginChromeClient> m_chromeClient; | 81 OwnPtr<HelperPluginChromeClient> m_chromeClient; |
81 | 82 |
82 friend class WebHelperPlugin; | 83 friend class WebHelperPlugin; |
83 friend class HelperPluginChromeClient; | 84 friend class HelperPluginChromeClient; |
84 }; | 85 }; |
85 | 86 |
87 inline WebHelperPluginImpl* toWebHelperPluginImpl(WebWidget* widget) | |
88 { | |
89 ASSERT_WITH_SECURITY_IMPLICATION(widget && widget->isHelperPlugin()); | |
tkent
2013/10/08 05:24:04
should accept null widget for consistency.
| |
90 return static_cast<WebHelperPluginImpl*>(widget); | |
91 } | |
92 | |
86 } // namespace WebKit | 93 } // namespace WebKit |
87 | 94 |
88 #endif // WebHelperPluginImpl_h | 95 #endif // WebHelperPluginImpl_h |
OLD | NEW |