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

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

Issue 880983006: GuestView: Show status bubbles in browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only call ForEachGuest if a GuestViewManager exists Created 5 years, 10 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 EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_ 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_ 6 #define EXTENSIONS_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"
(...skipping 13 matching lines...) Expand all
24 namespace extensions{ 24 namespace extensions{
25 class GuestViewBase; 25 class GuestViewBase;
26 class GuestViewManagerFactory; 26 class GuestViewManagerFactory;
27 27
28 class GuestViewManager : public content::BrowserPluginGuestManager, 28 class GuestViewManager : public content::BrowserPluginGuestManager,
29 public base::SupportsUserData::Data { 29 public base::SupportsUserData::Data {
30 public: 30 public:
31 explicit GuestViewManager(content::BrowserContext* context); 31 explicit GuestViewManager(content::BrowserContext* context);
32 ~GuestViewManager() override; 32 ~GuestViewManager() override;
33 33
34 // Returns the GuestViewManager associated with |context|. If one isn't
35 // available, then it is created and returned.
34 static GuestViewManager* FromBrowserContext(content::BrowserContext* context); 36 static GuestViewManager* FromBrowserContext(content::BrowserContext* context);
35 37
38 // Returns the GuestViewManager associated with |context|. If one isn't
39 // available, then nullptr is returned.
40 static GuestViewManager* FromBrowserContextIfAvailable(
41 content::BrowserContext* context);
42
36 // Overrides factory for testing. Default (NULL) value indicates regular 43 // Overrides factory for testing. Default (NULL) value indicates regular
37 // (non-test) environment. 44 // (non-test) environment.
38 static void set_factory_for_testing(GuestViewManagerFactory* factory) { 45 static void set_factory_for_testing(GuestViewManagerFactory* factory) {
39 GuestViewManager::factory_ = factory; 46 GuestViewManager::factory_ = factory;
40 } 47 }
41 // Returns the guest WebContents associated with the given |guest_instance_id| 48 // Returns the guest WebContents associated with the given |guest_instance_id|
42 // if the provided |embedder_render_process_id| is allowed to access it. 49 // if the provided |embedder_render_process_id| is allowed to access it.
43 // If the embedder is not allowed access, the embedder will be killed, and 50 // If the embedder is not allowed access, the embedder will be killed, and
44 // this method will return NULL. If no WebContents exists with the given 51 // this method will return NULL. If no WebContents exists with the given
45 // instance ID, then NULL will also be returned. 52 // instance ID, then NULL will also be returned.
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 std::set<int> removed_instance_ids_; 171 std::set<int> removed_instance_ids_;
165 172
166 content::BrowserContext* context_; 173 content::BrowserContext* context_;
167 174
168 DISALLOW_COPY_AND_ASSIGN(GuestViewManager); 175 DISALLOW_COPY_AND_ASSIGN(GuestViewManager);
169 }; 176 };
170 177
171 } // namespace extensions 178 } // namespace extensions
172 179
173 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_ 180 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_H_
OLDNEW
« no previous file with comments | « extensions/browser/guest_view/guest_view_base.cc ('k') | extensions/browser/guest_view/guest_view_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698