OLD | NEW |
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_HTML_FRAME_H_ | 5 #ifndef COMPONENTS_HTML_VIEWER_HTML_FRAME_H_ |
6 #define COMPONENTS_HTML_VIEWER_HTML_FRAME_H_ | 6 #define COMPONENTS_HTML_VIEWER_HTML_FRAME_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // Returns null if the browser side didn't request to setup an agent in this | 140 // Returns null if the browser side didn't request to setup an agent in this |
141 // frame. | 141 // frame. |
142 DevToolsAgentImpl* devtools_agent() { return devtools_agent_.get(); } | 142 DevToolsAgentImpl* devtools_agent() { return devtools_agent_.get(); } |
143 | 143 |
144 // Returns true if the Frame is local, false if remote. | 144 // Returns true if the Frame is local, false if remote. |
145 bool IsLocal() const; | 145 bool IsLocal() const; |
146 | 146 |
147 // Returns true if this or one of the frames descendants is local. | 147 // Returns true if this or one of the frames descendants is local. |
148 bool HasLocalDescendant() const; | 148 bool HasLocalDescendant() const; |
149 | 149 |
| 150 void LoadRequest(const blink::WebURLRequest& request); |
| 151 |
150 protected: | 152 protected: |
151 virtual ~HTMLFrame(); | 153 virtual ~HTMLFrame(); |
152 | 154 |
153 // WebFrameClient methods: | 155 // WebFrameClient methods: |
154 virtual blink::WebMediaPlayer* createMediaPlayer( | 156 virtual blink::WebMediaPlayer* createMediaPlayer( |
155 blink::WebLocalFrame* frame, | 157 blink::WebLocalFrame* frame, |
156 const blink::WebURL& url, | 158 const blink::WebURL& url, |
157 blink::WebMediaPlayerClient* client, | 159 blink::WebMediaPlayerClient* client, |
158 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, | 160 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, |
159 blink::WebContentDecryptionModule* initial_cdm); | 161 blink::WebContentDecryptionModule* initial_cdm); |
160 virtual blink::WebFrame* createChildFrame( | 162 virtual blink::WebFrame* createChildFrame( |
161 blink::WebLocalFrame* parent, | 163 blink::WebLocalFrame* parent, |
162 blink::WebTreeScopeType scope, | 164 blink::WebTreeScopeType scope, |
163 const blink::WebString& frame_ame, | 165 const blink::WebString& frame_ame, |
164 blink::WebSandboxFlags sandbox_flags); | 166 blink::WebSandboxFlags sandbox_flags); |
165 virtual void frameDetached(blink::WebFrame* frame, | 167 virtual void frameDetached(blink::WebFrame* frame, |
166 blink::WebFrameClient::DetachType type); | 168 blink::WebFrameClient::DetachType type); |
167 virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame); | 169 virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame); |
168 virtual blink::WebNavigationPolicy decidePolicyForNavigation( | 170 virtual blink::WebNavigationPolicy decidePolicyForNavigation( |
169 const NavigationPolicyInfo& info); | 171 const NavigationPolicyInfo& info); |
| 172 virtual bool hasPendingNavigation(blink::WebLocalFrame* frame); |
170 virtual void didHandleOnloadEvents(blink::WebLocalFrame* frame); | 173 virtual void didHandleOnloadEvents(blink::WebLocalFrame* frame); |
171 virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message, | 174 virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message, |
172 const blink::WebString& source_name, | 175 const blink::WebString& source_name, |
173 unsigned source_line, | 176 unsigned source_line, |
174 const blink::WebString& stack_trace); | 177 const blink::WebString& stack_trace); |
175 virtual void didFinishLoad(blink::WebLocalFrame* frame); | 178 virtual void didFinishLoad(blink::WebLocalFrame* frame); |
176 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, | 179 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, |
177 const blink::WebHistoryItem& history_item, | 180 const blink::WebHistoryItem& history_item, |
178 blink::WebHistoryCommitType commit_type); | 181 blink::WebHistoryCommitType commit_type); |
179 virtual blink::WebGeolocationClient* geolocationClient(); | 182 virtual blink::WebGeolocationClient* geolocationClient(); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 // frame was swapped to remote then the process rendering to the view would | 328 // frame was swapped to remote then the process rendering to the view would |
326 // be severed. | 329 // be severed. |
327 scoped_ptr<mus::ScopedViewPtr> owned_view_; | 330 scoped_ptr<mus::ScopedViewPtr> owned_view_; |
328 | 331 |
329 // This object is only valid in the context of performance tests. | 332 // This object is only valid in the context of performance tests. |
330 tracing::StartupPerformanceDataCollectorPtr | 333 tracing::StartupPerformanceDataCollectorPtr |
331 startup_performance_data_collector_; | 334 startup_performance_data_collector_; |
332 | 335 |
333 scoped_ptr<DevToolsAgentImpl> devtools_agent_; | 336 scoped_ptr<DevToolsAgentImpl> devtools_agent_; |
334 | 337 |
| 338 // A navigation request has been sent to the frame server side, and we haven't |
| 339 // received response to it. |
| 340 bool pending_navigation_; |
| 341 |
335 base::WeakPtrFactory<HTMLFrame> weak_factory_; | 342 base::WeakPtrFactory<HTMLFrame> weak_factory_; |
336 | 343 |
337 DISALLOW_COPY_AND_ASSIGN(HTMLFrame); | 344 DISALLOW_COPY_AND_ASSIGN(HTMLFrame); |
338 }; | 345 }; |
339 | 346 |
340 } // namespace html_viewer | 347 } // namespace html_viewer |
341 | 348 |
342 #endif // COMPONENTS_HTML_VIEWER_HTML_FRAME_H_ | 349 #endif // COMPONENTS_HTML_VIEWER_HTML_FRAME_H_ |
OLD | NEW |