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

Side by Side Diff: content/public/browser/browser_plugin_guest_delegate.h

Issue 2417693002: Allow MimeHandlerViewGuest be embedded inside OOPIFs (Closed)
Patch Set: Rebased Created 4 years, 1 month 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_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/process/kill.h" 9 #include "base/process/kill.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class Size; 14 class Size;
15 } // namespace gfx 15 } // namespace gfx
16 16
17 namespace content { 17 namespace content {
18 18
19 class GuestHost; 19 class GuestHost;
20 class RenderWidgetHost;
21 class SiteInstance;
20 22
21 // Objects implement this interface to get notified about changes in the guest 23 // Objects implement this interface to get notified about changes in the guest
22 // WebContents and to provide necessary functionality. 24 // WebContents and to provide necessary functionality.
23 class CONTENT_EXPORT BrowserPluginGuestDelegate { 25 class CONTENT_EXPORT BrowserPluginGuestDelegate {
24 public: 26 public:
25 virtual ~BrowserPluginGuestDelegate() {} 27 virtual ~BrowserPluginGuestDelegate() {}
26 28
27 // Notification that the embedder will begin attachment. This is called 29 // Notification that the embedder will begin attachment. This is called
28 // prior to resuming resource loads. |element_instance_id| uniquely identifies 30 // prior to resuming resource loads. |element_instance_id| uniquely identifies
29 // the element that will serve as a container for the guest. 31 // the element that will serve as a container for the guest.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // Sets the position of the context menu for the guest contents. The value 88 // Sets the position of the context menu for the guest contents. The value
87 // reported from the guest renderer should be ignored. The reported value 89 // reported from the guest renderer should be ignored. The reported value
88 // from the guest renderer is incorrect in situations where BrowserPlugin is 90 // from the guest renderer is incorrect in situations where BrowserPlugin is
89 // subject to CSS transforms. 91 // subject to CSS transforms.
90 virtual void SetContextMenuPosition(const gfx::Point& position) {} 92 virtual void SetContextMenuPosition(const gfx::Point& position) {}
91 93
92 // TODO(ekaramad): A short workaround to force some types of guests to use 94 // TODO(ekaramad): A short workaround to force some types of guests to use
93 // a BrowserPlugin even when we are using cross process frames for guests. It 95 // a BrowserPlugin even when we are using cross process frames for guests. It
94 // should be removed after resolving https://crbug.com/642826). 96 // should be removed after resolving https://crbug.com/642826).
95 virtual bool CanUseCrossProcessFrames(); 97 virtual bool CanUseCrossProcessFrames();
98
99 // Returns the RenderWidgetHost corresponding to the owner frame.
100 virtual RenderWidgetHost* GetOwnerRenderWidgetHost();
101
102 // The site instance of the owner frame.
103 virtual SiteInstance* GetOwnerSiteInstance();
104
105 // Returns true if the corresponding guest is allowed to be embedded inside an
106 // <iframe> which is cross process.
107 virtual bool CanBeEmbeddedInsideCrossProcessFrames();
96 }; 108 };
97 109
98 } // namespace content 110 } // namespace content
99 111
100 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ 112 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698