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

Side by Side Diff: chrome/browser/guest_view/guest_view_manager.h

Issue 354483004: Implement <appview> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@app_view_skeleton
Patch Set: Fixed formatting Created 6 years, 5 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
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 CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_ 5 #ifndef CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_
6 #define CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_ 6 #define CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "content/public/browser/browser_plugin_guest_manager.h" 13 #include "content/public/browser/browser_plugin_guest_manager.h"
14 #include "content/public/browser/site_instance.h" 14 #include "content/public/browser/site_instance.h"
15 #include "content/public/browser/web_contents.h" 15 #include "content/public/browser/web_contents.h"
16 16
17 class AppViewGuest;
17 class GuestViewBase; 18 class GuestViewBase;
18 class GuestViewManagerFactory; 19 class GuestViewManagerFactory;
19 class GuestWebContentsObserver; 20 class GuestWebContentsObserver;
20 class GURL; 21 class GURL;
21 22
22 namespace content { 23 namespace content {
23 class BrowserContext; 24 class BrowserContext;
24 } // namespace content 25 } // namespace content
25 26
26 namespace guestview { 27 namespace guestview {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 72
72 // BrowserPluginGuestManager implementation. 73 // BrowserPluginGuestManager implementation.
73 virtual void MaybeGetGuestByInstanceIDOrKill( 74 virtual void MaybeGetGuestByInstanceIDOrKill(
74 int guest_instance_id, 75 int guest_instance_id,
75 int embedder_render_process_id, 76 int embedder_render_process_id,
76 const GuestByInstanceIDCallback& callback) OVERRIDE; 77 const GuestByInstanceIDCallback& callback) OVERRIDE;
77 virtual bool ForEachGuest(content::WebContents* embedder_web_contents, 78 virtual bool ForEachGuest(content::WebContents* embedder_web_contents,
78 const GuestCallback& callback) OVERRIDE; 79 const GuestCallback& callback) OVERRIDE;
79 80
80 protected: 81 protected:
82 friend class AppViewGuest;
81 friend class GuestViewBase; 83 friend class GuestViewBase;
82 friend class GuestWebContentsObserver; 84 friend class GuestWebContentsObserver;
83 friend class guestview::TestGuestViewManager; 85 friend class guestview::TestGuestViewManager;
84 FRIEND_TEST_ALL_PREFIXES(GuestViewManagerTest, AddRemove); 86 FRIEND_TEST_ALL_PREFIXES(GuestViewManagerTest, AddRemove);
85 87
86 // Can be overriden in tests. 88 // Can be overriden in tests.
87 virtual void AddGuest(int guest_instance_id, 89 virtual void AddGuest(int guest_instance_id,
88 content::WebContents* guest_web_contents); 90 content::WebContents* guest_web_contents);
89 91
90 void RemoveGuest(int guest_instance_id); 92 void RemoveGuest(int guest_instance_id);
91 93
92 content::WebContents* GetGuestByInstanceID( 94 content::WebContents* GetGuestByInstanceID(int guest_instance_id);
93 int guest_instance_id,
94 int embedder_render_process_id);
95 95
96 bool CanEmbedderAccessInstanceIDMaybeKill( 96 bool CanEmbedderAccessInstanceIDMaybeKill(
97 int embedder_render_process_id, 97 int embedder_render_process_id,
98 int guest_instance_id); 98 int guest_instance_id);
99 99
100 bool CanEmbedderAccessInstanceID(int embedder_render_process_id, 100 bool CanEmbedderAccessInstanceID(int embedder_render_process_id,
101 int guest_instance_id); 101 int guest_instance_id);
102 102
103 // Returns true if |guest_instance_id| can be used to add a new guest to this 103 // Returns true if |guest_instance_id| can be used to add a new guest to this
104 // manager. 104 // manager.
(...skipping 18 matching lines...) Expand all
123 // The remaining instance IDs that are greater than 123 // The remaining instance IDs that are greater than
124 // |last_instance_id_removed_| are kept here. 124 // |last_instance_id_removed_| are kept here.
125 std::set<int> removed_instance_ids_; 125 std::set<int> removed_instance_ids_;
126 126
127 content::BrowserContext* context_; 127 content::BrowserContext* context_;
128 128
129 DISALLOW_COPY_AND_ASSIGN(GuestViewManager); 129 DISALLOW_COPY_AND_ASSIGN(GuestViewManager);
130 }; 130 };
131 131
132 #endif // CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_ 132 #endif // CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/guest_view/guest_view_base.cc ('k') | chrome/browser/guest_view/guest_view_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698