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

Side by Side Diff: chrome/browser/api/infobars/infobar_service.h

Issue 10879037: Rename InfoBarTabService -> InfoBarService. (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_API_INFOBARS_INFOBAR_TAB_SERVICE_H_ 5 #ifndef CHROME_BROWSER_API_INFOBARS_INFOBAR_TAB_SERVICE_H_
erikwright (departed) 2012/08/23 16:17:38 fix header guards
6 #define CHROME_BROWSER_API_INFOBARS_INFOBAR_TAB_SERVICE_H_ 6 #define CHROME_BROWSER_API_INFOBARS_INFOBAR_TAB_SERVICE_H_
7 7
8 namespace content { 8 namespace content {
9 class WebContents; 9 class WebContents;
10 } 10 }
11 11
12 class InfoBarDelegate; 12 class InfoBarDelegate;
13 class TabContents; 13 class TabContents;
14 14
15 // Provides access to creating, removing and enumerating info bars 15 // Provides access to creating, removing and enumerating info bars
16 // attached to a tab. 16 // attached to a tab.
17 class InfoBarTabService { 17 class InfoBarService {
18 public: 18 public:
19 // Retrieves the InfoBarTabService for a given tab. 19 // Retrieves the InfoBarService for a given tab.
20 static InfoBarTabService* ForTab(TabContents* tab_contents); 20 static InfoBarService* ForTab(TabContents* tab_contents);
21 21
22 virtual ~InfoBarTabService() {} 22 virtual ~InfoBarService() {}
23 23
24 // Adds an InfoBar for the specified |delegate|. 24 // Adds an InfoBar for the specified |delegate|.
25 // 25 //
26 // If infobars are disabled for this tab or the tab already has a delegate 26 // If infobars are disabled for this tab or the tab already has a delegate
27 // which returns true for InfoBarDelegate::EqualsDelegate(delegate), 27 // which returns true for InfoBarDelegate::EqualsDelegate(delegate),
28 // |delegate| is closed immediately without being added. 28 // |delegate| is closed immediately without being added.
29 // 29 //
30 // Returns whether |delegate| was successfully added. 30 // Returns whether |delegate| was successfully added.
31 virtual bool AddInfoBar(InfoBarDelegate* delegate) = 0; 31 virtual bool AddInfoBar(InfoBarDelegate* delegate) = 0;
32 32
(...skipping 21 matching lines...) Expand all
54 // Returns the infobar at the given |index|. 54 // Returns the infobar at the given |index|.
55 // 55 //
56 // Warning: Does not sanity check |index|. 56 // Warning: Does not sanity check |index|.
57 virtual InfoBarDelegate* GetInfoBarDelegateAt(size_t index) = 0; 57 virtual InfoBarDelegate* GetInfoBarDelegateAt(size_t index) = 0;
58 58
59 // Retrieve the WebContents for the tab this service is associated with. 59 // Retrieve the WebContents for the tab this service is associated with.
60 virtual content::WebContents* GetWebContents() = 0; 60 virtual content::WebContents* GetWebContents() = 0;
61 }; 61 };
62 62
63 #endif // CHROME_BROWSER_API_INFOBARS_INFOBAR_TAB_SERVICE_H_ 63 #endif // CHROME_BROWSER_API_INFOBARS_INFOBAR_TAB_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/api/infobars/infobar_delegate.cc ('k') | chrome/browser/api/infobars/infobar_tab_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698