OLD | NEW |
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_INFOBARS_INFOBAR_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_INFOBARS_INFOBAR_SERVICE_H_ |
6 #define CHROME_BROWSER_INFOBARS_INFOBAR_SERVICE_H_ | 6 #define CHROME_BROWSER_INFOBARS_INFOBAR_SERVICE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 infobars::InfoBar* infobar); | 38 infobars::InfoBar* infobar); |
39 | 39 |
40 // Makes it so the next reload is ignored. That is, if the next commit is a | 40 // Makes it so the next reload is ignored. That is, if the next commit is a |
41 // reload then it is treated as if nothing happened and no infobars are | 41 // reload then it is treated as if nothing happened and no infobars are |
42 // attempted to be closed. | 42 // attempted to be closed. |
43 // This is useful for non-user triggered reloads that should not dismiss | 43 // This is useful for non-user triggered reloads that should not dismiss |
44 // infobars. For example, instant may trigger a reload when the google URL | 44 // infobars. For example, instant may trigger a reload when the google URL |
45 // changes. | 45 // changes. |
46 void set_ignore_next_reload() { ignore_next_reload_ = true; } | 46 void set_ignore_next_reload() { ignore_next_reload_ = true; } |
47 | 47 |
| 48 // InfoBarManager: |
| 49 // TODO(sdefresne): Change clients to invoke this on infobars::InfoBarManager |
| 50 // and turn the method override private. |
| 51 scoped_ptr<infobars::InfoBar> CreateConfirmInfoBar( |
| 52 scoped_ptr<ConfirmInfoBarDelegate> delegate) override; |
| 53 |
48 private: | 54 private: |
49 friend class content::WebContentsUserData<InfoBarService>; | 55 friend class content::WebContentsUserData<InfoBarService>; |
50 | 56 |
51 explicit InfoBarService(content::WebContents* web_contents); | 57 explicit InfoBarService(content::WebContents* web_contents); |
52 ~InfoBarService() override; | 58 ~InfoBarService() override; |
53 | 59 |
54 // InfoBarManager: | 60 // InfoBarManager: |
55 int GetActiveEntryID() override; | 61 int GetActiveEntryID() override; |
56 // TODO(droger): Remove these functions once infobar notifications are | 62 // TODO(droger): Remove these functions once infobar notifications are |
57 // removed. See http://crbug.com/354380 | 63 // removed. See http://crbug.com/354380 |
(...skipping 14 matching lines...) Expand all Loading... |
72 void OnDidBlockDisplayingInsecureContent(); | 78 void OnDidBlockDisplayingInsecureContent(); |
73 void OnDidBlockRunningInsecureContent(); | 79 void OnDidBlockRunningInsecureContent(); |
74 | 80 |
75 // See description in set_ignore_next_reload(). | 81 // See description in set_ignore_next_reload(). |
76 bool ignore_next_reload_; | 82 bool ignore_next_reload_; |
77 | 83 |
78 DISALLOW_COPY_AND_ASSIGN(InfoBarService); | 84 DISALLOW_COPY_AND_ASSIGN(InfoBarService); |
79 }; | 85 }; |
80 | 86 |
81 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_SERVICE_H_ | 87 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_SERVICE_H_ |
OLD | NEW |