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

Side by Side Diff: chrome/browser/background/background_contents_service.h

Issue 10868116: Pass result of blockage across content API when new tab blocked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ 5 #ifndef CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_
6 #define CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ 6 #define CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Returns true if there's a registered BackgroundContents for this app. It 55 // Returns true if there's a registered BackgroundContents for this app. It
56 // is possible for this routine to return true when GetAppBackgroundContents() 56 // is possible for this routine to return true when GetAppBackgroundContents()
57 // returns false, if the BackgroundContents closed due to the render process 57 // returns false, if the BackgroundContents closed due to the render process
58 // crashing. 58 // crashing.
59 bool HasRegisteredBackgroundContents(const string16& appid); 59 bool HasRegisteredBackgroundContents(const string16& appid);
60 60
61 // Returns all currently opened BackgroundContents (used by the task manager). 61 // Returns all currently opened BackgroundContents (used by the task manager).
62 std::vector<BackgroundContents*> GetBackgroundContents() const; 62 std::vector<BackgroundContents*> GetBackgroundContents() const;
63 63
64 // BackgroundContents::Delegate implementation. 64 // BackgroundContents::Delegate implementation.
65 virtual void AddWebContents(content::WebContents* new_contents, 65 virtual bool AddWebContents(content::WebContents* new_contents,
66 WindowOpenDisposition disposition, 66 WindowOpenDisposition disposition,
67 const gfx::Rect& initial_pos, 67 const gfx::Rect& initial_pos,
68 bool user_gesture) OVERRIDE; 68 bool user_gesture) OVERRIDE;
69 69
70 // Gets the parent application id for the passed BackgroundContents. Returns 70 // Gets the parent application id for the passed BackgroundContents. Returns
71 // an empty string if no parent application found (e.g. passed 71 // an empty string if no parent application found (e.g. passed
72 // BackgroundContents has already shut down). 72 // BackgroundContents has already shut down).
73 const string16& GetParentApplicationId(BackgroundContents* contents) const; 73 const string16& GetParentApplicationId(BackgroundContents* contents) const;
74 74
75 // Creates a new BackgroundContents using the passed |site| and 75 // Creates a new BackgroundContents using the passed |site| and
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // applications. 179 // applications.
180 // Key: application id 180 // Key: application id
181 // Value: BackgroundContentsInfo for the BC associated with that application 181 // Value: BackgroundContentsInfo for the BC associated with that application
182 typedef std::map<string16, BackgroundContentsInfo> BackgroundContentsMap; 182 typedef std::map<string16, BackgroundContentsInfo> BackgroundContentsMap;
183 BackgroundContentsMap contents_map_; 183 BackgroundContentsMap contents_map_;
184 184
185 DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService); 185 DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService);
186 }; 186 };
187 187
188 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ 188 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698