| 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/tab_contents/match_preview.h" | 5 #include "chrome/browser/tab_contents/match_preview.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "chrome/browser/tab_contents/navigation_controller.h" | 10 #include "chrome/browser/tab_contents/navigation_controller.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 virtual void NavigationStateChanged(const TabContents* source, | 30 virtual void NavigationStateChanged(const TabContents* source, |
| 31 unsigned changed_flags) {} | 31 unsigned changed_flags) {} |
| 32 virtual void AddNewContents(TabContents* source, | 32 virtual void AddNewContents(TabContents* source, |
| 33 TabContents* new_contents, | 33 TabContents* new_contents, |
| 34 WindowOpenDisposition disposition, | 34 WindowOpenDisposition disposition, |
| 35 const gfx::Rect& initial_pos, | 35 const gfx::Rect& initial_pos, |
| 36 bool user_gesture) {} | 36 bool user_gesture) {} |
| 37 virtual void ActivateContents(TabContents* contents) { | 37 virtual void ActivateContents(TabContents* contents) { |
| 38 match_preview_->CommitCurrentPreview(); | 38 match_preview_->CommitCurrentPreview(); |
| 39 } | 39 } |
| 40 virtual void DeactivateContents(TabContents* contents) {} | |
| 41 virtual void LoadingStateChanged(TabContents* source) {} | 40 virtual void LoadingStateChanged(TabContents* source) {} |
| 42 virtual void CloseContents(TabContents* source) {} | 41 virtual void CloseContents(TabContents* source) {} |
| 43 virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} | 42 virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} |
| 44 virtual void DetachContents(TabContents* source) {} | 43 virtual void DetachContents(TabContents* source) {} |
| 45 virtual bool IsPopup(const TabContents* source) const { | 44 virtual bool IsPopup(const TabContents* source) const { |
| 46 return false; | 45 return false; |
| 47 } | 46 } |
| 48 virtual TabContents* GetConstrainingContents(TabContents* source) { | 47 virtual TabContents* GetConstrainingContents(TabContents* source) { |
| 49 return NULL; | 48 return NULL; |
| 50 } | 49 } |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 void MatchPreview::CommitCurrentPreview() { | 182 void MatchPreview::CommitCurrentPreview() { |
| 184 DCHECK(preview_contents_.get()); | 183 DCHECK(preview_contents_.get()); |
| 185 if (host_->delegate()) | 184 if (host_->delegate()) |
| 186 host_->delegate()->CommitMatchPreview(host_); | 185 host_->delegate()->CommitMatchPreview(host_); |
| 187 } | 186 } |
| 188 | 187 |
| 189 TabContents* MatchPreview::ReleasePreviewContents() { | 188 TabContents* MatchPreview::ReleasePreviewContents() { |
| 190 url_ = GURL(); | 189 url_ = GURL(); |
| 191 return preview_contents_.release(); | 190 return preview_contents_.release(); |
| 192 } | 191 } |
| OLD | NEW |