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 |
11 #include <deque> | 11 #include <deque> |
12 #include <map> | 12 #include <map> |
13 #include <memory> | 13 #include <memory> |
14 #include <set> | 14 #include <set> |
15 #include <string> | 15 #include <string> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "base/gtest_prod_util.h" | 18 #include "base/gtest_prod_util.h" |
19 #include "base/id_map.h" | 19 #include "base/id_map.h" |
20 #include "base/macros.h" | 20 #include "base/macros.h" |
21 #include "base/memory/weak_ptr.h" | 21 #include "base/memory/weak_ptr.h" |
22 #include "base/observer_list.h" | 22 #include "base/observer_list.h" |
23 #include "base/process/process.h" | 23 #include "base/process/process.h" |
24 #include "base/strings/string16.h" | 24 #include "base/strings/string16.h" |
25 #include "base/timer/timer.h" | 25 #include "base/timer/timer.h" |
26 #include "build/build_config.h" | 26 #include "build/build_config.h" |
27 #include "cc/input/top_controls_state.h" | 27 #include "cc/input/browser_controls_state.h" |
28 #include "cc/resources/shared_bitmap.h" | 28 #include "cc/resources/shared_bitmap.h" |
29 #include "content/common/content_export.h" | 29 #include "content/common/content_export.h" |
30 #include "content/common/drag_event_source_info.h" | 30 #include "content/common/drag_event_source_info.h" |
31 #include "content/common/frame_message_enums.h" | 31 #include "content/common/frame_message_enums.h" |
32 #include "content/common/navigation_gesture.h" | 32 #include "content/common/navigation_gesture.h" |
33 #include "content/common/page_message_enums.h" | 33 #include "content/common/page_message_enums.h" |
34 #include "content/common/view_message_enums.h" | 34 #include "content/common/view_message_enums.h" |
| 35 #include "content/public/common/browser_controls_state.h" |
35 #include "content/public/common/drop_data.h" | 36 #include "content/public/common/drop_data.h" |
36 #include "content/public/common/page_zoom.h" | 37 #include "content/public/common/page_zoom.h" |
37 #include "content/public/common/referrer.h" | 38 #include "content/public/common/referrer.h" |
38 #include "content/public/common/renderer_preferences.h" | 39 #include "content/public/common/renderer_preferences.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/render_frame_impl.h" | 42 #include "content/renderer/render_frame_impl.h" |
43 #include "content/renderer/render_widget.h" | 43 #include "content/renderer/render_widget.h" |
44 #include "content/renderer/render_widget_owner_delegate.h" | 44 #include "content/renderer/render_widget_owner_delegate.h" |
45 #include "content/renderer/stats_collection_observer.h" | 45 #include "content/renderer/stats_collection_observer.h" |
46 #include "ipc/ipc_platform_file.h" | 46 #include "ipc/ipc_platform_file.h" |
47 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" | 47 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" |
48 #include "third_party/WebKit/public/web/WebAXObject.h" | 48 #include "third_party/WebKit/public/web/WebAXObject.h" |
49 #include "third_party/WebKit/public/web/WebConsoleMessage.h" | 49 #include "third_party/WebKit/public/web/WebConsoleMessage.h" |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 blink::WebFrameWidget* GetWebFrameWidget() override; | 399 blink::WebFrameWidget* GetWebFrameWidget() override; |
400 bool ShouldDisplayScrollbars(int width, int height) const override; | 400 bool ShouldDisplayScrollbars(int width, int height) const override; |
401 int GetEnabledBindings() const override; | 401 int GetEnabledBindings() const override; |
402 bool GetContentStateImmediately() const override; | 402 bool GetContentStateImmediately() const override; |
403 void Repaint(const gfx::Size& size) override; | 403 void Repaint(const gfx::Size& size) override; |
404 void SetEditCommandForNextKeyEvent(const std::string& name, | 404 void SetEditCommandForNextKeyEvent(const std::string& name, |
405 const std::string& value) override; | 405 const std::string& value) override; |
406 void ClearEditCommands() override; | 406 void ClearEditCommands() override; |
407 const std::string& GetAcceptLanguages() const override; | 407 const std::string& GetAcceptLanguages() const override; |
408 #if defined(OS_ANDROID) | 408 #if defined(OS_ANDROID) |
409 void UpdateTopControlsState(TopControlsState constraints, | 409 void UpdateBrowserControlsState(BrowserControlsState constraints, |
410 TopControlsState current, | 410 BrowserControlsState current, |
411 bool animate) override; | 411 bool animate) override; |
412 #endif | 412 #endif |
413 void ConvertViewportToWindowViaWidget(blink::WebRect* rect) override; | 413 void ConvertViewportToWindowViaWidget(blink::WebRect* rect) override; |
414 gfx::RectF ElementBoundsInWindow(const blink::WebElement& element) override; | 414 gfx::RectF ElementBoundsInWindow(const blink::WebElement& element) override; |
415 bool HasAddedInputHandler() const override; | 415 bool HasAddedInputHandler() const override; |
416 | 416 |
417 gfx::Point ConvertWindowPointToViewport(const gfx::Point& point); | 417 gfx::Point ConvertWindowPointToViewport(const gfx::Point& point); |
418 | 418 |
419 bool uses_temporary_zoom_level() const { return uses_temporary_zoom_level_; } | 419 bool uses_temporary_zoom_level() const { return uses_temporary_zoom_level_; } |
420 | 420 |
421 // Please do not add your stuff randomly to the end here. If there is an | 421 // Please do not add your stuff randomly to the end here. If there is an |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); | 612 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); |
613 void OnSuppressDialogsUntilSwapOut(); | 613 void OnSuppressDialogsUntilSwapOut(); |
614 void OnUpdateTargetURLAck(); | 614 void OnUpdateTargetURLAck(); |
615 void OnUpdateWebPreferences(const WebPreferences& prefs); | 615 void OnUpdateWebPreferences(const WebPreferences& prefs); |
616 void OnSetPageScale(float page_scale_factor); | 616 void OnSetPageScale(float page_scale_factor); |
617 void OnZoom(PageZoom zoom); | 617 void OnZoom(PageZoom zoom); |
618 void OnForceRedraw(const ui::LatencyInfo& latency_info); | 618 void OnForceRedraw(const ui::LatencyInfo& latency_info); |
619 void OnSelectWordAroundCaret(); | 619 void OnSelectWordAroundCaret(); |
620 #if defined(OS_ANDROID) | 620 #if defined(OS_ANDROID) |
621 void OnUndoScrollFocusedEditableNodeIntoRect(); | 621 void OnUndoScrollFocusedEditableNodeIntoRect(); |
622 void OnUpdateTopControlsState(bool enable_hiding, | 622 void OnUpdateBrowserControlsState(bool enable_hiding, |
623 bool enable_showing, | 623 bool enable_showing, |
624 bool animate); | 624 bool animate); |
625 void OnExtractSmartClipData(const gfx::Rect& rect); | 625 void OnExtractSmartClipData(const gfx::Rect& rect); |
626 #elif defined(OS_MACOSX) | 626 #elif defined(OS_MACOSX) |
627 void OnGetRenderedText(); | 627 void OnGetRenderedText(); |
628 #endif | 628 #endif |
629 | 629 |
630 // Page message handlers ----------------------------------------------------- | 630 // Page message handlers ----------------------------------------------------- |
631 void OnUpdateWindowScreenRect(gfx::Rect window_screen_rect); | 631 void OnUpdateWindowScreenRect(gfx::Rect window_screen_rect); |
632 void OnSetZoomLevel(PageMsg_SetZoomLevel_Command command, double zoom_level); | 632 void OnSetZoomLevel(PageMsg_SetZoomLevel_Command command, double zoom_level); |
633 void OnPageWasHidden(); | 633 void OnPageWasHidden(); |
634 void OnPageWasShown(); | 634 void OnPageWasShown(); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 // The URL that has keyboard focus. | 792 // The URL that has keyboard focus. |
793 GURL focus_url_; | 793 GURL focus_url_; |
794 | 794 |
795 // The next target URL we want to send to the browser. | 795 // The next target URL we want to send to the browser. |
796 GURL pending_target_url_; | 796 GURL pending_target_url_; |
797 | 797 |
798 // Indicates whether this view overrides url-based zoom settings. | 798 // Indicates whether this view overrides url-based zoom settings. |
799 bool uses_temporary_zoom_level_; | 799 bool uses_temporary_zoom_level_; |
800 | 800 |
801 #if defined(OS_ANDROID) | 801 #if defined(OS_ANDROID) |
802 // Cache the old top controls state constraints. Used when updating | 802 // Cache the old browser controls state constraints. Used when updating |
803 // current value only without altering the constraints. | 803 // current value only without altering the constraints. |
804 TopControlsState top_controls_constraints_; | 804 BrowserControlsState top_controls_constraints_; |
805 #endif | 805 #endif |
806 | 806 |
807 // Whether or not Blink's viewport size should be shrunk by the height of the | 807 // Whether or not Blink's viewport size should be shrunk by the height of the |
808 // URL-bar. | 808 // URL-bar. |
809 bool top_controls_shrink_blink_size_; | 809 bool browser_controls_shrink_blink_size_; |
810 | 810 |
811 // The height of the top controls. | 811 // The height of the browser controls. |
812 float top_controls_height_; | 812 float top_controls_height_; |
813 | 813 |
814 // View ---------------------------------------------------------------------- | 814 // View ---------------------------------------------------------------------- |
815 | 815 |
816 blink::WebView* webview_; | 816 blink::WebView* webview_; |
817 | 817 |
818 // Cache the preferred size of the page in order to prevent sending the IPC | 818 // Cache the preferred size of the page in order to prevent sending the IPC |
819 // when layout() recomputes but doesn't actually change sizes. | 819 // when layout() recomputes but doesn't actually change sizes. |
820 gfx::Size preferred_size_; | 820 gfx::Size preferred_size_; |
821 | 821 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 // use the Observer interface to filter IPC messages and receive frame change | 902 // use the Observer interface to filter IPC messages and receive frame change |
903 // notifications. | 903 // notifications. |
904 // --------------------------------------------------------------------------- | 904 // --------------------------------------------------------------------------- |
905 | 905 |
906 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 906 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
907 }; | 907 }; |
908 | 908 |
909 } // namespace content | 909 } // namespace content |
910 | 910 |
911 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 911 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
OLD | NEW |