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: | |
Peter Kasting
2014/12/19 23:06:23
Why make these public instead of private?
Normall
sdefresne
2014/12/20 11:30:55
I need to make CreateConfirmInfoBar() public since
Peter Kasting
2014/12/22 19:22:05
It may not be good to make all clients use an Info
| |
49 int GetActiveEntryID() override; | |
50 scoped_ptr<infobars::InfoBar> CreateConfirmInfoBar( | |
51 scoped_ptr<ConfirmInfoBarDelegate> delegate) override; | |
52 | |
53 protected: | |
54 // InfoBarManager: | |
55 // TODO(droger): Remove these functions once infobar notifications are | |
56 // removed. See http://crbug.com/354380 | |
57 void NotifyInfoBarAdded(infobars::InfoBar* infobar) override; | |
58 void NotifyInfoBarRemoved(infobars::InfoBar* infobar, bool animate) override; | |
59 | |
48 private: | 60 private: |
49 friend class content::WebContentsUserData<InfoBarService>; | 61 friend class content::WebContentsUserData<InfoBarService>; |
50 | 62 |
51 explicit InfoBarService(content::WebContents* web_contents); | 63 explicit InfoBarService(content::WebContents* web_contents); |
52 ~InfoBarService() override; | 64 ~InfoBarService() override; |
53 | 65 |
54 // InfoBarManager: | |
55 int GetActiveEntryID() override; | |
56 // TODO(droger): Remove these functions once infobar notifications are | |
57 // removed. See http://crbug.com/354380 | |
58 void NotifyInfoBarAdded(infobars::InfoBar* infobar) override; | |
59 void NotifyInfoBarRemoved(infobars::InfoBar* infobar, bool animate) override; | |
60 | |
61 // content::WebContentsObserver: | 66 // content::WebContentsObserver: |
62 void RenderProcessGone(base::TerminationStatus status) override; | 67 void RenderProcessGone(base::TerminationStatus status) override; |
63 void DidStartNavigationToPendingEntry( | 68 void DidStartNavigationToPendingEntry( |
64 const GURL& url, | 69 const GURL& url, |
65 content::NavigationController::ReloadType reload_type) override; | 70 content::NavigationController::ReloadType reload_type) override; |
66 void NavigationEntryCommitted( | 71 void NavigationEntryCommitted( |
67 const content::LoadCommittedDetails& load_details) override; | 72 const content::LoadCommittedDetails& load_details) override; |
68 void WebContentsDestroyed() override; | 73 void WebContentsDestroyed() override; |
69 bool OnMessageReceived(const IPC::Message& message) override; | 74 bool OnMessageReceived(const IPC::Message& message) override; |
70 | 75 |
71 // Message handlers. | 76 // Message handlers. |
72 void OnDidBlockDisplayingInsecureContent(); | 77 void OnDidBlockDisplayingInsecureContent(); |
73 void OnDidBlockRunningInsecureContent(); | 78 void OnDidBlockRunningInsecureContent(); |
74 | 79 |
75 // See description in set_ignore_next_reload(). | 80 // See description in set_ignore_next_reload(). |
76 bool ignore_next_reload_; | 81 bool ignore_next_reload_; |
77 | 82 |
78 DISALLOW_COPY_AND_ASSIGN(InfoBarService); | 83 DISALLOW_COPY_AND_ASSIGN(InfoBarService); |
79 }; | 84 }; |
80 | 85 |
81 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_SERVICE_H_ | 86 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_SERVICE_H_ |
OLD | NEW |