| 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" |
| 11 #include "components/guest_view/browser/guest_view.h" |
| 11 #include "content/public/browser/javascript_dialog_manager.h" | 12 #include "content/public/browser/javascript_dialog_manager.h" |
| 12 #include "content/public/browser/notification_observer.h" | 13 #include "content/public/browser/notification_observer.h" |
| 13 #include "content/public/browser/notification_registrar.h" | 14 #include "content/public/browser/notification_registrar.h" |
| 14 #include "extensions/browser/guest_view/guest_view.h" | |
| 15 #include "extensions/browser/guest_view/web_view/javascript_dialog_helper.h" | 15 #include "extensions/browser/guest_view/web_view/javascript_dialog_helper.h" |
| 16 #include "extensions/browser/guest_view/web_view/web_view_find_helper.h" | 16 #include "extensions/browser/guest_view/web_view/web_view_find_helper.h" |
| 17 #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h" | 17 #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h" |
| 18 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" | 18 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" |
| 19 #include "extensions/browser/guest_view/web_view/web_view_permission_types.h" | 19 #include "extensions/browser/guest_view/web_view/web_view_permission_types.h" |
| 20 #include "extensions/browser/script_executor.h" | 20 #include "extensions/browser/script_executor.h" |
| 21 | 21 |
| 22 namespace blink { | 22 namespace blink { |
| 23 struct WebFindOptions; | 23 struct WebFindOptions; |
| 24 } // nanespace blink | 24 } // nanespace blink |
| 25 | 25 |
| 26 namespace extensions { | 26 namespace extensions { |
| 27 | 27 |
| 28 class WebViewInternalFindFunction; | 28 class WebViewInternalFindFunction; |
| 29 | 29 |
| 30 // A WebViewGuest provides the browser-side implementation of the <webview> API | 30 // A WebViewGuest provides the browser-side implementation of the <webview> API |
| 31 // and manages the dispatch of <webview> extension events. WebViewGuest is | 31 // and manages the dispatch of <webview> extension events. WebViewGuest is |
| 32 // created on attachment. That is, when a guest WebContents is associated with | 32 // created on attachment. That is, when a guest WebContents is associated with |
| 33 // a particular embedder WebContents. This happens on either initial navigation | 33 // a particular embedder WebContents. This happens on either initial navigation |
| 34 // or through the use of the New Window API, when a new window is attached to | 34 // or through the use of the New Window API, when a new window is attached to |
| 35 // a particular <webview>. | 35 // a particular <webview>. |
| 36 class WebViewGuest : public GuestView<WebViewGuest>, | 36 class WebViewGuest : public guestview::GuestView<WebViewGuest>, |
| 37 public content::NotificationObserver { | 37 public content::NotificationObserver { |
| 38 public: | 38 public: |
| 39 static GuestViewBase* Create(content::WebContents* owner_web_contents); | 39 static GuestViewBase* Create(content::WebContents* owner_web_contents); |
| 40 | 40 |
| 41 // For WebViewGuest, we create special guest processes, which host the | 41 // For WebViewGuest, we create special guest processes, which host the |
| 42 // tag content separately from the main application that embeds the tag. | 42 // tag content separately from the main application that embeds the tag. |
| 43 // A <webview> can specify both the partition name and whether the storage | 43 // A <webview> can specify both the partition name and whether the storage |
| 44 // for that partition should be persisted. Each tag gets a SiteInstance with | 44 // for that partition should be persisted. Each tag gets a SiteInstance with |
| 45 // a specially formatted URL, based on the application it is hosted by and | 45 // a specially formatted URL, based on the application it is hosted by and |
| 46 // the partition requested by it. The format for that URL is: | 46 // the partition requested by it. The format for that URL is: |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 // This is used to ensure pending tasks will not fire after this object is | 404 // This is used to ensure pending tasks will not fire after this object is |
| 405 // destroyed. | 405 // destroyed. |
| 406 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; | 406 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; |
| 407 | 407 |
| 408 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 408 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
| 409 }; | 409 }; |
| 410 | 410 |
| 411 } // namespace extensions | 411 } // namespace extensions |
| 412 | 412 |
| 413 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 413 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
| OLD | NEW |