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

Side by Side Diff: chrome/renderer/chrome_render_view_observer.cc

Issue 2693573002: Remove unused WebWindowFeatures from popup blocker, reducing WebString use in browser (Closed)
Patch Set: Created 3 years, 10 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 "chrome/renderer/chrome_render_view_observer.h" 5 #include "chrome/renderer/chrome_render_view_observer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Truncate the strings we send to the browser process. 126 // Truncate the strings we send to the browser process.
127 web_app_info.title = 127 web_app_info.title =
128 web_app_info.title.substr(0, chrome::kMaxMetaTagAttributeLength); 128 web_app_info.title.substr(0, chrome::kMaxMetaTagAttributeLength);
129 web_app_info.description = 129 web_app_info.description =
130 web_app_info.description.substr(0, chrome::kMaxMetaTagAttributeLength); 130 web_app_info.description.substr(0, chrome::kMaxMetaTagAttributeLength);
131 131
132 Send(new ChromeViewHostMsg_DidGetWebApplicationInfo( 132 Send(new ChromeViewHostMsg_DidGetWebApplicationInfo(
133 routing_id(), web_app_info)); 133 routing_id(), web_app_info));
134 } 134 }
135 135
136 void ChromeRenderViewObserver::OnSetWindowFeatures( 136 void ChromeRenderViewObserver::OnSetWindowFeatures() {
137 const WebWindowFeatures& window_features) { 137 render_view()->GetWebView()->setWindowFeatures(WebWindowFeatures());
138 render_view()->GetWebView()->setWindowFeatures(window_features);
139 } 138 }
140 139
141 void ChromeRenderViewObserver::Navigate(const GURL& url) { 140 void ChromeRenderViewObserver::Navigate(const GURL& url) {
142 // Execute cache clear operations that were postponed until a navigation 141 // Execute cache clear operations that were postponed until a navigation
143 // event (including tab reload). 142 // event (including tab reload).
144 if (web_cache_impl_) 143 if (web_cache_impl_)
145 web_cache_impl_->ExecutePendingClearCache(); 144 web_cache_impl_->ExecutePendingClearCache();
146 } 145 }
147 146
148 #if BUILDFLAG(ENABLE_EXTENSIONS) 147 #if BUILDFLAG(ENABLE_EXTENSIONS)
(...skipping 22 matching lines...) Expand all
171 !webui_javascript_.empty()) { 170 !webui_javascript_.empty()) {
172 for (const auto& script : webui_javascript_) 171 for (const auto& script : webui_javascript_)
173 render_view()->GetMainRenderFrame()->ExecuteJavaScript(script); 172 render_view()->GetMainRenderFrame()->ExecuteJavaScript(script);
174 webui_javascript_.clear(); 173 webui_javascript_.clear();
175 } 174 }
176 } 175 }
177 176
178 void ChromeRenderViewObserver::OnDestruct() { 177 void ChromeRenderViewObserver::OnDestruct() {
179 delete this; 178 delete this;
180 } 179 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_render_view_observer.h ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698