| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_overlay.h" | 5 #include "chrome/browser/instant/instant_overlay.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/supports_user_data.h" | 8 #include "base/supports_user_data.h" |
| 9 #include "chrome/browser/ui/search/search.h" | 9 #include "chrome/browser/instant/search.h" |
| 10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 int kUserDataKey; | 14 int kUserDataKey; |
| 15 | 15 |
| 16 class InstantOverlayUserData : public base::SupportsUserData::Data { | 16 class InstantOverlayUserData : public base::SupportsUserData::Data { |
| 17 public: | 17 public: |
| 18 explicit InstantOverlayUserData(InstantOverlay* overlay) | 18 explicit InstantOverlayUserData(InstantOverlay* overlay) |
| 19 : overlay_(overlay) {} | 19 : overlay_(overlay) {} |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 DCHECK_NE(&loader_, overlay->GetDelegate()); | 162 DCHECK_NE(&loader_, overlay->GetDelegate()); |
| 163 return overlay->GetDelegate()->OpenURLFromTab(source, params); | 163 return overlay->GetDelegate()->OpenURLFromTab(source, params); |
| 164 } | 164 } |
| 165 return NULL; | 165 return NULL; |
| 166 } | 166 } |
| 167 | 167 |
| 168 void InstantOverlay::HandleStalePage() { | 168 void InstantOverlay::HandleStalePage() { |
| 169 is_stale_ = true; | 169 is_stale_ = true; |
| 170 instant_controller()->ReloadOverlayIfStale(); | 170 instant_controller()->ReloadOverlayIfStale(); |
| 171 } | 171 } |
| OLD | NEW |