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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 private: | 48 private: |
49 friend class content::WebContentsUserData<InfoBarService>; | 49 friend class content::WebContentsUserData<InfoBarService>; |
50 | 50 |
51 explicit InfoBarService(content::WebContents* web_contents); | 51 explicit InfoBarService(content::WebContents* web_contents); |
52 virtual ~InfoBarService(); | 52 ~InfoBarService() override; |
53 | 53 |
54 // InfoBarManager: | 54 // InfoBarManager: |
55 virtual int GetActiveEntryID() override; | 55 int GetActiveEntryID() override; |
56 // TODO(droger): Remove these functions once infobar notifications are | 56 // TODO(droger): Remove these functions once infobar notifications are |
57 // removed. See http://crbug.com/354380 | 57 // removed. See http://crbug.com/354380 |
58 virtual void NotifyInfoBarAdded(infobars::InfoBar* infobar) override; | 58 void NotifyInfoBarAdded(infobars::InfoBar* infobar) override; |
59 virtual void NotifyInfoBarRemoved(infobars::InfoBar* infobar, | 59 void NotifyInfoBarRemoved(infobars::InfoBar* infobar, bool animate) override; |
60 bool animate) override; | |
61 | 60 |
62 // content::WebContentsObserver: | 61 // content::WebContentsObserver: |
63 virtual void RenderProcessGone(base::TerminationStatus status) override; | 62 void RenderProcessGone(base::TerminationStatus status) override; |
64 virtual void DidStartNavigationToPendingEntry( | 63 void DidStartNavigationToPendingEntry( |
65 const GURL& url, | 64 const GURL& url, |
66 content::NavigationController::ReloadType reload_type) override; | 65 content::NavigationController::ReloadType reload_type) override; |
67 virtual void NavigationEntryCommitted( | 66 void NavigationEntryCommitted( |
68 const content::LoadCommittedDetails& load_details) override; | 67 const content::LoadCommittedDetails& load_details) override; |
69 virtual void WebContentsDestroyed() override; | 68 void WebContentsDestroyed() override; |
70 virtual bool OnMessageReceived(const IPC::Message& message) override; | 69 bool OnMessageReceived(const IPC::Message& message) override; |
71 | 70 |
72 // Message handlers. | 71 // Message handlers. |
73 void OnDidBlockDisplayingInsecureContent(); | 72 void OnDidBlockDisplayingInsecureContent(); |
74 void OnDidBlockRunningInsecureContent(); | 73 void OnDidBlockRunningInsecureContent(); |
75 | 74 |
76 // See description in set_ignore_next_reload(). | 75 // See description in set_ignore_next_reload(). |
77 bool ignore_next_reload_; | 76 bool ignore_next_reload_; |
78 | 77 |
79 DISALLOW_COPY_AND_ASSIGN(InfoBarService); | 78 DISALLOW_COPY_AND_ASSIGN(InfoBarService); |
80 }; | 79 }; |
81 | 80 |
82 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_SERVICE_H_ | 81 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_SERVICE_H_ |
OLD | NEW |