| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_INTERSTITIAL_PAGE_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gfx/size.h" | 10 #include "base/gfx/size.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 virtual void DontProceed(); | 67 virtual void DontProceed(); |
| 68 | 68 |
| 69 // Sub-classes should call this method when the user has chosen to proceed to | 69 // Sub-classes should call this method when the user has chosen to proceed to |
| 70 // the target URL. | 70 // the target URL. |
| 71 // Warning: 'this' has been deleted when this method returns. | 71 // Warning: 'this' has been deleted when this method returns. |
| 72 virtual void Proceed(); | 72 virtual void Proceed(); |
| 73 | 73 |
| 74 // Sizes the RenderViewHost showing the actual interstitial page contents. | 74 // Sizes the RenderViewHost showing the actual interstitial page contents. |
| 75 void SetSize(const gfx::Size& size); | 75 void SetSize(const gfx::Size& size); |
| 76 | 76 |
| 77 bool action_taken() const { return action_taken_; } |
| 78 |
| 77 protected: | 79 protected: |
| 78 // NotificationObserver method: | 80 // NotificationObserver method: |
| 79 virtual void Observe(NotificationType type, | 81 virtual void Observe(NotificationType type, |
| 80 const NotificationSource& source, | 82 const NotificationSource& source, |
| 81 const NotificationDetails& details); | 83 const NotificationDetails& details); |
| 82 | 84 |
| 83 // RenderViewHostDelegate implementation: | 85 // RenderViewHostDelegate implementation: |
| 84 virtual Profile* GetProfile() const; | 86 virtual Profile* GetProfile() const; |
| 85 virtual WebPreferences GetWebkitPrefs() { | 87 virtual WebPreferences GetWebkitPrefs() { |
| 86 return WebPreferences(); | 88 return WebPreferences(); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 181 |
| 180 // We keep a map of the various blocking pages shown as the UI tests need to | 182 // We keep a map of the various blocking pages shown as the UI tests need to |
| 181 // be able to retrieve them. | 183 // be able to retrieve them. |
| 182 typedef std::map<WebContents*,InterstitialPage*> InterstitialPageMap; | 184 typedef std::map<WebContents*,InterstitialPage*> InterstitialPageMap; |
| 183 static InterstitialPageMap* tab_to_interstitial_page_; | 185 static InterstitialPageMap* tab_to_interstitial_page_; |
| 184 | 186 |
| 185 DISALLOW_COPY_AND_ASSIGN(InterstitialPage); | 187 DISALLOW_COPY_AND_ASSIGN(InterstitialPage); |
| 186 }; | 188 }; |
| 187 | 189 |
| 188 #endif // #ifndef CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ | 190 #endif // #ifndef CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ |
| OLD | NEW |