Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 98073015: <webview>: Support zoom in WebUI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed RenderViewHost::SetZoomLevel Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after
2119 RenderViewHost* host = GetRenderViewHost(); 2119 RenderViewHost* host = GetRenderViewHost();
2120 int id = StartDownload(host, url, is_favicon, max_bitmap_size); 2120 int id = StartDownload(host, url, is_favicon, max_bitmap_size);
2121 image_download_map_[id] = callback; 2121 image_download_map_[id] = callback;
2122 return id; 2122 return id;
2123 } 2123 }
2124 2124
2125 bool WebContentsImpl::IsSubframe() const { 2125 bool WebContentsImpl::IsSubframe() const {
2126 return is_subframe_; 2126 return is_subframe_;
2127 } 2127 }
2128 2128
2129 void WebContentsImpl::SetZoomLevel(double level) {
2130 Send(new ViewMsg_SetZoomLevel(GetRoutingID(), level));
2131 BrowserPluginEmbedder* embedder = GetBrowserPluginEmbedder();
2132 if (embedder)
2133 embedder->SetZoomLevel(level);
2134 }
2135
2129 bool WebContentsImpl::FocusLocationBarByDefault() { 2136 bool WebContentsImpl::FocusLocationBarByDefault() {
2130 NavigationEntry* entry = controller_.GetVisibleEntry(); 2137 NavigationEntry* entry = controller_.GetVisibleEntry();
2131 if (entry && entry->GetURL() == GURL(kAboutBlankURL)) 2138 if (entry && entry->GetURL() == GURL(kAboutBlankURL))
2132 return true; 2139 return true;
2133 return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this); 2140 return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this);
2134 } 2141 }
2135 2142
2136 void WebContentsImpl::SetFocusToLocationBar(bool select_all) { 2143 void WebContentsImpl::SetFocusToLocationBar(bool select_all) {
2137 if (delegate_) 2144 if (delegate_)
2138 delegate_->SetFocusToLocationBar(select_all); 2145 delegate_->SetFocusToLocationBar(select_all);
(...skipping 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after
3896 } 3903 }
3897 3904
3898 void WebContentsImpl::OnFrameRemoved( 3905 void WebContentsImpl::OnFrameRemoved(
3899 RenderViewHostImpl* render_view_host, 3906 RenderViewHostImpl* render_view_host,
3900 int64 frame_id) { 3907 int64 frame_id) {
3901 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3908 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3902 FrameDetached(render_view_host, frame_id)); 3909 FrameDetached(render_view_host, frame_id));
3903 } 3910 }
3904 3911
3905 } // namespace content 3912 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698