OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 const GURL& validated_url, | 259 const GURL& validated_url, |
260 int error_code, | 260 int error_code, |
261 const base::string16& error_description) override; | 261 const base::string16& error_description) override; |
262 void DidStartProvisionalLoadForFrame( | 262 void DidStartProvisionalLoadForFrame( |
263 content::RenderFrameHost* render_frame_host, | 263 content::RenderFrameHost* render_frame_host, |
264 const GURL& validated_url, | 264 const GURL& validated_url, |
265 bool is_error_page, | 265 bool is_error_page, |
266 bool is_iframe_srcdoc) override; | 266 bool is_iframe_srcdoc) override; |
267 void DocumentLoadedInFrame( | 267 void DocumentLoadedInFrame( |
268 content::RenderFrameHost* render_frame_host) override; | 268 content::RenderFrameHost* render_frame_host) override; |
269 bool OnMessageReceived(const IPC::Message& message, | |
270 content::RenderFrameHost* render_frame_host) override; | |
271 void RenderProcessGone(base::TerminationStatus status) override; | 269 void RenderProcessGone(base::TerminationStatus status) override; |
272 void UserAgentOverrideSet(const std::string& user_agent) override; | 270 void UserAgentOverrideSet(const std::string& user_agent) override; |
| 271 void FrameNameChanged(content::RenderFrameHost* render_frame_host, |
| 272 const std::string& name) override; |
273 | 273 |
274 // Informs the embedder of a frame name change. | 274 // Informs the embedder of a frame name change. |
275 void ReportFrameNameChange(const std::string& name); | 275 void ReportFrameNameChange(const std::string& name); |
276 | 276 |
277 // Called after the load handler is called in the guest's main frame. | 277 // Called after the load handler is called in the guest's main frame. |
278 void LoadHandlerCalled(); | 278 void LoadHandlerCalled(); |
279 | 279 |
280 // Called when a redirect notification occurs. | 280 // Called when a redirect notification occurs. |
281 void LoadRedirect(const GURL& old_url, | 281 void LoadRedirect(const GURL& old_url, |
282 const GURL& new_url, | 282 const GURL& new_url, |
(...skipping 18 matching lines...) Expand all Loading... |
301 | 301 |
302 // Requests resolution of a potentially relative URL. | 302 // Requests resolution of a potentially relative URL. |
303 GURL ResolveURL(const std::string& src); | 303 GURL ResolveURL(const std::string& src); |
304 | 304 |
305 // Notification that a load in the guest resulted in abort. Note that |url| | 305 // Notification that a load in the guest resulted in abort. Note that |url| |
306 // may be invalid. | 306 // may be invalid. |
307 void LoadAbort(bool is_top_level, | 307 void LoadAbort(bool is_top_level, |
308 const GURL& url, | 308 const GURL& url, |
309 const std::string& error_type); | 309 const std::string& error_type); |
310 | 310 |
311 void OnFrameNameChanged(bool is_top_level, const std::string& name); | |
312 | |
313 // Creates a new guest window owned by this WebViewGuest. | 311 // Creates a new guest window owned by this WebViewGuest. |
314 void CreateNewGuestWebViewWindow(const content::OpenURLParams& params); | 312 void CreateNewGuestWebViewWindow(const content::OpenURLParams& params); |
315 | 313 |
316 void NewGuestWebViewCallback(const content::OpenURLParams& params, | 314 void NewGuestWebViewCallback(const content::OpenURLParams& params, |
317 content::WebContents* guest_web_contents); | 315 content::WebContents* guest_web_contents); |
318 | 316 |
319 bool HandleKeyboardShortcuts(const content::NativeWebKeyboardEvent& event); | 317 bool HandleKeyboardShortcuts(const content::NativeWebKeyboardEvent& event); |
320 | 318 |
321 void ApplyAttributes(const base::DictionaryValue& params); | 319 void ApplyAttributes(const base::DictionaryValue& params); |
322 | 320 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 // This is used to ensure pending tasks will not fire after this object is | 373 // This is used to ensure pending tasks will not fire after this object is |
376 // destroyed. | 374 // destroyed. |
377 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; | 375 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; |
378 | 376 |
379 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 377 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
380 }; | 378 }; |
381 | 379 |
382 } // namespace extensions | 380 } // namespace extensions |
383 | 381 |
384 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 382 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
OLD | NEW |