| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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/ui/tab_contents/tab_contents_wrapper.h" | 5 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 | 582 |
| 583 //////////////////////////////////////////////////////////////////////////////// | 583 //////////////////////////////////////////////////////////////////////////////// |
| 584 // TabContentsWrapper implementation: | 584 // TabContentsWrapper implementation: |
| 585 | 585 |
| 586 void TabContentsWrapper::RenderViewCreated(RenderViewHost* render_view_host) { | 586 void TabContentsWrapper::RenderViewCreated(RenderViewHost* render_view_host) { |
| 587 UpdateAlternateErrorPageURL(render_view_host); | 587 UpdateAlternateErrorPageURL(render_view_host); |
| 588 } | 588 } |
| 589 | 589 |
| 590 void TabContentsWrapper::DidBecomeSelected() { | 590 void TabContentsWrapper::DidBecomeSelected() { |
| 591 WebCacheManager::GetInstance()->ObserveActivity( | 591 WebCacheManager::GetInstance()->ObserveActivity( |
| 592 tab_contents()->GetRenderProcessHost()->id()); | 592 tab_contents()->GetRenderProcessHost()->GetID()); |
| 593 } | 593 } |
| 594 | 594 |
| 595 bool TabContentsWrapper::OnMessageReceived(const IPC::Message& message) { | 595 bool TabContentsWrapper::OnMessageReceived(const IPC::Message& message) { |
| 596 bool handled = true; | 596 bool handled = true; |
| 597 IPC_BEGIN_MESSAGE_MAP(TabContentsWrapper, message) | 597 IPC_BEGIN_MESSAGE_MAP(TabContentsWrapper, message) |
| 598 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_Snapshot, OnSnapshot) | 598 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_Snapshot, OnSnapshot) |
| 599 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_PDFHasUnsupportedFeature, | 599 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_PDFHasUnsupportedFeature, |
| 600 OnPDFHasUnsupportedFeature) | 600 OnPDFHasUnsupportedFeature) |
| 601 IPC_MESSAGE_UNHANDLED(handled = false) | 601 IPC_MESSAGE_UNHANDLED(handled = false) |
| 602 IPC_END_MESSAGE_MAP() | 602 IPC_END_MESSAGE_MAP() |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 render_view_host()->Send( | 713 render_view_host()->Send( |
| 714 new ChromeViewMsg_SetClientSidePhishingDetection(routing_id(), | 714 new ChromeViewMsg_SetClientSidePhishingDetection(routing_id(), |
| 715 safe_browsing)); | 715 safe_browsing)); |
| 716 #endif | 716 #endif |
| 717 } | 717 } |
| 718 | 718 |
| 719 void TabContentsWrapper::ExitFullscreenMode() { | 719 void TabContentsWrapper::ExitFullscreenMode() { |
| 720 if (tab_contents() && render_view_host()) | 720 if (tab_contents() && render_view_host()) |
| 721 tab_contents()->render_view_host()->ExitFullscreen(); | 721 tab_contents()->render_view_host()->ExitFullscreen(); |
| 722 } | 722 } |
| OLD | NEW |