OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_ALTERNATE_NAV_URL_FETCHER_H_ | 5 #ifndef CHROME_BROWSER_ALTERNATE_NAV_URL_FETCHER_H_ |
6 #define CHROME_BROWSER_ALTERNATE_NAV_URL_FETCHER_H_ | 6 #define CHROME_BROWSER_ALTERNATE_NAV_URL_FETCHER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 // URLFetcher::Delegate | 50 // URLFetcher::Delegate |
51 virtual void OnURLFetchComplete(const URLFetcher* source, | 51 virtual void OnURLFetchComplete(const URLFetcher* source, |
52 const GURL& url, | 52 const GURL& url, |
53 const URLRequestStatus& status, | 53 const URLRequestStatus& status, |
54 int response_code, | 54 int response_code, |
55 const ResponseCookies& cookies, | 55 const ResponseCookies& cookies, |
56 const std::string& data); | 56 const std::string& data); |
57 | 57 |
58 // LinkInfoBarDelegate | 58 // LinkInfoBarDelegate |
59 virtual std::wstring GetMessageTextWithOffset(size_t* link_offset) const; | 59 virtual string16 GetMessageTextWithOffset(size_t* link_offset) const; |
60 virtual std::wstring GetLinkText() const; | 60 virtual string16 GetLinkText() const; |
61 virtual SkBitmap* GetIcon() const; | 61 virtual SkBitmap* GetIcon() const; |
62 virtual bool LinkClicked(WindowOpenDisposition disposition); | 62 virtual bool LinkClicked(WindowOpenDisposition disposition); |
63 virtual void InfoBarClosed(); | 63 virtual void InfoBarClosed(); |
64 | 64 |
65 private: | 65 private: |
66 // Sets |state_| to either SUCCEEDED or FAILED depending on the result of the | 66 // Sets |state_| to either SUCCEEDED or FAILED depending on the result of the |
67 // fetch. | 67 // fetch. |
68 void SetStatusFromURLFetch(const GURL& url, | 68 void SetStatusFromURLFetch(const GURL& url, |
69 const URLRequestStatus& status, | 69 const URLRequestStatus& status, |
70 int response_code); | 70 int response_code); |
(...skipping 10 matching lines...) Expand all Loading... |
81 | 81 |
82 // The TabContents the InfoBarDelegate was added to. | 82 // The TabContents the InfoBarDelegate was added to. |
83 TabContents* infobar_contents_; | 83 TabContents* infobar_contents_; |
84 | 84 |
85 NotificationRegistrar registrar_; | 85 NotificationRegistrar registrar_; |
86 | 86 |
87 DISALLOW_COPY_AND_ASSIGN(AlternateNavURLFetcher); | 87 DISALLOW_COPY_AND_ASSIGN(AlternateNavURLFetcher); |
88 }; | 88 }; |
89 | 89 |
90 #endif // CHROME_BROWSER_ALTERNATE_NAV_URL_FETCHER_H_ | 90 #endif // CHROME_BROWSER_ALTERNATE_NAV_URL_FETCHER_H_ |
OLD | NEW |