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

Side by Side Diff: content/renderer/render_frame_impl.h

Issue 616133002: Make RenderFrame(Host) own a RenderWidget(Host). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed output surface problems, combined RenderFrame and RenderWidget creation Created 6 years, 2 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_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 <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 17 matching lines...) Expand all
28 #include "third_party/WebKit/public/web/WebFrameClient.h" 28 #include "third_party/WebKit/public/web/WebFrameClient.h"
29 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" 29 #include "third_party/WebKit/public/web/WebHistoryCommitType.h"
30 #include "ui/gfx/range/range.h" 30 #include "ui/gfx/range/range.h"
31 31
32 #if defined(OS_ANDROID) 32 #if defined(OS_ANDROID)
33 #include "content/renderer/media/android/renderer_media_player_manager.h" 33 #include "content/renderer/media/android/renderer_media_player_manager.h"
34 #endif 34 #endif
35 35
36 class TransportDIB; 36 class TransportDIB;
37 struct FrameMsg_Navigate_Params; 37 struct FrameMsg_Navigate_Params;
38 struct FrameMsg_NewFrame_WidgetParams;
38 39
39 namespace blink { 40 namespace blink {
40 class WebGeolocationClient; 41 class WebGeolocationClient;
41 class WebInputEvent; 42 class WebInputEvent;
42 class WebMouseEvent; 43 class WebMouseEvent;
43 class WebContentDecryptionModule; 44 class WebContentDecryptionModule;
44 class WebMediaPlayer; 45 class WebMediaPlayer;
45 class WebNotificationPresenter; 46 class WebNotificationPresenter;
46 class WebPushClient; 47 class WebPushClient;
47 class WebSecurityOrigin; 48 class WebSecurityOrigin;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // TODO(creis): We should structure this so that |SetWebFrame| isn't needed. 95 // TODO(creis): We should structure this so that |SetWebFrame| isn't needed.
95 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id); 96 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id);
96 97
97 // Creates a new RenderFrame with |routing_id| as a child of the RenderFrame 98 // Creates a new RenderFrame with |routing_id| as a child of the RenderFrame
98 // identified by |parent_routing_id| or as the top-level frame if the latter 99 // identified by |parent_routing_id| or as the top-level frame if the latter
99 // is MSG_ROUTING_NONE. It creates the Blink WebLocalFrame and inserts it in 100 // is MSG_ROUTING_NONE. It creates the Blink WebLocalFrame and inserts it in
100 // the proper place in the frame tree. 101 // the proper place in the frame tree.
101 // Note: This is called only when RenderFrame is being created in response to 102 // Note: This is called only when RenderFrame is being created in response to
102 // IPC message from the browser process. All other frame creation is driven 103 // IPC message from the browser process. All other frame creation is driven
103 // through Blink and Create. 104 // through Blink and Create.
104 static void CreateFrame(int routing_id, int parent_routing_id); 105 static void CreateFrame(int routing_id,
106 int parent_routing_id,
107 const FrameMsg_NewFrame_WidgetParams& params);
105 108
106 // Returns the RenderFrameImpl for the given routing ID. 109 // Returns the RenderFrameImpl for the given routing ID.
107 static RenderFrameImpl* FromRoutingID(int routing_id); 110 static RenderFrameImpl* FromRoutingID(int routing_id);
108 111
109 // Just like RenderFrame::FromWebFrame but returns the implementation. 112 // Just like RenderFrame::FromWebFrame but returns the implementation.
110 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); 113 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame);
111 114
112 // Used by content_layouttest_support to hook into the creation of 115 // Used by content_layouttest_support to hook into the creation of
113 // RenderFrameImpls. 116 // RenderFrameImpls.
114 static void InstallCreateHook( 117 static void InstallCreateHook(
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 641
639 base::WeakPtr<RenderViewImpl> render_view_; 642 base::WeakPtr<RenderViewImpl> render_view_;
640 int routing_id_; 643 int routing_id_;
641 bool is_swapped_out_; 644 bool is_swapped_out_;
642 // RenderFrameProxy exists only when is_swapped_out_ is true. 645 // RenderFrameProxy exists only when is_swapped_out_ is true.
643 // TODO(nasko): This can be removed once we don't have a swapped out state on 646 // TODO(nasko): This can be removed once we don't have a swapped out state on
644 // RenderFrame. See https://crbug.com/357747. 647 // RenderFrame. See https://crbug.com/357747.
645 RenderFrameProxy* render_frame_proxy_; 648 RenderFrameProxy* render_frame_proxy_;
646 bool is_detaching_; 649 bool is_detaching_;
647 650
651 // Used when the RenderFrame is a local frame root; for now RenderWidgets are
652 // added only when a child frame is in a different process from its parent
653 // frame, but eventually this will also apply to top-level frames.
654 // FIXME(kenrb): Correct the above statement when top-level frames have their
655 // own RenderWidgets.
656 scoped_refptr<RenderWidget> render_widget_;
657
648 #if defined(ENABLE_PLUGINS) 658 #if defined(ENABLE_PLUGINS)
649 // Current text input composition text. Empty if no composition is in 659 // Current text input composition text. Empty if no composition is in
650 // progress. 660 // progress.
651 base::string16 pepper_composition_text_; 661 base::string16 pepper_composition_text_;
652 #endif 662 #endif
653 663
654 RendererWebCookieJarImpl cookie_jar_; 664 RendererWebCookieJarImpl cookie_jar_;
655 665
656 // All the registered observers. 666 // All the registered observers.
657 ObserverList<RenderFrameObserver> observers_; 667 ObserverList<RenderFrameObserver> observers_;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 #endif 765 #endif
756 766
757 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 767 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
758 768
759 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 769 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
760 }; 770 };
761 771
762 } // namespace content 772 } // namespace content
763 773
764 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 774 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698