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) {} |
40 virtual void LoadingStateChanged(TabContents* source) {} | 41 virtual void LoadingStateChanged(TabContents* source) {} |
41 virtual void CloseContents(TabContents* source) {} | 42 virtual void CloseContents(TabContents* source) {} |
42 virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} | 43 virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} |
43 virtual void DetachContents(TabContents* source) {} | 44 virtual void DetachContents(TabContents* source) {} |
44 virtual bool IsPopup(const TabContents* source) const { | 45 virtual bool IsPopup(const TabContents* source) const { |
45 return false; | 46 return false; |
46 } | 47 } |
47 virtual TabContents* GetConstrainingContents(TabContents* source) { | 48 virtual TabContents* GetConstrainingContents(TabContents* source) { |
48 return NULL; | 49 return NULL; |
49 } | 50 } |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 void MatchPreview::CommitCurrentPreview() { | 183 void MatchPreview::CommitCurrentPreview() { |
183 DCHECK(preview_contents_.get()); | 184 DCHECK(preview_contents_.get()); |
184 if (host_->delegate()) | 185 if (host_->delegate()) |
185 host_->delegate()->CommitMatchPreview(host_); | 186 host_->delegate()->CommitMatchPreview(host_); |
186 } | 187 } |
187 | 188 |
188 TabContents* MatchPreview::ReleasePreviewContents() { | 189 TabContents* MatchPreview::ReleasePreviewContents() { |
189 url_ = GURL(); | 190 url_ = GURL(); |
190 return preview_contents_.release(); | 191 return preview_contents_.release(); |
191 } | 192 } |
OLD | NEW |