Update broken references to image assets
[chromium-blink-merge.git] / content / public / browser / browser_plugin_guest_manager.h
blobc809c0ff7e5e74368272a4576ce87368b857bde7
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.
5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_MANAGER_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_MANAGER_H_
8 #include "base/callback.h"
9 #include "content/common/content_export.h"
11 namespace content {
13 class WebContents;
15 // A BrowserPluginGuestManager offloads guest management and routing
16 // operations outside of the content layer.
17 class CONTENT_EXPORT BrowserPluginGuestManager {
18 public:
19 virtual ~BrowserPluginGuestManager() {}
21 // Requests a guest WebContents associated with the provided
22 // <owner_process_id, browser_plugin_instance_id> tuple.
23 virtual WebContents* GetGuestByInstanceID(int owner_process_id,
24 int browser_plugin_instance_id);
26 // Iterates over all WebContents belonging to a given |embedder_web_contents|,
27 // calling |callback| for each. If one of the callbacks returns true, then
28 // the iteration exits early.
29 typedef base::Callback<bool(WebContents*)> GuestCallback;
30 virtual bool ForEachGuest(WebContents* embedder_web_contents,
31 const GuestCallback& callback);
33 // Returns the "full page" guest if there is one. That is, if there is a
34 // single BrowserPlugin in the given embedder which takes up the full page,
35 // then it is returned.
36 virtual WebContents* GetFullPageGuest(WebContents* embedder_web_contents);
39 } // namespace content
41 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_MANAGER_H_