| 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 #include "chrome/browser/instant/instant_loader.h" | 5 #include "chrome/browser/instant/instant_loader.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} | 269 virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} |
| 270 virtual void ContentsMouseEvent( | 270 virtual void ContentsMouseEvent( |
| 271 TabContents* source, const gfx::Point& location, bool motion) {} | 271 TabContents* source, const gfx::Point& location, bool motion) {} |
| 272 virtual void ContentsZoomChange(bool zoom_in) {} | 272 virtual void ContentsZoomChange(bool zoom_in) {} |
| 273 virtual void OnContentSettingsChange(TabContents* source) {} | 273 virtual void OnContentSettingsChange(TabContents* source) {} |
| 274 virtual bool IsApplication() const { return false; } | 274 virtual bool IsApplication() const { return false; } |
| 275 virtual void ConvertContentsToApplication(TabContents* source) {} | 275 virtual void ConvertContentsToApplication(TabContents* source) {} |
| 276 virtual bool CanReloadContents(TabContents* source) const { return true; } | 276 virtual bool CanReloadContents(TabContents* source) const { return true; } |
| 277 virtual void ShowHtmlDialog(HtmlDialogUIDelegate* delegate, | 277 virtual void ShowHtmlDialog(HtmlDialogUIDelegate* delegate, |
| 278 gfx::NativeWindow parent_window) {} | 278 gfx::NativeWindow parent_window) {} |
| 279 virtual bool ShouldSuppressDialogs() { |
| 280 // Any message shown during instant cancels instant, so we suppress them. |
| 281 return true; |
| 282 } |
| 279 virtual void BeforeUnloadFired(TabContents* tab, | 283 virtual void BeforeUnloadFired(TabContents* tab, |
| 280 bool proceed, | 284 bool proceed, |
| 281 bool* proceed_to_fire_unload) {} | 285 bool* proceed_to_fire_unload) {} |
| 282 virtual void ForwardMessageToExternalHost(const std::string& message, | 286 virtual void ForwardMessageToExternalHost(const std::string& message, |
| 283 const std::string& origin, | 287 const std::string& origin, |
| 284 const std::string& target) {} | 288 const std::string& target) {} |
| 285 virtual bool IsExternalTabContainer() const { return false; } | 289 virtual bool IsExternalTabContainer() const { return false; } |
| 286 virtual void SetFocusToLocationBar(bool select_all) {} | 290 virtual void SetFocusToLocationBar(bool select_all) {} |
| 287 virtual bool ShouldFocusPageAfterCrash() { return false; } | 291 virtual bool ShouldFocusPageAfterCrash() { return false; } |
| 288 virtual void RenderWidgetShowing() {} | 292 virtual void RenderWidgetShowing() {} |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 SetTakesFocusOnlyOnMouseDown(true); | 782 SetTakesFocusOnlyOnMouseDown(true); |
| 779 } | 783 } |
| 780 registrar_.Add( | 784 registrar_.Add( |
| 781 this, | 785 this, |
| 782 NotificationType::RENDER_VIEW_HOST_CHANGED, | 786 NotificationType::RENDER_VIEW_HOST_CHANGED, |
| 783 Source<NavigationController>(&preview_contents_->controller())); | 787 Source<NavigationController>(&preview_contents_->controller())); |
| 784 #endif | 788 #endif |
| 785 | 789 |
| 786 preview_contents_->tab_contents()->ShowContents(); | 790 preview_contents_->tab_contents()->ShowContents(); |
| 787 } | 791 } |
| OLD | NEW |