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

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

Issue 258373002: Towards moving guest management to chrome: Introduce GuestViewManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with ToT Created 6 years, 7 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_MANAGER_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_MANAGER_DELEGATE_H_
7
8 #include "base/callback.h"
9 #include "build/build_config.h"
10 #include "content/common/content_export.h"
11
12 class GURL;
13
14 namespace content {
15
16 class SiteInstance;
17 class WebContents;
18
19 class CONTENT_EXPORT BrowserPluginGuestManagerDelegate {
20 public:
21 virtual ~BrowserPluginGuestManagerDelegate() {}
22
23 // Return a new instance ID.
24 virtual int GetNextInstanceID();
25
26 // TODO(fsamuel): Remove this.
lazyboy 2014/05/01 20:06:59 A bit of description why this is temporary?
Fady Samuel 2014/05/01 21:05:28 Done.
27 virtual void AddGuest(int guest_instance_id,
28 WebContents* guest_web_contents) {}
29
30 // TODO(fsamuel): Remove this.
31 virtual void RemoveGuest(int guest_instance_id) {}
32
33 // Returns a Webcontents given a |guest_instance_id|. Returns NULL if the
34 // guest wasn't found. If the embedder is not permitted to access the given
35 // |guest_instance_id|, the embedder is killed, and NULL is returned.
36 virtual WebContents* GetGuestByInstanceID(int guest_instance_id,
37 int embedder_render_process_id);
38
39 // Returns whether the specified embedder is permitted to access the given
40 // |guest_instance_id|.
41 // TODO(fsamuel): Remove this.
42 virtual bool CanEmbedderAccessInstanceID(int embedder_render_process_id,
43 int guest_instance_id);
44
45 // Returns whether the specified embedder is permitted to access the given
46 // |guest_instance_id|, and kills the embedder if not.
47 // TODO(fsamuel): Remove this.
48 virtual bool CanEmbedderAccessInstanceIDMaybeKill(
49 int embedder_render_process_id,
50 int guest_instance_id);
51
52 // TODO(fsamuel): Remove this.
53 virtual content::SiteInstance* GetGuestSiteInstance(const GURL& guest_site);
54
55 // Iterates over all WebContents belonging to a given |embedder_web_contents|,
56 // calling |callback| for each. If one of the callbacks returns true, then
57 // the iteration exits early.
58 typedef base::Callback<bool(WebContents*)> GuestCallback;
59 virtual bool ForEachGuest(WebContents* embedder_web_contents,
60 const GuestCallback& callback);
61
62 // Requests an instance ID for the given |src| URL. If the operation completes
63 // succcessfully, then callback is called with the instance ID.
lazyboy 2014/05/01 20:06:59 nit: .. then |callback| is called ...
Fady Samuel 2014/05/01 21:05:28 Removed this entirely.
64 typedef base::Callback<void(int)> InstanceIDResponseCallback;
65 virtual void RequestInstanceID(const std::string& src,
66 const InstanceIDResponseCallback& callback) {}
67
68 };
69
70 } // namespace content
71
72 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_MANAGER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698