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

Side by Side Diff: Source/web/WebHelperPluginImpl.h

Issue 26564006: Cleanup: Add conversion interface for WebWidget derived classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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
« no previous file with comments | « Source/web/ChromeClientImpl.cpp ('k') | Source/web/WebPagePopupImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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());
90 return static_cast<WebHelperPluginImpl*>(widget);
91 }
92
86 } // namespace WebKit 93 } // namespace WebKit
87 94
88 #endif // WebHelperPluginImpl_h 95 #endif // WebHelperPluginImpl_h
OLDNEW
« no previous file with comments | « Source/web/ChromeClientImpl.cpp ('k') | Source/web/WebPagePopupImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698