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

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

Issue 6574011: Cleanup:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 "content/browser/tab_contents/infobar_delegate.h" 9 #include "content/browser/tab_contents/infobar_delegate.h"
10 10
11 // An interface derived from InfoBarDelegate implemented by objects wishing to 11 // An interface derived from InfoBarDelegate implemented by objects wishing to
12 // control a LinkInfoBar. 12 // control a LinkInfoBar.
13 class LinkInfoBarDelegate : public InfoBarDelegate { 13 class LinkInfoBarDelegate : public InfoBarDelegate {
14 public: 14 public:
15 // Returns the message string to be displayed in the InfoBar. |link_offset| 15 // Returns the message string to be displayed in the InfoBar. |link_offset|
16 // is the position where the link should be inserted. If |link_offset| is set 16 // is the position where the link should be inserted.
17 // to string16::npos (it is by default), the link is right aligned within 17 virtual string16 GetMessageTextWithOffset(size_t* link_offset) const = 0;
18 // the InfoBar rather than being embedded in the message text.
19 virtual string16 GetMessageTextWithOffset(size_t* link_offset) const;
20 18
21 // Returns the text of the link to be displayed. 19 // Returns the text of the link to be displayed.
22 virtual string16 GetLinkText() const = 0; 20 virtual string16 GetLinkText() const = 0;
23 21
24 // Called when the Link is clicked. The |disposition| specifies how the 22 // Called when the Link is clicked. The |disposition| specifies how the
25 // resulting document should be loaded (based on the event flags present when 23 // resulting document should be loaded (based on the event flags present when
26 // the link was clicked). This function returns true if the InfoBar should be 24 // the link was clicked). This function returns true if the InfoBar should be
27 // closed now or false if it should remain until the user explicitly closes 25 // closed now or false if it should remain until the user explicitly closes
28 // it. 26 // it.
29 virtual bool LinkClicked(WindowOpenDisposition disposition); 27 virtual bool LinkClicked(WindowOpenDisposition disposition);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 virtual int GetButtons() const; 115 virtual int GetButtons() const;
118 116
119 SkBitmap* icon_; 117 SkBitmap* icon_;
120 string16 message_; 118 string16 message_;
121 bool auto_expire_; // Should it expire automatically on navigation? 119 bool auto_expire_; // Should it expire automatically on navigation?
122 120
123 DISALLOW_COPY_AND_ASSIGN(SimpleAlertInfoBarDelegate); 121 DISALLOW_COPY_AND_ASSIGN(SimpleAlertInfoBarDelegate);
124 }; 122 };
125 123
126 #endif // CHROME_BROWSER_TAB_CONTENTS_INFOBAR_DELEGATE_H_ 124 #endif // CHROME_BROWSER_TAB_CONTENTS_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_cc_infobar_win.cc ('k') | chrome/browser/tab_contents/infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698