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

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: Updated comment 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 2114 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool WebContentsImpl::FocusLocationBarByDefault() { 2142 bool WebContentsImpl::FocusLocationBarByDefault() {
2136 NavigationEntry* entry = controller_.GetVisibleEntry(); 2143 NavigationEntry* entry = controller_.GetVisibleEntry();
2137 if (entry && entry->GetURL() == GURL(kAboutBlankURL)) 2144 if (entry && entry->GetURL() == GURL(kAboutBlankURL))
2138 return true; 2145 return true;
2139 return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this); 2146 return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this);
2140 } 2147 }
2141 2148
2142 void WebContentsImpl::SetFocusToLocationBar(bool select_all) { 2149 void WebContentsImpl::SetFocusToLocationBar(bool select_all) {
2143 if (delegate_) 2150 if (delegate_)
2144 delegate_->SetFocusToLocationBar(select_all); 2151 delegate_->SetFocusToLocationBar(select_all);
(...skipping 1708 matching lines...) Expand 10 before | Expand all | Expand 10 after
3853 } 3860 }
3854 3861
3855 void WebContentsImpl::OnFrameRemoved( 3862 void WebContentsImpl::OnFrameRemoved(
3856 RenderViewHostImpl* render_view_host, 3863 RenderViewHostImpl* render_view_host,
3857 int64 frame_id) { 3864 int64 frame_id) {
3858 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3865 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3859 FrameDetached(render_view_host, frame_id)); 3866 FrameDetached(render_view_host, frame_id));
3860 } 3867 }
3861 3868
3862 } // namespace content 3869 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698