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/image_downloader/image_downloader_dispatcher.h" | |
18 #include "content/browser/site_instance_impl.h" | 19 #include "content/browser/site_instance_impl.h" |
19 #include "content/common/accessibility_mode_enums.h" | 20 #include "content/common/accessibility_mode_enums.h" |
20 #include "content/common/content_export.h" | 21 #include "content/common/content_export.h" |
21 #include "content/common/frame_message_enums.h" | 22 #include "content/common/frame_message_enums.h" |
22 #include "content/common/frame_replication_state.h" | 23 #include "content/common/frame_replication_state.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" |
26 #include "content/public/common/javascript_message_type.h" | 27 #include "content/public/common/javascript_message_type.h" |
27 #include "net/http/http_response_headers.h" | 28 #include "net/http/http_response_headers.h" |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
421 | 422 |
422 // Tears down the browser-side state relating to the Mojo connection between | 423 // Tears down the browser-side state relating to the Mojo connection between |
423 // this instance and its associated render frame. | 424 // this instance and its associated render frame. |
424 void InvalidateMojoConnection(); | 425 void InvalidateMojoConnection(); |
425 | 426 |
426 // Returns whether the frame is focused. A frame is considered focused when it | 427 // Returns whether the frame is focused. A frame is considered focused when it |
427 // is the parent chain of the focused frame within the frame tree. In | 428 // is the parent chain of the focused frame within the frame tree. In |
428 // addition, its associated RenderWidgetHost has to be focused. | 429 // addition, its associated RenderWidgetHost has to be focused. |
429 bool IsFocused(); | 430 bool IsFocused(); |
430 | 431 |
432 // Download image API called by web_contents. | |
433 int DownloadImage(const GURL& url, | |
434 bool is_favicon, | |
435 uint32_t max_bitmap_size, | |
436 bool bypass_cache, | |
437 const WebContents::ImageDownloadCallback& callback); | |
438 | |
431 protected: | 439 protected: |
432 friend class RenderFrameHostFactory; | 440 friend class RenderFrameHostFactory; |
433 | 441 |
434 // |flags| is a combination of CreateRenderFrameFlags. | 442 // |flags| is a combination of CreateRenderFrameFlags. |
435 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost | 443 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost |
436 // should be the abstraction needed here, but we need RenderViewHost to pass | 444 // should be the abstraction needed here, but we need RenderViewHost to pass |
437 // into WebContentsObserver::FrameDetached for now. | 445 // into WebContentsObserver::FrameDetached for now. |
438 RenderFrameHostImpl(SiteInstance* site_instance, | 446 RenderFrameHostImpl(SiteInstance* site_instance, |
439 RenderViewHostImpl* render_view_host, | 447 RenderViewHostImpl* render_view_host, |
440 RenderFrameHostDelegate* delegate, | 448 RenderFrameHostDelegate* delegate, |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
689 // already exists it will still be used. | 697 // already exists it will still be used. |
690 bool no_create_browser_accessibility_manager_for_testing_; | 698 bool no_create_browser_accessibility_manager_for_testing_; |
691 | 699 |
692 // PlzNavigate: Owns the stream used in navigations to store the body of the | 700 // PlzNavigate: Owns the stream used in navigations to store the body of the |
693 // response once it has started. | 701 // response once it has started. |
694 scoped_ptr<StreamHandle> stream_handle_; | 702 scoped_ptr<StreamHandle> stream_handle_; |
695 | 703 |
696 // Context shared for each PermissionService instance created for this RFH. | 704 // Context shared for each PermissionService instance created for this RFH. |
697 scoped_ptr<PermissionServiceContext> permission_service_context_; | 705 scoped_ptr<PermissionServiceContext> permission_service_context_; |
698 | 706 |
707 // Dispatcher to do IPC with ImageDownloader Mojo service in Renderer side. | |
nasko
2015/04/15 20:57:22
nit: "Renderer" isn't very clear. Is it the render
leonhsl(Using Gerrit)
2015/04/17 06:14:34
Done. "Renderer side" ---> "RenderFrame"
| |
708 scoped_ptr<ImageDownloaderDispatcher> image_downloader_dispatcher_; | |
709 | |
699 // NOTE: This must be the last member. | 710 // NOTE: This must be the last member. |
700 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 711 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
701 | 712 |
702 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 713 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
703 }; | 714 }; |
704 | 715 |
705 } // namespace content | 716 } // namespace content |
706 | 717 |
707 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 718 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |