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 2114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2125 RenderViewHost* host = GetRenderViewHost(); | 2125 RenderViewHost* host = GetRenderViewHost(); |
2126 int id = StartDownload(host, url, is_favicon, max_bitmap_size); | 2126 int id = StartDownload(host, url, is_favicon, max_bitmap_size); |
2127 image_download_map_[id] = callback; | 2127 image_download_map_[id] = callback; |
2128 return id; | 2128 return id; |
2129 } | 2129 } |
2130 | 2130 |
2131 bool WebContentsImpl::IsSubframe() const { | 2131 bool WebContentsImpl::IsSubframe() const { |
2132 return is_subframe_; | 2132 return is_subframe_; |
2133 } | 2133 } |
2134 | 2134 |
| 2135 void WebContentsImpl::SetZoomLevel(double level) { |
| 2136 Send(new ViewMsg_SetZoomLevel(GetRoutingID(), level)); |
| 2137 BrowserPluginEmbedder* embedder = GetBrowserPluginEmbedder(); |
| 2138 if (embedder) |
| 2139 embedder->SetZoomLevel(level); |
| 2140 } |
| 2141 |
2135 void WebContentsImpl::Find(int request_id, | 2142 void WebContentsImpl::Find(int request_id, |
2136 const base::string16& search_text, | 2143 const base::string16& search_text, |
2137 const blink::WebFindOptions& options) { | 2144 const blink::WebFindOptions& options) { |
2138 Send(new ViewMsg_Find(GetRoutingID(), request_id, search_text, options)); | 2145 Send(new ViewMsg_Find(GetRoutingID(), request_id, search_text, options)); |
2139 } | 2146 } |
2140 | 2147 |
2141 void WebContentsImpl::StopFinding(StopFindAction action) { | 2148 void WebContentsImpl::StopFinding(StopFindAction action) { |
2142 Send(new ViewMsg_StopFinding(GetRoutingID(), action)); | 2149 Send(new ViewMsg_StopFinding(GetRoutingID(), action)); |
2143 } | 2150 } |
2144 | 2151 |
(...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3863 } | 3870 } |
3864 | 3871 |
3865 void WebContentsImpl::OnFrameRemoved( | 3872 void WebContentsImpl::OnFrameRemoved( |
3866 RenderViewHostImpl* render_view_host, | 3873 RenderViewHostImpl* render_view_host, |
3867 int64 frame_id) { | 3874 int64 frame_id) { |
3868 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3875 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
3869 FrameDetached(render_view_host, frame_id)); | 3876 FrameDetached(render_view_host, frame_id)); |
3870 } | 3877 } |
3871 | 3878 |
3872 } // namespace content | 3879 } // namespace content |
OLD | NEW |