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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 private: | 72 private: |
73 friend class content::WebContentsUserData<InfoBarService>; | 73 friend class content::WebContentsUserData<InfoBarService>; |
74 | 74 |
75 typedef std::vector<InfoBarDelegate*> InfoBars; | 75 typedef std::vector<InfoBarDelegate*> InfoBars; |
76 | 76 |
77 explicit InfoBarService(content::WebContents* web_contents); | 77 explicit InfoBarService(content::WebContents* web_contents); |
78 virtual ~InfoBarService(); | 78 virtual ~InfoBarService(); |
79 | 79 |
80 // content::WebContentsObserver: | 80 // content::WebContentsObserver: |
81 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; | 81 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; |
82 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 82 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
83 | 83 |
84 // content::NotificationObserver: | 84 // content::NotificationObserver: |
85 virtual void Observe(int type, | 85 virtual void Observe(int type, |
86 const content::NotificationSource& source, | 86 const content::NotificationSource& source, |
87 const content::NotificationDetails& details) OVERRIDE; | 87 const content::NotificationDetails& details) OVERRIDE; |
88 | 88 |
89 void RemoveInfoBarInternal(InfoBarDelegate* delegate, bool animate); | 89 void RemoveInfoBarInternal(InfoBarDelegate* delegate, bool animate); |
90 void RemoveAllInfoBars(bool animate); | 90 void RemoveAllInfoBars(bool animate); |
91 | 91 |
92 // Message handlers. | 92 // Message handlers. |
93 void OnDidBlockDisplayingInsecureContent(); | 93 void OnDidBlockDisplayingInsecureContent(); |
94 void OnDidBlockRunningInsecureContent(); | 94 void OnDidBlockRunningInsecureContent(); |
95 | 95 |
96 // Delegates for InfoBars associated with this InfoBarService. | 96 // Delegates for InfoBars associated with this InfoBarService. |
97 InfoBars infobars_; | 97 InfoBars infobars_; |
98 bool infobars_enabled_; | 98 bool infobars_enabled_; |
99 | 99 |
100 content::NotificationRegistrar registrar_; | 100 content::NotificationRegistrar registrar_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(InfoBarService); | 102 DISALLOW_COPY_AND_ASSIGN(InfoBarService); |
103 }; | 103 }; |
104 | 104 |
105 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_SERVICE_H_ | 105 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_SERVICE_H_ |
OLD | NEW |