OLD | NEW |
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_GOOGLE_GOOGLE_URL_TRACKER_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ |
6 #define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ | 6 #define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 // code can subclass it. | 163 // code can subclass it. |
164 class GoogleURLTrackerInfoBarDelegate : public ConfirmInfoBarDelegate { | 164 class GoogleURLTrackerInfoBarDelegate : public ConfirmInfoBarDelegate { |
165 public: | 165 public: |
166 GoogleURLTrackerInfoBarDelegate(TabContents* tab_contents, | 166 GoogleURLTrackerInfoBarDelegate(TabContents* tab_contents, |
167 GoogleURLTracker* google_url_tracker, | 167 GoogleURLTracker* google_url_tracker, |
168 const GURL& new_google_url); | 168 const GURL& new_google_url); |
169 | 169 |
170 // ConfirmInfoBarDelegate: | 170 // ConfirmInfoBarDelegate: |
171 virtual bool Accept() OVERRIDE; | 171 virtual bool Accept() OVERRIDE; |
172 virtual bool Cancel() OVERRIDE; | 172 virtual bool Cancel() OVERRIDE; |
| 173 virtual string16 GetLinkText() const OVERRIDE; |
| 174 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; |
173 | 175 |
174 protected: | 176 protected: |
175 virtual ~GoogleURLTrackerInfoBarDelegate(); | 177 virtual ~GoogleURLTrackerInfoBarDelegate(); |
176 | 178 |
177 GoogleURLTracker* google_url_tracker_; | 179 GoogleURLTracker* google_url_tracker_; |
178 const GURL new_google_url_; | 180 const GURL new_google_url_; |
179 | 181 |
180 private: | 182 private: |
181 // ConfirmInfoBarDelegate: | 183 // ConfirmInfoBarDelegate: |
182 virtual string16 GetMessageText() const OVERRIDE; | 184 virtual string16 GetMessageText() const OVERRIDE; |
183 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | 185 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
184 | 186 |
| 187 // Returns the portion of the appropriate hostname to display. |
| 188 string16 GetHost(bool new_host) const; |
| 189 |
| 190 TabContents* tab_contents_; |
| 191 |
185 DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerInfoBarDelegate); | 192 DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerInfoBarDelegate); |
186 }; | 193 }; |
187 | 194 |
188 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ | 195 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ |
OLD | NEW |