OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 struct WebDateTimeChooserParams; | 62 struct WebDateTimeChooserParams; |
63 struct WebPoint; | 63 struct WebPoint; |
64 struct WebPopupMenuInfo; | 64 struct WebPopupMenuInfo; |
65 struct WebRect; | 65 struct WebRect; |
66 struct WebSize; | 66 struct WebSize; |
67 struct WebWindowFeatures; | 67 struct WebWindowFeatures; |
68 | 68 |
69 // Since a WebView is a WebWidget, a WebViewClient is a WebWidgetClient. | 69 // Since a WebView is a WebWidget, a WebViewClient is a WebWidgetClient. |
70 // Virtual inheritance allows an implementation of WebWidgetClient to be | 70 // Virtual inheritance allows an implementation of WebWidgetClient to be |
71 // easily reused as part of an implementation of WebViewClient. | 71 // easily reused as part of an implementation of WebViewClient. |
72 class WebViewClient : virtual public WebWidgetClient { | 72 class WebViewClient : protected WebWidgetClient { |
73 public: | 73 public: |
74 // Factory methods ----------------------------------------------------- | 74 // Factory methods ----------------------------------------------------- |
75 | 75 |
76 // Create a new related WebView. This method must clone its session storage | 76 // Create a new related WebView. This method must clone its session storage |
77 // so any subsequent calls to createSessionStorageNamespace conform to the | 77 // so any subsequent calls to createSessionStorageNamespace conform to the |
78 // WebStorage specification. | 78 // WebStorage specification. |
79 // The request parameter is only for the client to check if the request | 79 // The request parameter is only for the client to check if the request |
80 // could be fulfilled. The client should not load the request. | 80 // could be fulfilled. The client should not load the request. |
81 // The policy parameter indicates how the new view will be displayed in | 81 // The policy parameter indicates how the new view will be displayed in |
82 // WebWidgetClient::show. | 82 // WebWidgetClient::show. |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 | 263 |
264 // Cancels any previously scheduled content intents that have not yet launch
ed. | 264 // Cancels any previously scheduled content intents that have not yet launch
ed. |
265 virtual void cancelScheduledContentIntents() { } | 265 virtual void cancelScheduledContentIntents() { } |
266 | 266 |
267 | 267 |
268 // Draggable regions ---------------------------------------------------- | 268 // Draggable regions ---------------------------------------------------- |
269 | 269 |
270 // Informs the browser that the draggable regions have been updated. | 270 // Informs the browser that the draggable regions have been updated. |
271 virtual void draggableRegionsChanged() { } | 271 virtual void draggableRegionsChanged() { } |
272 | 272 |
| 273 // TODO(lfg): These methods are only exposed through WebViewClient while we |
| 274 // refactor WebView to not inherit from WebWidget. |
| 275 // WebWidgetClient overrides. |
| 276 bool allowsBrokenNullLayerTreeView() const override { return false; } |
| 277 void closeWidgetSoon() override {} |
| 278 void convertViewportToWindow(WebRect* rect) override {} |
| 279 void convertWindowToViewport(WebFloatRect* rect) override {} |
| 280 void didAutoResize(const WebSize& newSize) override {} |
| 281 void didChangeCursor(const WebCursorInfo&) override {} |
| 282 void didFocus() override {} |
| 283 void didHandleGestureEvent(const WebGestureEvent& event, bool eventCancelled
) override {} |
| 284 void didInvalidateRect(const WebRect&) override {} |
| 285 void didMeaningfulLayout(WebMeaningfulLayout) override {} |
| 286 void didOverscroll(const WebFloatSize& overscrollDelta, const WebFloatSize&
accumulatedOverscroll, const WebFloatPoint& positionInViewport, const WebFloatSi
ze& velocityInViewport) override {} |
| 287 void didUpdateTextOfFocusedElementByNonUserInput() override {} |
| 288 void hasTouchEventHandlers(bool) override {} |
| 289 void initializeLayerTreeView() override {} |
| 290 bool isPointerLocked() override { return false; } |
| 291 WebLayerTreeView* layerTreeView() override { return 0; } |
| 292 void onMouseDown(const WebNode& mouseDownNode) override {} |
| 293 bool requestPointerLock() override { return false; } |
| 294 void requestPointerUnlock() override {} |
| 295 void resetInputMethod() override {} |
| 296 WebRect rootWindowRect() override { return WebRect(); } |
| 297 void scheduleAnimation() override {} |
| 298 WebScreenInfo screenInfo() override { return WebScreenInfo(); } |
| 299 void setToolTipText(const WebString&, WebTextDirection hint) override {} |
| 300 void setTouchAction(WebTouchAction touchAction) override {} |
| 301 void setWindowRect(const WebRect&) override {} |
| 302 void showImeIfNeeded() override {} |
| 303 void showUnhandledTapUIIfNeeded(const WebPoint& tappedPosition, const WebNod
e& tappedNode, bool pageChanged) override {} |
| 304 void show(WebNavigationPolicy) override {} |
| 305 WebRect windowRect() override { return WebRect(); } |
| 306 WebRect windowResizerRect() override { return WebRect(); } |
| 307 |
273 protected: | 308 protected: |
274 ~WebViewClient() { } | 309 ~WebViewClient() { } |
275 }; | 310 }; |
276 | 311 |
277 } // namespace blink | 312 } // namespace blink |
278 | 313 |
279 #endif | 314 #endif |
OLD | NEW |