Chromium Code Reviews| 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_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
| 16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "content/browser/accessibility/browser_accessibility_manager.h" | 17 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 18 #include "content/browser/site_instance_impl.h" | 18 #include "content/browser/site_instance_impl.h" |
| 19 #include "content/common/accessibility_mode_enums.h" | 19 #include "content/common/accessibility_mode_enums.h" |
| 20 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
| 21 #include "content/common/frame_message_enums.h" | 21 #include "content/common/frame_message_enums.h" |
| 22 #include "content/common/frame_replication_state.h" | 22 #include "content/common/frame_replication_state.h" |
| 23 #include "content/common/image_downloader/image_downloader.mojom.h" | |
| 23 #include "content/common/mojo/service_registry_impl.h" | 24 #include "content/common/mojo/service_registry_impl.h" |
| 24 #include "content/common/navigation_params.h" | 25 #include "content/common/navigation_params.h" |
| 25 #include "content/public/browser/render_frame_host.h" | 26 #include "content/public/browser/render_frame_host.h" |
| 27 #include "content/public/browser/web_contents.h" | |
| 26 #include "content/public/common/javascript_message_type.h" | 28 #include "content/public/common/javascript_message_type.h" |
| 27 #include "net/http/http_response_headers.h" | 29 #include "net/http/http_response_headers.h" |
| 28 #include "third_party/WebKit/public/web/WebTextDirection.h" | 30 #include "third_party/WebKit/public/web/WebTextDirection.h" |
| 29 #include "third_party/WebKit/public/web/WebTreeScopeType.h" | 31 #include "third_party/WebKit/public/web/WebTreeScopeType.h" |
| 30 #include "ui/accessibility/ax_node_data.h" | 32 #include "ui/accessibility/ax_node_data.h" |
| 31 #include "ui/base/page_transition_types.h" | 33 #include "ui/base/page_transition_types.h" |
| 32 | 34 |
| 33 #if defined(OS_ANDROID) | 35 #if defined(OS_ANDROID) |
| 34 #include "content/browser/mojo/service_registry_android.h" | 36 #include "content/browser/mojo/service_registry_android.h" |
| 35 #endif | 37 #endif |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 438 | 440 |
| 439 // Tears down the browser-side state relating to the Mojo connection between | 441 // Tears down the browser-side state relating to the Mojo connection between |
| 440 // this instance and its associated render frame. | 442 // this instance and its associated render frame. |
| 441 void InvalidateMojoConnection(); | 443 void InvalidateMojoConnection(); |
| 442 | 444 |
| 443 // Returns whether the frame is focused. A frame is considered focused when it | 445 // Returns whether the frame is focused. A frame is considered focused when it |
| 444 // is the parent chain of the focused frame within the frame tree. In | 446 // is the parent chain of the focused frame within the frame tree. In |
| 445 // addition, its associated RenderWidgetHost has to be focused. | 447 // addition, its associated RenderWidgetHost has to be focused. |
| 446 bool IsFocused(); | 448 bool IsFocused(); |
| 447 | 449 |
| 450 // Download image API called by web_contents. | |
|
nasko
2015/07/02 08:41:07
No need to add specifics as to who calls this meth
leonhsl(Using Gerrit)
2015/07/06 02:15:25
Done.
| |
| 451 int DownloadImage(const GURL& url, | |
| 452 bool is_favicon, | |
| 453 uint32_t max_bitmap_size, | |
| 454 bool bypass_cache, | |
| 455 const WebContents::ImageDownloadCallback& callback); | |
| 456 | |
| 448 protected: | 457 protected: |
| 449 friend class RenderFrameHostFactory; | 458 friend class RenderFrameHostFactory; |
| 450 | 459 |
| 451 // |flags| is a combination of CreateRenderFrameFlags. | 460 // |flags| is a combination of CreateRenderFrameFlags. |
| 452 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost | 461 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost |
| 453 // should be the abstraction needed here, but we need RenderViewHost to pass | 462 // should be the abstraction needed here, but we need RenderViewHost to pass |
| 454 // into WebContentsObserver::FrameDetached for now. | 463 // into WebContentsObserver::FrameDetached for now. |
| 455 RenderFrameHostImpl(SiteInstance* site_instance, | 464 RenderFrameHostImpl(SiteInstance* site_instance, |
| 456 RenderViewHostImpl* render_view_host, | 465 RenderViewHostImpl* render_view_host, |
| 457 RenderFrameHostDelegate* delegate, | 466 RenderFrameHostDelegate* delegate, |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 728 // PlzNavigate: Owns the stream used in navigations to store the body of the | 737 // PlzNavigate: Owns the stream used in navigations to store the body of the |
| 729 // response once it has started. | 738 // response once it has started. |
| 730 scoped_ptr<StreamHandle> stream_handle_; | 739 scoped_ptr<StreamHandle> stream_handle_; |
| 731 | 740 |
| 732 // Context shared for each PermissionService instance created for this RFH. | 741 // Context shared for each PermissionService instance created for this RFH. |
| 733 scoped_ptr<PermissionServiceContext> permission_service_context_; | 742 scoped_ptr<PermissionServiceContext> permission_service_context_; |
| 734 | 743 |
| 735 // The frame's Mojo Shell service. | 744 // The frame's Mojo Shell service. |
| 736 scoped_ptr<FrameMojoShell> frame_mojo_shell_; | 745 scoped_ptr<FrameMojoShell> frame_mojo_shell_; |
| 737 | 746 |
| 747 // Holder of Mojo connection with ImageDownloader service in RenderFrame. | |
| 748 image_downloader::ImageDownloaderPtr mojo_image_downloader_; | |
| 749 | |
| 738 // NOTE: This must be the last member. | 750 // NOTE: This must be the last member. |
| 739 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 751 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
| 740 | 752 |
| 741 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 753 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| 742 }; | 754 }; |
| 743 | 755 |
| 744 } // namespace content | 756 } // namespace content |
| 745 | 757 |
| 746 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 758 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| OLD | NEW |