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

Side by Side Diff: components/html_viewer/frame.h

Issue 1239313004: More html_viewer OOPIF changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile 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
« no previous file with comments | « components/html_viewer/document_resource_waiter.cc ('k') | components/html_viewer/frame.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_HTML_VIEWER_FRAME_H_ 5 #ifndef COMPONENTS_HTML_VIEWER_FRAME_H_
6 #define COMPONENTS_HTML_VIEWER_FRAME_H_ 6 #define COMPONENTS_HTML_VIEWER_FRAME_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 : manager(manager), parent(parent), id(id) {} 49 : manager(manager), parent(parent), id(id) {}
50 ~CreateParams() {} 50 ~CreateParams() {}
51 51
52 FrameTreeManager* manager; 52 FrameTreeManager* manager;
53 Frame* parent; 53 Frame* parent;
54 uint32_t id; 54 uint32_t id;
55 }; 55 };
56 56
57 explicit Frame(const CreateParams& params); 57 explicit Frame(const CreateParams& params);
58 58
59 void Init(mojo::View* local_view); 59 void Init(mojo::View* local_view,
60 const blink::WebString& remote_frame_name,
61 const blink::WebString& remote_origin);
60 62
61 // Closes and deletes this Frame. 63 // Closes and deletes this Frame.
62 void Close(); 64 void Close();
63 65
64 uint32_t id() const { return id_; } 66 uint32_t id() const { return id_; }
65 67
66 // Returns the Frame whose id is |id|. 68 // Returns the Frame whose id is |id|.
67 Frame* FindFrame(uint32_t id) { 69 Frame* FindFrame(uint32_t id) {
68 return const_cast<Frame*>(const_cast<const Frame*>(this)->FindFrame(id)); 70 return const_cast<Frame*>(const_cast<const Frame*>(this)->FindFrame(id));
69 } 71 }
(...skipping 14 matching lines...) Expand all
84 // The mojo::View this frame renders to. This is non-null for the local frame 86 // The mojo::View this frame renders to. This is non-null for the local frame
85 // the frame tree was created with as well as non-null for any frames created 87 // the frame tree was created with as well as non-null for any frames created
86 // locally. 88 // locally.
87 mojo::View* view() { return view_; } 89 mojo::View* view() { return view_; }
88 90
89 private: 91 private:
90 friend class FrameTreeManager; 92 friend class FrameTreeManager;
91 93
92 virtual ~Frame(); 94 virtual ~Frame();
93 95
96 // Sets the name of the remote frame. Does nothing if this is a local frame.
97 void SetRemoteFrameName(const mojo::String& name);
98
94 // Returns true if the Frame is local, false if remote. 99 // Returns true if the Frame is local, false if remote.
95 bool IsLocal() const; 100 bool IsLocal() const;
96 101
97 void SetView(mojo::View* view); 102 void SetView(mojo::View* view);
98 103
99 // Creates the appropriate WebWidget implementation for the Frame. 104 // Creates the appropriate WebWidget implementation for the Frame.
100 void CreateWebWidget(); 105 void CreateWebWidget();
101 106
102 void UpdateFocus(); 107 void UpdateFocus();
103 108
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 const blink::WebString& stack_trace); 162 const blink::WebString& stack_trace);
158 virtual void didFinishLoad(blink::WebLocalFrame* frame); 163 virtual void didFinishLoad(blink::WebLocalFrame* frame);
159 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, 164 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame,
160 const blink::WebHistoryItem& history_item, 165 const blink::WebHistoryItem& history_item,
161 blink::WebHistoryCommitType commit_type); 166 blink::WebHistoryCommitType commit_type);
162 virtual blink::WebGeolocationClient* geolocationClient(); 167 virtual blink::WebGeolocationClient* geolocationClient();
163 virtual blink::WebEncryptedMediaClient* encryptedMediaClient(); 168 virtual blink::WebEncryptedMediaClient* encryptedMediaClient();
164 virtual void didStartLoading(bool to_different_document); 169 virtual void didStartLoading(bool to_different_document);
165 virtual void didStopLoading(); 170 virtual void didStopLoading();
166 virtual void didChangeLoadProgress(double load_progress); 171 virtual void didChangeLoadProgress(double load_progress);
172 virtual void didChangeName(blink::WebLocalFrame* frame,
173 const blink::WebString& name);
167 174
168 // blink::WebRemoteFrameClient: 175 // blink::WebRemoteFrameClient:
169 virtual void frameDetached(blink::WebRemoteFrameClient::DetachType type); 176 virtual void frameDetached(blink::WebRemoteFrameClient::DetachType type);
170 virtual void postMessageEvent(blink::WebLocalFrame* source_frame, 177 virtual void postMessageEvent(blink::WebLocalFrame* source_frame,
171 blink::WebRemoteFrame* target_frame, 178 blink::WebRemoteFrame* target_frame,
172 blink::WebSecurityOrigin target_origin, 179 blink::WebSecurityOrigin target_origin,
173 blink::WebDOMMessageEvent event); 180 blink::WebDOMMessageEvent event);
174 virtual void initializeChildFrame(const blink::WebRect& frame_rect, 181 virtual void initializeChildFrame(const blink::WebRect& frame_rect,
175 float scale_factor); 182 float scale_factor);
176 virtual void navigate(const blink::WebURLRequest& request, 183 virtual void navigate(const blink::WebURLRequest& request,
(...skipping 20 matching lines...) Expand all
197 scoped_ptr<WebLayerImpl> web_layer_; 204 scoped_ptr<WebLayerImpl> web_layer_;
198 205
199 base::WeakPtrFactory<Frame> weak_factory_; 206 base::WeakPtrFactory<Frame> weak_factory_;
200 207
201 DISALLOW_COPY_AND_ASSIGN(Frame); 208 DISALLOW_COPY_AND_ASSIGN(Frame);
202 }; 209 };
203 210
204 } // namespace html_viewer 211 } // namespace html_viewer
205 212
206 #endif // COMPONENTS_HTML_VIEWER_FRAME_H_ 213 #endif // COMPONENTS_HTML_VIEWER_FRAME_H_
OLDNEW
« no previous file with comments | « components/html_viewer/document_resource_waiter.cc ('k') | components/html_viewer/frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698