Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1008 !ShowingInterstitialPage() && | 1008 !ShowingInterstitialPage() && |
| 1009 !static_cast<RenderViewHostImpl*>( | 1009 !static_cast<RenderViewHostImpl*>( |
| 1010 GetRenderViewHost())->SuddenTerminationAllowed(); | 1010 GetRenderViewHost())->SuddenTerminationAllowed(); |
| 1011 } | 1011 } |
| 1012 | 1012 |
| 1013 void WebContentsImpl::DispatchBeforeUnload(bool for_cross_site_transition) { | 1013 void WebContentsImpl::DispatchBeforeUnload(bool for_cross_site_transition) { |
| 1014 static_cast<RenderFrameHostImpl*>(GetMainFrame())->DispatchBeforeUnload( | 1014 static_cast<RenderFrameHostImpl*>(GetMainFrame())->DispatchBeforeUnload( |
| 1015 for_cross_site_transition); | 1015 for_cross_site_transition); |
| 1016 } | 1016 } |
| 1017 | 1017 |
| 1018 void WebContentsImpl::SetTemporaryZoomSettings(bool temporary_zoom_settings) { | |
| 1019 temporary_zoom_settings_ = temporary_zoom_settings; | |
|
jam
2014/05/01 23:21:13
seems that HostZoomMap::SetTemporaryZoomLevel shou
| |
| 1020 } | |
| 1021 | |
| 1018 void WebContentsImpl::Stop() { | 1022 void WebContentsImpl::Stop() { |
| 1019 GetRenderManager()->Stop(); | 1023 GetRenderManager()->Stop(); |
| 1020 FOR_EACH_OBSERVER(WebContentsObserver, observers_, NavigationStopped()); | 1024 FOR_EACH_OBSERVER(WebContentsObserver, observers_, NavigationStopped()); |
| 1021 } | 1025 } |
| 1022 | 1026 |
| 1023 WebContents* WebContentsImpl::Clone() { | 1027 WebContents* WebContentsImpl::Clone() { |
| 1024 // We use our current SiteInstance since the cloned entry will use it anyway. | 1028 // We use our current SiteInstance since the cloned entry will use it anyway. |
| 1025 // We pass our own opener so that the cloned page can access it if it was | 1029 // We pass our own opener so that the cloned page can access it if it was |
| 1026 // before. | 1030 // before. |
| 1027 CreateParams create_params(GetBrowserContext(), GetSiteInstance()); | 1031 CreateParams create_params(GetBrowserContext(), GetSiteInstance()); |
| (...skipping 2839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3867 | 3871 |
| 3868 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3872 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
| 3869 if (!delegate_) | 3873 if (!delegate_) |
| 3870 return; | 3874 return; |
| 3871 const gfx::Size new_size = GetPreferredSize(); | 3875 const gfx::Size new_size = GetPreferredSize(); |
| 3872 if (new_size != old_size) | 3876 if (new_size != old_size) |
| 3873 delegate_->UpdatePreferredSize(this, new_size); | 3877 delegate_->UpdatePreferredSize(this, new_size); |
| 3874 } | 3878 } |
| 3875 | 3879 |
| 3876 } // namespace content | 3880 } // namespace content |
| OLD | NEW |