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" |
11 #include "components/infobars/core/infobar_manager.h" | 11 #include "components/infobars/core/infobar_manager.h" |
12 #include "content/public/browser/web_contents_observer.h" | 12 #include "content/public/browser/web_contents_observer.h" |
13 #include "content/public/browser/web_contents_user_data.h" | 13 #include "content/public/browser/web_contents_user_data.h" |
| 14 #include "ui/base/window_open_disposition.h" |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 struct LoadCommittedDetails; | 17 struct LoadCommittedDetails; |
17 class WebContents; | 18 class WebContents; |
18 } | 19 } |
19 | 20 |
20 namespace infobars { | 21 namespace infobars { |
21 class InfoBar; | 22 class InfoBar; |
22 } | 23 } |
23 | 24 |
(...skipping 19 matching lines...) Expand all Loading... |
43 // This is useful for non-user triggered reloads that should not dismiss | 44 // 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 | 45 // infobars. For example, instant may trigger a reload when the google URL |
45 // changes. | 46 // changes. |
46 void set_ignore_next_reload() { ignore_next_reload_ = true; } | 47 void set_ignore_next_reload() { ignore_next_reload_ = true; } |
47 | 48 |
48 // InfoBarManager: | 49 // InfoBarManager: |
49 // TODO(sdefresne): Change clients to invoke this on infobars::InfoBarManager | 50 // TODO(sdefresne): Change clients to invoke this on infobars::InfoBarManager |
50 // and turn the method override private. | 51 // and turn the method override private. |
51 scoped_ptr<infobars::InfoBar> CreateConfirmInfoBar( | 52 scoped_ptr<infobars::InfoBar> CreateConfirmInfoBar( |
52 scoped_ptr<ConfirmInfoBarDelegate> delegate) override; | 53 scoped_ptr<ConfirmInfoBarDelegate> delegate) override; |
| 54 void OpenURL(const GURL& url, WindowOpenDisposition disposition) override; |
53 | 55 |
54 private: | 56 private: |
55 friend class content::WebContentsUserData<InfoBarService>; | 57 friend class content::WebContentsUserData<InfoBarService>; |
56 | 58 |
57 explicit InfoBarService(content::WebContents* web_contents); | 59 explicit InfoBarService(content::WebContents* web_contents); |
58 ~InfoBarService() override; | 60 ~InfoBarService() override; |
59 | 61 |
60 // InfoBarManager: | 62 // InfoBarManager: |
61 int GetActiveEntryID() override; | 63 int GetActiveEntryID() override; |
62 // TODO(droger): Remove these functions once infobar notifications are | 64 // TODO(droger): Remove these functions once infobar notifications are |
(...skipping 14 matching lines...) Expand all Loading... |
77 // Message handlers. | 79 // Message handlers. |
78 void OnDidBlockDisplayingInsecureContent(); | 80 void OnDidBlockDisplayingInsecureContent(); |
79 | 81 |
80 // See description in set_ignore_next_reload(). | 82 // See description in set_ignore_next_reload(). |
81 bool ignore_next_reload_; | 83 bool ignore_next_reload_; |
82 | 84 |
83 DISALLOW_COPY_AND_ASSIGN(InfoBarService); | 85 DISALLOW_COPY_AND_ASSIGN(InfoBarService); |
84 }; | 86 }; |
85 | 87 |
86 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_SERVICE_H_ | 88 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_SERVICE_H_ |
OLD | NEW |