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

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

Issue 10843071: Create chrome/browser/api directory. Move infobar delegates used by Autofill to the directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_TAB_CONTENTS_LINK_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_LINK_INFOBAR_DELEGATE_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/string16.h"
11 #include "chrome/browser/infobars/infobar_delegate.h"
12
13 class InfoBarTabHelper;
14
15 // An interface derived from InfoBarDelegate implemented by objects wishing to
16 // control a LinkInfoBar.
17 class LinkInfoBarDelegate : public InfoBarDelegate {
18 public:
19 // Returns the message string to be displayed in the InfoBar. |link_offset|
20 // is the position where the link should be inserted.
21 virtual string16 GetMessageTextWithOffset(size_t* link_offset) const = 0;
22
23 // Returns the text of the link to be displayed.
24 virtual string16 GetLinkText() const = 0;
25
26 // Called when the Link is clicked. The |disposition| specifies how the
27 // resulting document should be loaded (based on the event flags present when
28 // the link was clicked). If this function returns true, the infobar is then
29 // immediately closed. Subclasses MUST NOT return true if in handling this
30 // call something triggers the infobar to begin closing.
31 virtual bool LinkClicked(WindowOpenDisposition disposition);
32
33 protected:
34 explicit LinkInfoBarDelegate(InfoBarTabHelper* infobar_helper);
35 virtual ~LinkInfoBarDelegate();
36
37 private:
38 // InfoBarDelegate:
39 virtual InfoBar* CreateInfoBar(InfoBarTabHelper* infobar_helper) OVERRIDE;
40 virtual LinkInfoBarDelegate* AsLinkInfoBarDelegate() OVERRIDE;
41
42 DISALLOW_COPY_AND_ASSIGN(LinkInfoBarDelegate);
43 };
44
45 #endif // CHROME_BROWSER_TAB_CONTENTS_LINK_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/insecure_content_infobar_delegate.cc ('k') | chrome/browser/tab_contents/link_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698