Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 181 virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const; | 181 virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const; |
| 182 virtual void numWheelEventHandlersChanged(unsigned); | 182 virtual void numWheelEventHandlersChanged(unsigned); |
| 183 | 183 |
| 184 virtual bool requestPointerLock(); | 184 virtual bool requestPointerLock(); |
| 185 virtual void requestPointerUnlock(); | 185 virtual void requestPointerUnlock(); |
| 186 virtual bool isPointerLocked(); | 186 virtual bool isPointerLocked(); |
| 187 | 187 |
| 188 virtual void didAssociateFormControls(const Vector<RefPtr<WebCore::Element> >&) OVERRIDE; | 188 virtual void didAssociateFormControls(const Vector<RefPtr<WebCore::Element> >&) OVERRIDE; |
| 189 | 189 |
| 190 private: | 190 private: |
| 191 virtual bool isChromeClient() const OVERRIDE { return true; } | |
| 192 | |
| 191 WebNavigationPolicy getNavigationPolicy(); | 193 WebNavigationPolicy getNavigationPolicy(); |
| 192 void getPopupMenuInfo(WebCore::PopupContainer*, WebPopupMenuInfo*); | 194 void getPopupMenuInfo(WebCore::PopupContainer*, WebPopupMenuInfo*); |
| 193 void setCursor(const WebCursorInfo&); | 195 void setCursor(const WebCursorInfo&); |
| 194 | 196 |
| 195 WebViewImpl* m_webView; // weak pointer | 197 WebViewImpl* m_webView; // weak pointer |
| 196 bool m_toolbarsVisible; | 198 bool m_toolbarsVisible; |
| 197 bool m_statusbarVisible; | 199 bool m_statusbarVisible; |
| 198 bool m_scrollbarsVisible; | 200 bool m_scrollbarsVisible; |
| 199 bool m_menubarVisible; | 201 bool m_menubarVisible; |
| 200 bool m_resizable; | 202 bool m_resizable; |
| 201 | 203 |
| 202 WebCore::PagePopupDriver* m_pagePopupDriver; | 204 WebCore::PagePopupDriver* m_pagePopupDriver; |
| 203 }; | 205 }; |
| 204 | 206 |
| 205 #if ENABLE(NAVIGATOR_CONTENT_UTILS) | 207 #if ENABLE(NAVIGATOR_CONTENT_UTILS) |
| 206 class NavigatorContentUtilsClientImpl : public WebCore::NavigatorContentUtilsCli ent { | 208 class NavigatorContentUtilsClientImpl : public WebCore::NavigatorContentUtilsCli ent { |
| 207 public: | 209 public: |
| 208 static PassOwnPtr<NavigatorContentUtilsClientImpl> create(WebViewImpl*); | 210 static PassOwnPtr<NavigatorContentUtilsClientImpl> create(WebViewImpl*); |
| 209 ~NavigatorContentUtilsClientImpl() { } | 211 ~NavigatorContentUtilsClientImpl() { } |
| 210 | 212 |
| 211 virtual void registerProtocolHandler(const String& scheme, const String& bas eURL, const String& url, const String& title) OVERRIDE; | 213 virtual void registerProtocolHandler(const String& scheme, const String& bas eURL, const String& url, const String& title) OVERRIDE; |
| 212 | 214 |
| 213 private: | 215 private: |
| 214 explicit NavigatorContentUtilsClientImpl(WebViewImpl*); | 216 explicit NavigatorContentUtilsClientImpl(WebViewImpl*); |
| 215 | 217 |
| 216 WebViewImpl* m_webView; | 218 WebViewImpl* m_webView; |
| 217 }; | 219 }; |
| 218 #endif | 220 #endif |
| 219 | 221 |
| 222 inline ChromeClientImpl* toChromeClientImpl(WebCore::ChromeClient* client) | |
| 223 { | |
| 224 // No need for null check, as the client returned by Page::client() is actua lly a reference. | |
|
tkent
2013/10/08 22:22:39
So, we should have
inline ChromeClientImpl* toCh
| |
| 225 ASSERT_WITH_SECURITY_IMPLICATION(client->isChromeClient()); | |
| 226 return static_cast<ChromeClientImpl*>(client); | |
| 227 } | |
| 228 | |
| 220 } // namespace WebKit | 229 } // namespace WebKit |
| 221 | 230 |
| 222 #endif | 231 #endif |
| OLD | NEW |