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

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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 void 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,
69 bool* was_blocked) OVERRIDE;
69 70
70 // Gets the parent application id for the passed BackgroundContents. Returns 71 // Gets the parent application id for the passed BackgroundContents. Returns
71 // an empty string if no parent application found (e.g. passed 72 // an empty string if no parent application found (e.g. passed
72 // BackgroundContents has already shut down). 73 // BackgroundContents has already shut down).
73 const string16& GetParentApplicationId(BackgroundContents* contents) const; 74 const string16& GetParentApplicationId(BackgroundContents* contents) const;
74 75
75 // Creates a new BackgroundContents using the passed |site| and 76 // Creates a new BackgroundContents using the passed |site| and
76 // the |route_id| and begins tracking the object internally so it can be 77 // the |route_id| and begins tracking the object internally so it can be
77 // shutdown if the parent application is uninstalled. 78 // shutdown if the parent application is uninstalled.
78 // A BACKGROUND_CONTENTS_OPENED notification will be generated with the passed 79 // A BACKGROUND_CONTENTS_OPENED notification will be generated with the passed
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // applications. 180 // applications.
180 // Key: application id 181 // Key: application id
181 // Value: BackgroundContentsInfo for the BC associated with that application 182 // Value: BackgroundContentsInfo for the BC associated with that application
182 typedef std::map<string16, BackgroundContentsInfo> BackgroundContentsMap; 183 typedef std::map<string16, BackgroundContentsInfo> BackgroundContentsMap;
183 BackgroundContentsMap contents_map_; 184 BackgroundContentsMap contents_map_;
184 185
185 DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService); 186 DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService);
186 }; 187 };
187 188
188 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ 189 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/background/background_contents_service.cc » ('j') | chrome/browser/extensions/extension_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698