Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: components/infobars/core/confirm_infobar_delegate.h

Issue 1142153002: Simplify infobar expiry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android compile Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 COMPONENTS_INFOBARS_CORE_CONFIRM_INFOBAR_DELEGATE_H_ 5 #ifndef COMPONENTS_INFOBARS_CORE_CONFIRM_INFOBAR_DELEGATE_H_
6 #define COMPONENTS_INFOBARS_CORE_CONFIRM_INFOBAR_DELEGATE_H_ 6 #define COMPONENTS_INFOBARS_CORE_CONFIRM_INFOBAR_DELEGATE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "components/infobars/core/infobar_delegate.h" 10 #include "components/infobars/core/infobar_delegate.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // Called when the Link (if any) is clicked. The |disposition| specifies how 61 // Called when the Link (if any) is clicked. The |disposition| specifies how
62 // the resulting document should be loaded (based on the event flags present 62 // the resulting document should be loaded (based on the event flags present
63 // when the link was clicked). If this function returns true, the infobar is 63 // when the link was clicked). If this function returns true, the infobar is
64 // then immediately closed. Subclasses MUST NOT return true if in handling 64 // then immediately closed. Subclasses MUST NOT return true if in handling
65 // this call something triggers the infobar to begin closing. 65 // this call something triggers the infobar to begin closing.
66 virtual bool LinkClicked(WindowOpenDisposition disposition); 66 virtual bool LinkClicked(WindowOpenDisposition disposition);
67 67
68 protected: 68 protected:
69 ConfirmInfoBarDelegate(); 69 ConfirmInfoBarDelegate();
70 70
71 bool ShouldExpireInternal(const NavigationDetails& details) const override;
72
73 private: 71 private:
74 // InfoBarDelegate: 72 // InfoBarDelegate:
75 bool EqualsDelegate(infobars::InfoBarDelegate* delegate) const override; 73 bool EqualsDelegate(infobars::InfoBarDelegate* delegate) const override;
76 ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate() override; 74 ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate() override;
77 75
78 DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBarDelegate); 76 DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBarDelegate);
79 }; 77 };
80 78
81 #endif // COMPONENTS_INFOBARS_CORE_CONFIRM_INFOBAR_DELEGATE_H_ 79 #endif // COMPONENTS_INFOBARS_CORE_CONFIRM_INFOBAR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698