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

Side by Side Diff: content/browser/webui/web_ui_impl.cc

Issue 234533002: Remove a bunch of TOOLKIT_GTK in content/ and gpu/, as well as NPAPI plugins on linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, skip changing browser_main_loop.cc because of presubmit issues, will follow up Created 6 years, 8 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 | Annotate | Revision Log
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/webui/web_ui_impl.h" 5 #include "content/browser/webui/web_ui_impl.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "content/browser/child_process_security_policy_impl.h" 10 #include "content/browser/child_process_security_policy_impl.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 void WebUIImpl::RenderViewCreated(RenderViewHost* render_view_host) { 84 void WebUIImpl::RenderViewCreated(RenderViewHost* render_view_host) {
85 controller_->RenderViewCreated(render_view_host); 85 controller_->RenderViewCreated(render_view_host);
86 86
87 // Do not attempt to set the toolkit property if WebUI is not enabled, e.g., 87 // Do not attempt to set the toolkit property if WebUI is not enabled, e.g.,
88 // the bookmarks manager page. 88 // the bookmarks manager page.
89 if (!(bindings_ & BINDINGS_POLICY_WEB_UI)) 89 if (!(bindings_ & BINDINGS_POLICY_WEB_UI))
90 return; 90 return;
91 91
92 #if defined(TOOLKIT_VIEWS) 92 #if defined(TOOLKIT_VIEWS)
93 render_view_host->SetWebUIProperty("toolkit", "views"); 93 render_view_host->SetWebUIProperty("toolkit", "views");
94 #elif defined(TOOLKIT_GTK)
95 render_view_host->SetWebUIProperty("toolkit", "GTK");
96 #endif // defined(TOOLKIT_VIEWS) 94 #endif // defined(TOOLKIT_VIEWS)
97 } 95 }
98 96
99 WebContents* WebUIImpl::GetWebContents() const { 97 WebContents* WebUIImpl::GetWebContents() const {
100 return web_contents_; 98 return web_contents_;
101 } 99 }
102 100
103 ui::ScaleFactor WebUIImpl::GetDeviceScaleFactor() const { 101 ui::ScaleFactor WebUIImpl::GetDeviceScaleFactor() const {
104 return GetScaleFactorForView(web_contents_->GetRenderWidgetHostView()); 102 return GetScaleFactorForView(web_contents_->GetRenderWidgetHostView());
105 } 103 }
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } 250 }
253 251
254 void WebUIImpl::AddToSetIfFrameNameMatches( 252 void WebUIImpl::AddToSetIfFrameNameMatches(
255 std::set<RenderFrameHost*>* frame_set, 253 std::set<RenderFrameHost*>* frame_set,
256 RenderFrameHost* host) { 254 RenderFrameHost* host) {
257 if (host->GetFrameName() == frame_name_) 255 if (host->GetFrameName() == frame_name_)
258 frame_set->insert(host); 256 frame_set->insert(host);
259 } 257 }
260 258
261 } // namespace content 259 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl_browsertest.cc ('k') | content/child/npapi/plugin_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698