| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FRAME_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #include "media/blink/webmediaplayer_delegate.h" | 37 #include "media/blink/webmediaplayer_delegate.h" |
| 38 #include "media/blink/webmediaplayer_params.h" | 38 #include "media/blink/webmediaplayer_params.h" |
| 39 #include "services/shell/public/interfaces/connector.mojom.h" | 39 #include "services/shell/public/interfaces/connector.mojom.h" |
| 40 #include "services/shell/public/interfaces/interface_provider.mojom.h" | 40 #include "services/shell/public/interfaces/interface_provider.mojom.h" |
| 41 #include "third_party/WebKit/public/platform/WebEffectiveConnectionType.h" | 41 #include "third_party/WebKit/public/platform/WebEffectiveConnectionType.h" |
| 42 #include "third_party/WebKit/public/platform/WebFocusType.h" | 42 #include "third_party/WebKit/public/platform/WebFocusType.h" |
| 43 #include "third_party/WebKit/public/platform/WebLoadingBehaviorFlag.h" | 43 #include "third_party/WebKit/public/platform/WebLoadingBehaviorFlag.h" |
| 44 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" | 44 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
| 45 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie
nt.h" | 45 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie
nt.h" |
| 46 #include "third_party/WebKit/public/web/WebAXObject.h" | 46 #include "third_party/WebKit/public/web/WebAXObject.h" |
| 47 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" |
| 47 #include "third_party/WebKit/public/web/WebDataSource.h" | 48 #include "third_party/WebKit/public/web/WebDataSource.h" |
| 48 #include "third_party/WebKit/public/web/WebFrameClient.h" | 49 #include "third_party/WebKit/public/web/WebFrameClient.h" |
| 49 #include "third_party/WebKit/public/web/WebFrameLoadType.h" | 50 #include "third_party/WebKit/public/web/WebFrameLoadType.h" |
| 50 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" | 51 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" |
| 51 #include "third_party/WebKit/public/web/WebFrameSerializerClient.h" | 52 #include "third_party/WebKit/public/web/WebFrameSerializerClient.h" |
| 52 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" | 53 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" |
| 53 #include "third_party/WebKit/public/web/WebMeaningfulLayout.h" | 54 #include "third_party/WebKit/public/web/WebMeaningfulLayout.h" |
| 54 #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" | 55 #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" |
| 55 #include "ui/gfx/range/range.h" | 56 #include "ui/gfx/range/range.h" |
| 56 #include "url/gurl.h" | 57 #include "url/gurl.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 77 class SyncMessage; | 78 class SyncMessage; |
| 78 } | 79 } |
| 79 | 80 |
| 80 namespace blink { | 81 namespace blink { |
| 81 class WebMouseEvent; | 82 class WebMouseEvent; |
| 82 class WebContentDecryptionModule; | 83 class WebContentDecryptionModule; |
| 83 class WebPresentationClient; | 84 class WebPresentationClient; |
| 84 class WebPushClient; | 85 class WebPushClient; |
| 85 class WebSecurityOrigin; | 86 class WebSecurityOrigin; |
| 86 enum class WebCachePolicy; | 87 enum class WebCachePolicy; |
| 87 struct WebCompositionUnderline; | |
| 88 struct WebContextMenuData; | 88 struct WebContextMenuData; |
| 89 struct WebCursorInfo; | 89 struct WebCursorInfo; |
| 90 struct WebFindOptions; | 90 struct WebFindOptions; |
| 91 struct WebScreenInfo; | 91 struct WebScreenInfo; |
| 92 } | 92 } |
| 93 | 93 |
| 94 namespace gfx { | 94 namespace gfx { |
| 95 class Point; | 95 class Point; |
| 96 class Range; | 96 class Range; |
| 97 class Rect; | 97 class Rect; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 | 254 |
| 255 // This method must be called after the frame has been added to the frame | 255 // This method must be called after the frame has been added to the frame |
| 256 // tree. It creates all objects that depend on the frame being at its proper | 256 // tree. It creates all objects that depend on the frame being at its proper |
| 257 // spot. | 257 // spot. |
| 258 void Initialize(); | 258 void Initialize(); |
| 259 | 259 |
| 260 // Notifications from RenderWidget. | 260 // Notifications from RenderWidget. |
| 261 void WasHidden(); | 261 void WasHidden(); |
| 262 void WasShown(); | 262 void WasShown(); |
| 263 void WidgetWillClose(); | 263 void WidgetWillClose(); |
| 264 // The following methods are called by the RenderWidget which receives a |
| 265 // corresponding IME-related IPC. If the target of IME is a pepper plugin, |
| 266 // RenderFrame will pass on the message to the RenderFrame of the plugin. |
| 267 // Otherwise, the selected text for focused frame is adjusted according to |
| 268 // the replacement range (this is needed in Mac for accented characters). |
| 269 // Finally, RenderFrameImpl will pass the parameters back to RenderWidget to |
| 270 // process the IME-related call. |
| 271 void OnImeSetComposition( |
| 272 RenderWidget* render_widget, |
| 273 const base::string16& text, |
| 274 const std::vector<blink::WebCompositionUnderline>& underlines, |
| 275 const gfx::Range& replacement_range, |
| 276 int selection_start, |
| 277 int selection_end); |
| 278 void OnImeConfirmComposition(RenderWidget* render_widget, |
| 279 const base::string16& text, |
| 280 const gfx::Range& replacement_range, |
| 281 bool keep_selection); |
| 264 | 282 |
| 265 // Start/Stop loading notifications. | 283 // Start/Stop loading notifications. |
| 266 // TODO(nasko): Those are page-level methods at this time and come from | 284 // TODO(nasko): Those are page-level methods at this time and come from |
| 267 // WebViewClient. We should move them to be WebFrameClient calls and put | 285 // WebViewClient. We should move them to be WebFrameClient calls and put |
| 268 // logic in the browser side to balance starts/stops. | 286 // logic in the browser side to balance starts/stops. |
| 269 // |to_different_document| will be true unless the load is a fragment | 287 // |to_different_document| will be true unless the load is a fragment |
| 270 // navigation, or triggered by history.pushState/replaceState. | 288 // navigation, or triggered by history.pushState/replaceState. |
| 271 void didStartLoading(bool to_different_document) override; | 289 void didStartLoading(bool to_different_document) override; |
| 272 void didStopLoading() override; | 290 void didStopLoading() override; |
| 273 void didChangeLoadProgress(double load_progress) override; | 291 void didChangeLoadProgress(double load_progress) override; |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 // Functions to add and remove observers for this object. | 741 // Functions to add and remove observers for this object. |
| 724 void AddObserver(RenderFrameObserver* observer); | 742 void AddObserver(RenderFrameObserver* observer); |
| 725 void RemoveObserver(RenderFrameObserver* observer); | 743 void RemoveObserver(RenderFrameObserver* observer); |
| 726 | 744 |
| 727 bool IsLocalRoot() const; | 745 bool IsLocalRoot() const; |
| 728 | 746 |
| 729 // Builds and sends DidCommitProvisionalLoad to the host. | 747 // Builds and sends DidCommitProvisionalLoad to the host. |
| 730 void SendDidCommitProvisionalLoad(blink::WebFrame* frame, | 748 void SendDidCommitProvisionalLoad(blink::WebFrame* frame, |
| 731 blink::WebHistoryCommitType commit_type, | 749 blink::WebHistoryCommitType commit_type, |
| 732 const blink::WebHistoryItem& item); | 750 const blink::WebHistoryItem& item); |
| 751 // Selects the text in |replacement_range| so that it will be replaced by text |
| 752 // added by the call to RenderWidget::HandleImeSetComposition or |
| 753 // RenderWidget::HandleImeConfirmComposition. This is currently used for |
| 754 // accented characters in Mac. |
| 755 void AdjustReplacementRangeForAccentedCharacters( |
| 756 const gfx::Range& replacement_range) const; |
| 733 | 757 |
| 734 // IPC message handlers ------------------------------------------------------ | 758 // IPC message handlers ------------------------------------------------------ |
| 735 // | 759 // |
| 736 // The documentation for these functions should be in | 760 // The documentation for these functions should be in |
| 737 // content/common/*_messages.h for the message that the function is handling. | 761 // content/common/*_messages.h for the message that the function is handling. |
| 738 void OnNavigate(const CommonNavigationParams& common_params, | 762 void OnNavigate(const CommonNavigationParams& common_params, |
| 739 const StartNavigationParams& start_params, | 763 const StartNavigationParams& start_params, |
| 740 const RequestNavigationParams& request_params); | 764 const RequestNavigationParams& request_params); |
| 741 void OnBeforeUnload(bool is_reload); | 765 void OnBeforeUnload(bool is_reload); |
| 742 void OnSwapOut(int proxy_routing_id, | 766 void OnSwapOut(int proxy_routing_id, |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1237 #endif | 1261 #endif |
| 1238 | 1262 |
| 1239 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1263 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
| 1240 | 1264 |
| 1241 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1265 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
| 1242 }; | 1266 }; |
| 1243 | 1267 |
| 1244 } // namespace content | 1268 } // namespace content |
| 1245 | 1269 |
| 1246 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1270 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| OLD | NEW |