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

Side by Side Diff: chrome/browser/tab_contents/infobar_delegate.h

Issue 7324001: Revert 89864 - Don't rely on user gestures for deciding when to dismiss infobars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_TAB_CONTENTS_INFOBAR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_INFOBAR_DELEGATE_H_ 6 #define CHROME_BROWSER_TAB_CONTENTS_INFOBAR_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // Returns true if the supplied |delegate| is equal to this one. Equality is 51 // Returns true if the supplied |delegate| is equal to this one. Equality is
52 // left to the implementation to define. This function is called by the 52 // left to the implementation to define. This function is called by the
53 // TabContentsWrapper when determining whether or not a delegate should be 53 // TabContentsWrapper when determining whether or not a delegate should be
54 // added because a matching one already exists. If this function returns true, 54 // added because a matching one already exists. If this function returns true,
55 // the TabContentsWrapper will not add the new delegate because it considers 55 // the TabContentsWrapper will not add the new delegate because it considers
56 // one to already be present. 56 // one to already be present.
57 virtual bool EqualsDelegate(InfoBarDelegate* delegate) const; 57 virtual bool EqualsDelegate(InfoBarDelegate* delegate) const;
58 58
59 // Returns true if the InfoBar should be closed automatically after the page 59 // Returns true if the InfoBar should be closed automatically after the page
60 // is navigated. The default behavior is to return true if the 60 // is navigated. The default behavior is to return true if the user initiated
61 // navigation is to a new page (not including reloads). 61 // navigation somewhere else or reloaded.
62 virtual bool ShouldExpire( 62 virtual bool ShouldExpire(
63 const content::LoadCommittedDetails& details) const; 63 const content::LoadCommittedDetails& details) const;
64 64
65 // Called when the user clicks on the close button to dismiss the infobar. 65 // Called when the user clicks on the close button to dismiss the infobar.
66 virtual void InfoBarDismissed(); 66 virtual void InfoBarDismissed();
67 67
68 // Called after the InfoBar is closed. Deletes |this|. 68 // Called after the InfoBar is closed. Deletes |this|.
69 // TODO(pkasting): Get rid of this and delete delegates directly. 69 // TODO(pkasting): Get rid of this and delete delegates directly.
70 void InfoBarClosed(); 70 void InfoBarClosed();
71 71
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 private: 104 private:
105 // The unique id of the active NavigationEntry of the TabContents that we were 105 // The unique id of the active NavigationEntry of the TabContents that we were
106 // opened for. Used to help expire on navigations. 106 // opened for. Used to help expire on navigations.
107 int contents_unique_id_; 107 int contents_unique_id_;
108 108
109 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); 109 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate);
110 }; 110 };
111 111
112 #endif // CHROME_BROWSER_TAB_CONTENTS_INFOBAR_DELEGATE_H_ 112 #endif // CHROME_BROWSER_TAB_CONTENTS_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/confirm_infobar_delegate.cc ('k') | chrome/browser/tab_contents/infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698