OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/tab_contents.h" | 5 #include "chrome/browser/tab_contents/tab_contents.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1845 if (!render_manager_.dom_ui()) { | 1845 if (!render_manager_.dom_ui()) { |
1846 // We shouldn't get a DOM UI message when we haven't enabled the DOM UI. | 1846 // We shouldn't get a DOM UI message when we haven't enabled the DOM UI. |
1847 // Because the renderer might be owned and sending random messages, we need | 1847 // Because the renderer might be owned and sending random messages, we need |
1848 // to ignore these inproper ones. | 1848 // to ignore these inproper ones. |
1849 NOTREACHED(); | 1849 NOTREACHED(); |
1850 return; | 1850 return; |
1851 } | 1851 } |
1852 render_manager_.dom_ui()->ProcessDOMUIMessage(message, content); | 1852 render_manager_.dom_ui()->ProcessDOMUIMessage(message, content); |
1853 } | 1853 } |
1854 | 1854 |
| 1855 void TabContents::DocumentLoadedInFrame() { |
| 1856 controller_.DocumentLoadedInFrame(); |
| 1857 } |
| 1858 |
1855 void TabContents::ProcessExternalHostMessage(const std::string& message, | 1859 void TabContents::ProcessExternalHostMessage(const std::string& message, |
1856 const std::string& origin, | 1860 const std::string& origin, |
1857 const std::string& target) { | 1861 const std::string& target) { |
1858 if (delegate()) | 1862 if (delegate()) |
1859 delegate()->ForwardMessageToExternalHost(message, origin, target); | 1863 delegate()->ForwardMessageToExternalHost(message, origin, target); |
1860 } | 1864 } |
1861 | 1865 |
1862 void TabContents::GoToEntryAtOffset(int offset) { | 1866 void TabContents::GoToEntryAtOffset(int offset) { |
1863 controller_.GoToOffset(offset); | 1867 controller_.GoToOffset(offset); |
1864 } | 1868 } |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2181 &GearsCreateShortcutCallbackFunctor::Run)); | 2185 &GearsCreateShortcutCallbackFunctor::Run)); |
2182 } | 2186 } |
2183 | 2187 |
2184 void TabContents::OnUserGesture() { | 2188 void TabContents::OnUserGesture() { |
2185 // See comment in RenderViewHostDelegate::OnUserGesture as to why we do this. | 2189 // See comment in RenderViewHostDelegate::OnUserGesture as to why we do this. |
2186 #if defined(OS_WIN) || defined(OS_LINUX) | 2190 #if defined(OS_WIN) || defined(OS_LINUX) |
2187 DownloadRequestManager* drm = g_browser_process->download_request_manager(); | 2191 DownloadRequestManager* drm = g_browser_process->download_request_manager(); |
2188 if (drm) | 2192 if (drm) |
2189 drm->OnUserGesture(this); | 2193 drm->OnUserGesture(this); |
2190 #endif | 2194 #endif |
| 2195 controller_.OnUserGesture(); |
2191 } | 2196 } |
2192 | 2197 |
2193 void TabContents::OnFindReply(int request_id, | 2198 void TabContents::OnFindReply(int request_id, |
2194 int number_of_matches, | 2199 int number_of_matches, |
2195 const gfx::Rect& selection_rect, | 2200 const gfx::Rect& selection_rect, |
2196 int active_match_ordinal, | 2201 int active_match_ordinal, |
2197 bool final_update) { | 2202 bool final_update) { |
2198 // Ignore responses for requests other than the one we have most recently | 2203 // Ignore responses for requests other than the one we have most recently |
2199 // issued. That way we won't act on stale results when the user has | 2204 // issued. That way we won't act on stale results when the user has |
2200 // already typed in another query. | 2205 // already typed in another query. |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2330 NavigationController::LoadCommittedDetails& committed_details = | 2335 NavigationController::LoadCommittedDetails& committed_details = |
2331 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); | 2336 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); |
2332 ExpireInfoBars(committed_details); | 2337 ExpireInfoBars(committed_details); |
2333 break; | 2338 break; |
2334 } | 2339 } |
2335 | 2340 |
2336 default: | 2341 default: |
2337 NOTREACHED(); | 2342 NOTREACHED(); |
2338 } | 2343 } |
2339 } | 2344 } |
OLD | NEW |