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 <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // changes. | 47 // changes. |
48 void set_ignore_next_reload() { ignore_next_reload_ = true; } | 48 void set_ignore_next_reload() { ignore_next_reload_ = true; } |
49 | 49 |
50 // InfoBarManager: | 50 // InfoBarManager: |
51 // TODO(sdefresne): Change clients to invoke this on infobars::InfoBarManager | 51 // TODO(sdefresne): Change clients to invoke this on infobars::InfoBarManager |
52 // and turn the method override private. | 52 // and turn the method override private. |
53 std::unique_ptr<infobars::InfoBar> CreateConfirmInfoBar( | 53 std::unique_ptr<infobars::InfoBar> CreateConfirmInfoBar( |
54 std::unique_ptr<ConfirmInfoBarDelegate> delegate) override; | 54 std::unique_ptr<ConfirmInfoBarDelegate> delegate) override; |
55 void OpenURL(const GURL& url, WindowOpenDisposition disposition) override; | 55 void OpenURL(const GURL& url, WindowOpenDisposition disposition) override; |
56 | 56 |
| 57 // Message handlers. |
| 58 void OnDidBlockDisplayingInsecureContent(); |
| 59 |
57 private: | 60 private: |
58 friend class content::WebContentsUserData<InfoBarService>; | 61 friend class content::WebContentsUserData<InfoBarService>; |
59 | 62 |
60 explicit InfoBarService(content::WebContents* web_contents); | 63 explicit InfoBarService(content::WebContents* web_contents); |
61 ~InfoBarService() override; | 64 ~InfoBarService() override; |
62 | 65 |
63 // InfoBarManager: | 66 // InfoBarManager: |
64 int GetActiveEntryID() override; | 67 int GetActiveEntryID() override; |
65 // TODO(droger): Remove these functions once infobar notifications are | 68 // TODO(droger): Remove these functions once infobar notifications are |
66 // removed. See http://crbug.com/354380 | 69 // removed. See http://crbug.com/354380 |
67 void NotifyInfoBarAdded(infobars::InfoBar* infobar) override; | 70 void NotifyInfoBarAdded(infobars::InfoBar* infobar) override; |
68 void NotifyInfoBarRemoved(infobars::InfoBar* infobar, bool animate) override; | 71 void NotifyInfoBarRemoved(infobars::InfoBar* infobar, bool animate) override; |
69 | 72 |
70 // content::WebContentsObserver: | 73 // content::WebContentsObserver: |
71 void RenderProcessGone(base::TerminationStatus status) override; | 74 void RenderProcessGone(base::TerminationStatus status) override; |
72 void DidStartNavigationToPendingEntry( | 75 void DidStartNavigationToPendingEntry( |
73 const GURL& url, | 76 const GURL& url, |
74 content::NavigationController::ReloadType reload_type) override; | 77 content::NavigationController::ReloadType reload_type) override; |
75 void NavigationEntryCommitted( | 78 void NavigationEntryCommitted( |
76 const content::LoadCommittedDetails& load_details) override; | 79 const content::LoadCommittedDetails& load_details) override; |
77 void WebContentsDestroyed() override; | 80 void WebContentsDestroyed() override; |
78 bool OnMessageReceived(const IPC::Message& message) override; | 81 bool OnMessageReceived(const IPC::Message& message) override; |
79 | 82 |
80 // Message handlers. | |
81 void OnDidBlockDisplayingInsecureContent(); | |
82 | |
83 // See description in set_ignore_next_reload(). | 83 // See description in set_ignore_next_reload(). |
84 bool ignore_next_reload_; | 84 bool ignore_next_reload_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(InfoBarService); | 86 DISALLOW_COPY_AND_ASSIGN(InfoBarService); |
87 }; | 87 }; |
88 | 88 |
89 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_SERVICE_H_ | 89 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_SERVICE_H_ |
OLD | NEW |