| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/tab_contents/tab_contents_delegate.h" | |
| 6 | |
| 7 #include "chrome/common/url_constants.h" | |
| 8 #include "ui/gfx/rect.h" | |
| 9 | |
| 10 std::string TabContentsDelegate::GetNavigationHeaders(const GURL& url) { | |
| 11 return std::string(); | |
| 12 } | |
| 13 | |
| 14 void TabContentsDelegate::LoadProgressChanged(double progress) { | |
| 15 } | |
| 16 | |
| 17 void TabContentsDelegate::DetachContents(TabContents* source) { | |
| 18 } | |
| 19 | |
| 20 bool TabContentsDelegate::IsPopup(const TabContents* source) const { | |
| 21 return false; | |
| 22 } | |
| 23 | |
| 24 TabContents* TabContentsDelegate::GetConstrainingContents(TabContents* source) { | |
| 25 return source; | |
| 26 } | |
| 27 | |
| 28 bool TabContentsDelegate::ShouldFocusConstrainedWindow() { | |
| 29 return true; | |
| 30 } | |
| 31 | |
| 32 void TabContentsDelegate::WillShowConstrainedWindow(TabContents* source) { | |
| 33 } | |
| 34 | |
| 35 void TabContentsDelegate::ContentsMouseEvent( | |
| 36 TabContents* source, const gfx::Point& location, bool motion) { | |
| 37 } | |
| 38 | |
| 39 void TabContentsDelegate::ContentsZoomChange(bool zoom_in) { } | |
| 40 | |
| 41 void TabContentsDelegate::OnContentSettingsChange(TabContents* source) { } | |
| 42 | |
| 43 bool TabContentsDelegate::IsApplication() const { return false; } | |
| 44 | |
| 45 void TabContentsDelegate::ConvertContentsToApplication(TabContents* source) { } | |
| 46 | |
| 47 bool TabContentsDelegate::CanReloadContents(TabContents* source) const { | |
| 48 return true; | |
| 49 } | |
| 50 | |
| 51 void TabContentsDelegate::ShowHtmlDialog(HtmlDialogUIDelegate* delegate, | |
| 52 gfx::NativeWindow parent_window) { | |
| 53 } | |
| 54 | |
| 55 void TabContentsDelegate::WillRunBeforeUnloadConfirm() { | |
| 56 } | |
| 57 | |
| 58 bool TabContentsDelegate::ShouldSuppressDialogs() { | |
| 59 return false; | |
| 60 } | |
| 61 | |
| 62 void TabContentsDelegate::BeforeUnloadFired(TabContents* tab, | |
| 63 bool proceed, | |
| 64 bool* proceed_to_fire_unload) { | |
| 65 *proceed_to_fire_unload = true; | |
| 66 } | |
| 67 | |
| 68 void TabContentsDelegate::ForwardMessageToExternalHost( | |
| 69 const std::string& message, | |
| 70 const std::string& origin, | |
| 71 const std::string& target) { | |
| 72 } | |
| 73 | |
| 74 bool TabContentsDelegate::IsExternalTabContainer() const { return false; } | |
| 75 | |
| 76 void TabContentsDelegate::SetFocusToLocationBar(bool select_all) {} | |
| 77 | |
| 78 bool TabContentsDelegate::ShouldFocusPageAfterCrash() { | |
| 79 return true; | |
| 80 } | |
| 81 | |
| 82 void TabContentsDelegate::RenderWidgetShowing() {} | |
| 83 | |
| 84 bool TabContentsDelegate::TakeFocus(bool reverse) { | |
| 85 return false; | |
| 86 } | |
| 87 | |
| 88 void TabContentsDelegate::LostCapture() { | |
| 89 } | |
| 90 | |
| 91 void TabContentsDelegate::SetTabContentBlocked( | |
| 92 TabContents* contents, bool blocked) { | |
| 93 } | |
| 94 | |
| 95 void TabContentsDelegate::TabContentsFocused(TabContents* tab_content) { | |
| 96 } | |
| 97 | |
| 98 int TabContentsDelegate::GetExtraRenderViewHeight() const { | |
| 99 return 0; | |
| 100 } | |
| 101 | |
| 102 bool TabContentsDelegate::CanDownload(int request_id) { | |
| 103 return true; | |
| 104 } | |
| 105 | |
| 106 void TabContentsDelegate::OnStartDownload(DownloadItem* download, | |
| 107 TabContents* tab) { | |
| 108 } | |
| 109 | |
| 110 bool TabContentsDelegate::HandleContextMenu(const ContextMenuParams& params) { | |
| 111 return false; | |
| 112 } | |
| 113 | |
| 114 bool TabContentsDelegate::ExecuteContextMenuCommand(int command) { | |
| 115 return false; | |
| 116 } | |
| 117 | |
| 118 void TabContentsDelegate::ShowPageInfo(Profile* profile, | |
| 119 const GURL& url, | |
| 120 const NavigationEntry::SSLStatus& ssl, | |
| 121 bool show_history) { | |
| 122 } | |
| 123 | |
| 124 void TabContentsDelegate::ViewSourceForTab(TabContents* source, | |
| 125 const GURL& page_url) { | |
| 126 // Fall back implementation based entirely on the view-source scheme. | |
| 127 // It suffers from http://crbug.com/523 and that is why browser overrides | |
| 128 // it with proper implementation. | |
| 129 GURL url = GURL(chrome::kViewSourceScheme + std::string(":") + | |
| 130 page_url.spec()); | |
| 131 OpenURLFromTab(source, | |
| 132 url, | |
| 133 GURL(), | |
| 134 NEW_FOREGROUND_TAB, | |
| 135 PageTransition::LINK); | |
| 136 } | |
| 137 | |
| 138 bool TabContentsDelegate::PreHandleKeyboardEvent( | |
| 139 const NativeWebKeyboardEvent& event, | |
| 140 bool* is_keyboard_shortcut) { | |
| 141 return false; | |
| 142 } | |
| 143 | |
| 144 void TabContentsDelegate::HandleKeyboardEvent( | |
| 145 const NativeWebKeyboardEvent& event) { | |
| 146 } | |
| 147 | |
| 148 void TabContentsDelegate::HandleMouseUp() { | |
| 149 } | |
| 150 | |
| 151 void TabContentsDelegate::HandleMouseActivate() { | |
| 152 } | |
| 153 | |
| 154 void TabContentsDelegate::DragEnded() { | |
| 155 } | |
| 156 | |
| 157 void TabContentsDelegate::ShowRepostFormWarningDialog( | |
| 158 TabContents* tab_contents) { | |
| 159 } | |
| 160 | |
| 161 void TabContentsDelegate::ShowContentSettingsWindow( | |
| 162 ContentSettingsType content_type) { | |
| 163 } | |
| 164 | |
| 165 void TabContentsDelegate::ShowCollectedCookiesDialog( | |
| 166 TabContents* tab_contents) { | |
| 167 } | |
| 168 | |
| 169 bool TabContentsDelegate::OnGoToEntryOffset(int offset) { | |
| 170 return true; | |
| 171 } | |
| 172 | |
| 173 bool TabContentsDelegate::ShouldAddNavigationToHistory( | |
| 174 const history::HistoryAddPageArgs& add_page_args, | |
| 175 NavigationType::Type navigation_type) { | |
| 176 return true; | |
| 177 } | |
| 178 | |
| 179 void TabContentsDelegate::OnDidGetApplicationInfo(TabContents* tab_contents, | |
| 180 int32 page_id) { | |
| 181 } | |
| 182 | |
| 183 // Notification when an application programmatically requests installation. | |
| 184 void TabContentsDelegate::OnInstallApplication( | |
| 185 TabContents* tab_contents, | |
| 186 const WebApplicationInfo& app_info) { | |
| 187 } | |
| 188 | |
| 189 gfx::NativeWindow TabContentsDelegate::GetFrameNativeWindow() { | |
| 190 return NULL; | |
| 191 } | |
| 192 | |
| 193 void TabContentsDelegate::TabContentsCreated(TabContents* new_contents) { | |
| 194 } | |
| 195 | |
| 196 bool TabContentsDelegate::infobars_enabled() { | |
| 197 return true; | |
| 198 } | |
| 199 | |
| 200 bool TabContentsDelegate::ShouldEnablePreferredSizeNotifications() { | |
| 201 return false; | |
| 202 } | |
| 203 | |
| 204 void TabContentsDelegate::UpdatePreferredSize(const gfx::Size& pref_size) { | |
| 205 } | |
| 206 | |
| 207 void TabContentsDelegate::OnSetSuggestions( | |
| 208 int32 page_id, | |
| 209 const std::vector<std::string>& suggestions) { | |
| 210 } | |
| 211 | |
| 212 void TabContentsDelegate::OnInstantSupportDetermined(int32 page_id, | |
| 213 bool result) { | |
| 214 } | |
| 215 | |
| 216 void TabContentsDelegate::ContentRestrictionsChanged(TabContents* source) { | |
| 217 } | |
| 218 | |
| 219 bool TabContentsDelegate::ShouldShowHungRendererDialog() { | |
| 220 return true; | |
| 221 } | |
| 222 | |
| 223 TabContentsDelegate::~TabContentsDelegate() { | |
| 224 } | |
| OLD | NEW |