| 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/debug/crash_logging.h" | 13 #include "base/debug/crash_logging.h" |
| 14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
| 17 #include "base/strings/string_number_conversions.h" // Temporary | 17 #include "base/strings/string_number_conversions.h" // Temporary |
| 18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
| 19 #include "content/browser/accessibility/browser_accessibility_manager.h" | 19 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 20 #include "content/browser/image_downloader/image_downloader_dispatcher.h" |
| 20 #include "content/browser/site_instance_impl.h" | 21 #include "content/browser/site_instance_impl.h" |
| 21 #include "content/common/accessibility_mode_enums.h" | 22 #include "content/common/accessibility_mode_enums.h" |
| 22 #include "content/common/content_export.h" | 23 #include "content/common/content_export.h" |
| 23 #include "content/common/frame_message_enums.h" | 24 #include "content/common/frame_message_enums.h" |
| 24 #include "content/common/frame_replication_state.h" | 25 #include "content/common/frame_replication_state.h" |
| 25 #include "content/common/mojo/service_registry_impl.h" | 26 #include "content/common/mojo/service_registry_impl.h" |
| 26 #include "content/common/navigation_params.h" | 27 #include "content/common/navigation_params.h" |
| 27 #include "content/public/browser/render_frame_host.h" | 28 #include "content/public/browser/render_frame_host.h" |
| 28 #include "content/public/common/javascript_message_type.h" | 29 #include "content/public/common/javascript_message_type.h" |
| 29 #include "net/http/http_response_headers.h" | 30 #include "net/http/http_response_headers.h" |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 void InvalidateMojoConnection(); | 438 void InvalidateMojoConnection(); |
| 438 | 439 |
| 439 // Returns whether the frame is focused. A frame is considered focused when it | 440 // Returns whether the frame is focused. A frame is considered focused when it |
| 440 // is the parent chain of the focused frame within the frame tree. In | 441 // is the parent chain of the focused frame within the frame tree. In |
| 441 // addition, its associated RenderWidgetHost has to be focused. | 442 // addition, its associated RenderWidgetHost has to be focused. |
| 442 bool IsFocused(); | 443 bool IsFocused(); |
| 443 | 444 |
| 444 // Temporary for http://crbug.com/369661. | 445 // Temporary for http://crbug.com/369661. |
| 445 std::string CommitCountString(); | 446 std::string CommitCountString(); |
| 446 | 447 |
| 448 // Download image API called by web_contents. |
| 449 int DownloadImage(const GURL& url, |
| 450 bool is_favicon, |
| 451 uint32_t max_bitmap_size, |
| 452 bool bypass_cache, |
| 453 const WebContents::ImageDownloadCallback& callback); |
| 454 |
| 447 protected: | 455 protected: |
| 448 friend class RenderFrameHostFactory; | 456 friend class RenderFrameHostFactory; |
| 449 | 457 |
| 450 // |flags| is a combination of CreateRenderFrameFlags. | 458 // |flags| is a combination of CreateRenderFrameFlags. |
| 451 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost | 459 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost |
| 452 // should be the abstraction needed here, but we need RenderViewHost to pass | 460 // should be the abstraction needed here, but we need RenderViewHost to pass |
| 453 // into WebContentsObserver::FrameDetached for now. | 461 // into WebContentsObserver::FrameDetached for now. |
| 454 RenderFrameHostImpl(SiteInstance* site_instance, | 462 RenderFrameHostImpl(SiteInstance* site_instance, |
| 455 RenderViewHostImpl* render_view_host, | 463 RenderViewHostImpl* render_view_host, |
| 456 RenderFrameHostDelegate* delegate, | 464 RenderFrameHostDelegate* delegate, |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 | 737 |
| 730 // Context shared for each PermissionService instance created for this RFH. | 738 // Context shared for each PermissionService instance created for this RFH. |
| 731 scoped_ptr<PermissionServiceContext> permission_service_context_; | 739 scoped_ptr<PermissionServiceContext> permission_service_context_; |
| 732 | 740 |
| 733 // The frame's Mojo Shell service. | 741 // The frame's Mojo Shell service. |
| 734 scoped_ptr<FrameMojoShell> frame_mojo_shell_; | 742 scoped_ptr<FrameMojoShell> frame_mojo_shell_; |
| 735 | 743 |
| 736 // Temporary for http://crbug.com/369661 | 744 // Temporary for http://crbug.com/369661 |
| 737 int commit_count_ = 0; | 745 int commit_count_ = 0; |
| 738 | 746 |
| 747 // Dispatcher to do IPC with ImageDownloader Mojo service in RenderFrame. |
| 748 scoped_ptr<ImageDownloaderDispatcher> image_downloader_dispatcher_; |
| 749 |
| 739 // NOTE: This must be the last member. | 750 // NOTE: This must be the last member. |
| 740 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 751 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
| 741 | 752 |
| 742 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 753 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| 743 }; | 754 }; |
| 744 | 755 |
| 745 } // namespace content | 756 } // namespace content |
| 746 | 757 |
| 747 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 758 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| OLD | NEW |