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

Side by Side Diff: components/web_view/web_view_impl.cc

Issue 1323233004: Adds better security checking to OnCreatedFrame() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « components/web_view/frame_tree.cc ('k') | mojo/application/public/cpp/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/web_view/web_view_impl.h" 5 #include "components/web_view/web_view_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "components/devtools_service/public/cpp/switches.h" 8 #include "components/devtools_service/public/cpp/switches.h"
9 #include "components/view_manager/public/cpp/scoped_view_ptr.h" 9 #include "components/view_manager/public/cpp/scoped_view_ptr.h"
10 #include "components/view_manager/public/cpp/view.h" 10 #include "components/view_manager/public/cpp/view.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 Frame::ClientPropertyMap client_properties; 62 Frame::ClientPropertyMap client_properties;
63 if (devtools_agent_) { 63 if (devtools_agent_) {
64 devtools_service::DevToolsAgentPtr forward_agent; 64 devtools_service::DevToolsAgentPtr forward_agent;
65 frame_connection->application_connection()->ConnectToService( 65 frame_connection->application_connection()->ConnectToService(
66 &forward_agent); 66 &forward_agent);
67 devtools_agent_->AttachFrame(forward_agent.Pass(), &client_properties); 67 devtools_agent_->AttachFrame(forward_agent.Pass(), &client_properties);
68 } 68 }
69 69
70 FrameTreeClient* frame_tree_client = frame_connection->frame_tree_client(); 70 FrameTreeClient* frame_tree_client = frame_connection->frame_tree_client();
71 const uint32_t content_handler_id = frame_connection->GetContentHandlerID(); 71 const uint32_t content_handler_id = frame_connection->GetContentHandlerID();
72 frame_tree_.reset(new FrameTree(content_handler_id, content_, this, 72 frame_tree_.reset(new FrameTree(
73 frame_tree_client, frame_connection.Pass(), 73 content_handler_id, content_, view_tree_client.Pass(), this,
74 client_properties)); 74 frame_tree_client, frame_connection.Pass(), client_properties));
75 content_->Embed(view_tree_client.Pass());
76 } 75 }
77 76
78 //////////////////////////////////////////////////////////////////////////////// 77 ////////////////////////////////////////////////////////////////////////////////
79 // WebViewImpl, WebView implementation: 78 // WebViewImpl, WebView implementation:
80 79
81 void WebViewImpl::LoadRequest(mojo::URLRequestPtr request) { 80 void WebViewImpl::LoadRequest(mojo::URLRequestPtr request) {
82 pending_load_.reset(new PendingWebViewLoad(this)); 81 pending_load_.reset(new PendingWebViewLoad(this));
83 pending_load_->Init(request.Pass()); 82 pending_load_->Init(request.Pass());
84 } 83 }
85 84
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 //////////////////////////////////////////////////////////////////////////////// 170 ////////////////////////////////////////////////////////////////////////////////
172 // WebViewImpl, FrameDevToolsAgentDelegate implementation: 171 // WebViewImpl, FrameDevToolsAgentDelegate implementation:
173 172
174 void WebViewImpl::HandlePageNavigateRequest(const GURL& url) { 173 void WebViewImpl::HandlePageNavigateRequest(const GURL& url) {
175 mojo::URLRequestPtr request(mojo::URLRequest::New()); 174 mojo::URLRequestPtr request(mojo::URLRequest::New());
176 request->url = url.spec(); 175 request->url = url.spec();
177 client_->TopLevelNavigate(request.Pass()); 176 client_->TopLevelNavigate(request.Pass());
178 } 177 }
179 178
180 } // namespace web_view 179 } // namespace web_view
OLDNEW
« no previous file with comments | « components/web_view/frame_tree.cc ('k') | mojo/application/public/cpp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698