Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(550)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 1085783002: Replace image_messages.h with Mojo service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix review comments on set7 Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
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"
28 #include "third_party/WebKit/public/web/WebTextDirection.h" 29 #include "third_party/WebKit/public/web/WebTextDirection.h"
29 #include "third_party/WebKit/public/web/WebTreeScopeType.h" 30 #include "third_party/WebKit/public/web/WebTreeScopeType.h"
30 #include "ui/accessibility/ax_node_data.h" 31 #include "ui/accessibility/ax_node_data.h"
31 #include "ui/base/page_transition_types.h" 32 #include "ui/base/page_transition_types.h"
32 33
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 439
439 // Tears down the browser-side state relating to the Mojo connection between 440 // Tears down the browser-side state relating to the Mojo connection between
440 // this instance and its associated render frame. 441 // this instance and its associated render frame.
441 void InvalidateMojoConnection(); 442 void InvalidateMojoConnection();
442 443
443 // Returns whether the frame is focused. A frame is considered focused when it 444 // 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 445 // is the parent chain of the focused frame within the frame tree. In
445 // addition, its associated RenderWidgetHost has to be focused. 446 // addition, its associated RenderWidgetHost has to be focused.
446 bool IsFocused(); 447 bool IsFocused();
447 448
449 // Returns the Mojo ImageDownloader service pointer.
nasko 2015/07/06 07:45:23 You are not returning a pointer, but a const refer
450 const image_downloader::ImageDownloaderPtr& GetMojoImageDownloader();
451
448 protected: 452 protected:
449 friend class RenderFrameHostFactory; 453 friend class RenderFrameHostFactory;
450 454
451 // |flags| is a combination of CreateRenderFrameFlags. 455 // |flags| is a combination of CreateRenderFrameFlags.
452 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost 456 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost
453 // should be the abstraction needed here, but we need RenderViewHost to pass 457 // should be the abstraction needed here, but we need RenderViewHost to pass
454 // into WebContentsObserver::FrameDetached for now. 458 // into WebContentsObserver::FrameDetached for now.
455 RenderFrameHostImpl(SiteInstance* site_instance, 459 RenderFrameHostImpl(SiteInstance* site_instance,
456 RenderViewHostImpl* render_view_host, 460 RenderViewHostImpl* render_view_host,
457 RenderFrameHostDelegate* delegate, 461 RenderFrameHostDelegate* delegate,
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 // PlzNavigate: Owns the stream used in navigations to store the body of the 732 // PlzNavigate: Owns the stream used in navigations to store the body of the
729 // response once it has started. 733 // response once it has started.
730 scoped_ptr<StreamHandle> stream_handle_; 734 scoped_ptr<StreamHandle> stream_handle_;
731 735
732 // Context shared for each PermissionService instance created for this RFH. 736 // Context shared for each PermissionService instance created for this RFH.
733 scoped_ptr<PermissionServiceContext> permission_service_context_; 737 scoped_ptr<PermissionServiceContext> permission_service_context_;
734 738
735 // The frame's Mojo Shell service. 739 // The frame's Mojo Shell service.
736 scoped_ptr<FrameMojoShell> frame_mojo_shell_; 740 scoped_ptr<FrameMojoShell> frame_mojo_shell_;
737 741
742 // Holder of Mojo connection with ImageDownloader service in RenderFrame.
743 image_downloader::ImageDownloaderPtr mojo_image_downloader_;
744
738 // NOTE: This must be the last member. 745 // NOTE: This must be the last member.
739 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 746 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
740 747
741 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 748 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
742 }; 749 };
743 750
744 } // namespace content 751 } // namespace content
745 752
746 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 753 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698