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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 return false; | 103 return false; |
104 } | 104 } |
105 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} | 105 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} |
106 virtual void ShowRepostFormWarningDialog(TabContents* tab_contents) {} | 106 virtual void ShowRepostFormWarningDialog(TabContents* tab_contents) {} |
107 virtual void ShowContentSettingsWindow(ContentSettingsType content_type) {} | 107 virtual void ShowContentSettingsWindow(ContentSettingsType content_type) {} |
108 virtual void ShowCollectedCookiesDialog(TabContents* tab_contents) {} | 108 virtual void ShowCollectedCookiesDialog(TabContents* tab_contents) {} |
109 virtual bool OnGoToEntryOffset(int offset) { return false; } | 109 virtual bool OnGoToEntryOffset(int offset) { return false; } |
110 virtual bool ShouldAddNavigationsToHistory() const { return false; } | 110 virtual bool ShouldAddNavigationsToHistory() const { return false; } |
111 virtual void OnDidGetApplicationInfo(TabContents* tab_contents, | 111 virtual void OnDidGetApplicationInfo(TabContents* tab_contents, |
112 int32 page_id) {} | 112 int32 page_id) {} |
113 virtual Browser* GetBrowser() { return NULL; } | |
114 virtual gfx::NativeWindow GetFrameNativeWindow() { | 113 virtual gfx::NativeWindow GetFrameNativeWindow() { |
115 return match_preview_->host_->delegate() ? | 114 return match_preview_->host_->delegate() ? |
116 match_preview_->host_->delegate()->GetFrameNativeWindow() : NULL; | 115 match_preview_->host_->delegate()->GetFrameNativeWindow() : NULL; |
117 } | 116 } |
118 virtual void TabContentsCreated(TabContents* new_contents) {} | 117 virtual void TabContentsCreated(TabContents* new_contents) {} |
119 virtual bool infobars_enabled() { return false; } | 118 virtual bool infobars_enabled() { return false; } |
120 virtual bool ShouldEnablePreferredSizeNotifications() { return false; } | 119 virtual bool ShouldEnablePreferredSizeNotifications() { return false; } |
121 virtual void UpdatePreferredSize(const gfx::Size& pref_size) {} | 120 virtual void UpdatePreferredSize(const gfx::Size& pref_size) {} |
122 virtual void ContentTypeChanged(TabContents* source) {} | 121 virtual void ContentTypeChanged(TabContents* source) {} |
123 | 122 |
(...skipping 59 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 |