| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #include "content/public/common/renderer_preferences.h" | 38 #include "content/public/common/renderer_preferences.h" |
| 39 #include "content/public/common/top_controls_state.h" | 39 #include "content/public/common/top_controls_state.h" |
| 40 #include "content/public/common/web_preferences.h" | 40 #include "content/public/common/web_preferences.h" |
| 41 #include "content/public/renderer/render_view.h" | 41 #include "content/public/renderer/render_view.h" |
| 42 #include "content/renderer/mouse_lock_dispatcher.h" | 42 #include "content/renderer/mouse_lock_dispatcher.h" |
| 43 #include "content/renderer/render_frame_impl.h" | 43 #include "content/renderer/render_frame_impl.h" |
| 44 #include "content/renderer/render_widget.h" | 44 #include "content/renderer/render_widget.h" |
| 45 #include "content/renderer/render_widget_owner_delegate.h" | 45 #include "content/renderer/render_widget_owner_delegate.h" |
| 46 #include "content/renderer/stats_collection_observer.h" | 46 #include "content/renderer/stats_collection_observer.h" |
| 47 #include "ipc/ipc_platform_file.h" | 47 #include "ipc/ipc_platform_file.h" |
| 48 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | |
| 49 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" | 48 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" |
| 50 #include "third_party/WebKit/public/web/WebAXObject.h" | 49 #include "third_party/WebKit/public/web/WebAXObject.h" |
| 51 #include "third_party/WebKit/public/web/WebConsoleMessage.h" | 50 #include "third_party/WebKit/public/web/WebConsoleMessage.h" |
| 52 #include "third_party/WebKit/public/web/WebDataSource.h" | 51 #include "third_party/WebKit/public/web/WebDataSource.h" |
| 53 #include "third_party/WebKit/public/web/WebElement.h" | 52 #include "third_party/WebKit/public/web/WebElement.h" |
| 54 #include "third_party/WebKit/public/web/WebFrameWidget.h" | 53 #include "third_party/WebKit/public/web/WebFrameWidget.h" |
| 55 #include "third_party/WebKit/public/web/WebHistoryItem.h" | 54 #include "third_party/WebKit/public/web/WebHistoryItem.h" |
| 56 #include "third_party/WebKit/public/web/WebIconURL.h" | 55 #include "third_party/WebKit/public/web/WebIconURL.h" |
| 57 #include "third_party/WebKit/public/web/WebInputEvent.h" | 56 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 58 #include "third_party/WebKit/public/web/WebNavigationType.h" | 57 #include "third_party/WebKit/public/web/WebNavigationType.h" |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 blink::WebString acceptLanguages() override; | 387 blink::WebString acceptLanguages() override; |
| 389 void navigateBackForwardSoon(int offset) override; | 388 void navigateBackForwardSoon(int offset) override; |
| 390 int historyBackListCount() override; | 389 int historyBackListCount() override; |
| 391 int historyForwardListCount() override; | 390 int historyForwardListCount() override; |
| 392 blink::WebSpeechRecognizer* speechRecognizer() override; | 391 blink::WebSpeechRecognizer* speechRecognizer() override; |
| 393 void zoomLimitsChanged(double minimum_level, double maximum_level) override; | 392 void zoomLimitsChanged(double minimum_level, double maximum_level) override; |
| 394 virtual void zoomLevelChanged(); | 393 virtual void zoomLevelChanged(); |
| 395 void pageScaleFactorChanged() override; | 394 void pageScaleFactorChanged() override; |
| 396 virtual double zoomLevelToZoomFactor(double zoom_level) const; | 395 virtual double zoomLevelToZoomFactor(double zoom_level) const; |
| 397 virtual double zoomFactorToZoomLevel(double factor) const; | 396 virtual double zoomFactorToZoomLevel(double factor) const; |
| 398 blink::WebPageVisibilityState visibilityState() const override; | |
| 399 void draggableRegionsChanged() override; | 397 void draggableRegionsChanged() override; |
| 400 void pageImportanceSignalsChanged() override; | 398 void pageImportanceSignalsChanged() override; |
| 401 | 399 |
| 402 #if defined(OS_ANDROID) | 400 #if defined(OS_ANDROID) |
| 403 void scheduleContentIntent(const blink::WebURL& intent, | 401 void scheduleContentIntent(const blink::WebURL& intent, |
| 404 bool is_main_frame) override; | 402 bool is_main_frame) override; |
| 405 void cancelScheduledContentIntents() override; | 403 void cancelScheduledContentIntents() override; |
| 406 blink::WebContentDetectionResult detectContentAround( | 404 blink::WebContentDetectionResult detectContentAround( |
| 407 const blink::WebHitTestResult& touch_hit) override; | 405 const blink::WebHitTestResult& touch_hit) override; |
| 408 | 406 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 421 int GetRoutingID() const override; | 419 int GetRoutingID() const override; |
| 422 gfx::Size GetSize() const override; | 420 gfx::Size GetSize() const override; |
| 423 float GetDeviceScaleFactor() const override; | 421 float GetDeviceScaleFactor() const override; |
| 424 WebPreferences& GetWebkitPreferences() override; | 422 WebPreferences& GetWebkitPreferences() override; |
| 425 void SetWebkitPreferences(const WebPreferences& preferences) override; | 423 void SetWebkitPreferences(const WebPreferences& preferences) override; |
| 426 blink::WebView* GetWebView() override; | 424 blink::WebView* GetWebView() override; |
| 427 blink::WebFrameWidget* GetWebFrameWidget() override; | 425 blink::WebFrameWidget* GetWebFrameWidget() override; |
| 428 bool ShouldDisplayScrollbars(int width, int height) const override; | 426 bool ShouldDisplayScrollbars(int width, int height) const override; |
| 429 int GetEnabledBindings() const override; | 427 int GetEnabledBindings() const override; |
| 430 bool GetContentStateImmediately() const override; | 428 bool GetContentStateImmediately() const override; |
| 431 blink::WebPageVisibilityState GetVisibilityState() const override; | |
| 432 void DidStartLoading() override; | 429 void DidStartLoading() override; |
| 433 void DidStopLoading() override; | 430 void DidStopLoading() override; |
| 434 void Repaint(const gfx::Size& size) override; | 431 void Repaint(const gfx::Size& size) override; |
| 435 void SetEditCommandForNextKeyEvent(const std::string& name, | 432 void SetEditCommandForNextKeyEvent(const std::string& name, |
| 436 const std::string& value) override; | 433 const std::string& value) override; |
| 437 void ClearEditCommands() override; | 434 void ClearEditCommands() override; |
| 438 SSLStatus GetSSLStatusOfFrame(blink::WebFrame* frame) const override; | 435 SSLStatus GetSSLStatusOfFrame(blink::WebFrame* frame) const override; |
| 439 const std::string& GetAcceptLanguages() const override; | 436 const std::string& GetAcceptLanguages() const override; |
| 440 #if defined(OS_ANDROID) | 437 #if defined(OS_ANDROID) |
| 441 void UpdateTopControlsState(TopControlsState constraints, | 438 void UpdateTopControlsState(TopControlsState constraints, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 453 // Please do not add your stuff randomly to the end here. If there is an | 450 // Please do not add your stuff randomly to the end here. If there is an |
| 454 // appropriate section, add it there. If not, there are some random functions | 451 // appropriate section, add it there. If not, there are some random functions |
| 455 // nearer to the top you can add it to. | 452 // nearer to the top you can add it to. |
| 456 | 453 |
| 457 protected: | 454 protected: |
| 458 // RenderWidget overrides: | 455 // RenderWidget overrides: |
| 459 void CloseForFrame() override; | 456 void CloseForFrame() override; |
| 460 void Close() override; | 457 void Close() override; |
| 461 void OnResize(const ResizeParams& params) override; | 458 void OnResize(const ResizeParams& params) override; |
| 462 void OnSetFocus(bool enable) override; | 459 void OnSetFocus(bool enable) override; |
| 463 void OnWasHidden() override; | |
| 464 void OnWasShown(bool needs_repainting, | |
| 465 const ui::LatencyInfo& latency_info) override; | |
| 466 GURL GetURLForGraphicsContext3D() override; | 460 GURL GetURLForGraphicsContext3D() override; |
| 467 void OnImeSetComposition( | 461 void OnImeSetComposition( |
| 468 const base::string16& text, | 462 const base::string16& text, |
| 469 const std::vector<blink::WebCompositionUnderline>& underlines, | 463 const std::vector<blink::WebCompositionUnderline>& underlines, |
| 470 const gfx::Range& replacement_range, | 464 const gfx::Range& replacement_range, |
| 471 int selection_start, | 465 int selection_start, |
| 472 int selection_end) override; | 466 int selection_end) override; |
| 473 void OnImeConfirmComposition(const base::string16& text, | 467 void OnImeConfirmComposition(const base::string16& text, |
| 474 const gfx::Range& replacement_range, | 468 const gfx::Range& replacement_range, |
| 475 bool keep_selection) override; | 469 bool keep_selection) override; |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 bool enable_showing, | 672 bool enable_showing, |
| 679 bool animate); | 673 bool animate); |
| 680 void OnExtractSmartClipData(const gfx::Rect& rect); | 674 void OnExtractSmartClipData(const gfx::Rect& rect); |
| 681 #elif defined(OS_MACOSX) | 675 #elif defined(OS_MACOSX) |
| 682 void OnGetRenderedText(); | 676 void OnGetRenderedText(); |
| 683 #endif | 677 #endif |
| 684 | 678 |
| 685 // Page message handlers ----------------------------------------------------- | 679 // Page message handlers ----------------------------------------------------- |
| 686 void OnUpdateWindowScreenRect(gfx::Rect window_screen_rect); | 680 void OnUpdateWindowScreenRect(gfx::Rect window_screen_rect); |
| 687 void OnSetZoomLevel(PageMsg_SetZoomLevel_Command command, double zoom_level); | 681 void OnSetZoomLevel(PageMsg_SetZoomLevel_Command command, double zoom_level); |
| 682 void OnPageWasHidden(); |
| 683 void OnPageWasShown(); |
| 688 | 684 |
| 689 // Adding a new message handler? Please add it in alphabetical order above | 685 // Adding a new message handler? Please add it in alphabetical order above |
| 690 // and put it in the same position in the .cc file. | 686 // and put it in the same position in the .cc file. |
| 691 | 687 |
| 692 // Misc private functions ---------------------------------------------------- | 688 // Misc private functions ---------------------------------------------------- |
| 693 // Check whether the preferred size has changed. | 689 // Check whether the preferred size has changed. |
| 694 void CheckPreferredSize(); | 690 void CheckPreferredSize(); |
| 695 | 691 |
| 696 #if defined(OS_ANDROID) | 692 #if defined(OS_ANDROID) |
| 697 // Launch an Android content intent with the given URL. | 693 // Launch an Android content intent with the given URL. |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 // use the Observer interface to filter IPC messages and receive frame change | 965 // use the Observer interface to filter IPC messages and receive frame change |
| 970 // notifications. | 966 // notifications. |
| 971 // --------------------------------------------------------------------------- | 967 // --------------------------------------------------------------------------- |
| 972 | 968 |
| 973 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 969 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 974 }; | 970 }; |
| 975 | 971 |
| 976 } // namespace content | 972 } // namespace content |
| 977 | 973 |
| 978 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 974 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |