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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2154233003: Rewrite YouTube Flash embeds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unit tests Created 4 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 RenderFrameImpl::FromRoutingID(opener_frame_routing_id); 1047 RenderFrameImpl::FromRoutingID(opener_frame_routing_id);
1048 if (opener_frame) { 1048 if (opener_frame) {
1049 if (opener_view_routing_id) 1049 if (opener_view_routing_id)
1050 *opener_view_routing_id = opener_frame->render_view()->GetRoutingID(); 1050 *opener_view_routing_id = opener_frame->render_view()->GetRoutingID();
1051 return opener_frame->GetWebFrame(); 1051 return opener_frame->GetWebFrame();
1052 } 1052 }
1053 1053
1054 return nullptr; 1054 return nullptr;
1055 } 1055 }
1056 1056
1057 bool RenderFrameImpl::overrideEmbedInfo(WebString* url) {
1058 std::string url_str = url->utf8();
1059
1060 bool ret_val = GetContentClient()->renderer()->OverrideEmbedInfo(
1061 &url_str);
1062
1063 if (ret_val) {
1064 *url = blink::WebString::fromUTF8(url_str);
1065 }
mlamouri (slow - plz ping) 2016/07/20 13:22:02 nit: you can do: ``` if (GetContentClient()->rende
kdsilva 2016/07/21 13:59:46 Acknowledged.
1066
1067 return ret_val;
1068 }
1069
1057 // RenderFrameImpl ---------------------------------------------------------- 1070 // RenderFrameImpl ----------------------------------------------------------
1058 RenderFrameImpl::RenderFrameImpl(const CreateParams& params) 1071 RenderFrameImpl::RenderFrameImpl(const CreateParams& params)
1059 : frame_(NULL), 1072 : frame_(NULL),
1060 is_main_frame_(true), 1073 is_main_frame_(true),
1061 in_browser_initiated_detach_(false), 1074 in_browser_initiated_detach_(false),
1062 in_frame_tree_(false), 1075 in_frame_tree_(false),
1063 render_view_(params.render_view->AsWeakPtr()), 1076 render_view_(params.render_view->AsWeakPtr()),
1064 routing_id_(params.routing_id), 1077 routing_id_(params.routing_id),
1065 proxy_routing_id_(MSG_ROUTING_NONE), 1078 proxy_routing_id_(MSG_ROUTING_NONE),
1066 #if defined(ENABLE_PLUGINS) 1079 #if defined(ENABLE_PLUGINS)
(...skipping 5260 matching lines...) Expand 10 before | Expand all | Expand 10 after
6327 // event target. Potentially a Pepper plugin will receive the event. 6340 // event target. Potentially a Pepper plugin will receive the event.
6328 // In order to tell whether a plugin gets the last mouse event and which it 6341 // In order to tell whether a plugin gets the last mouse event and which it
6329 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6342 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6330 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6343 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6331 // |pepper_last_mouse_event_target_|. 6344 // |pepper_last_mouse_event_target_|.
6332 pepper_last_mouse_event_target_ = nullptr; 6345 pepper_last_mouse_event_target_ = nullptr;
6333 #endif 6346 #endif
6334 } 6347 }
6335 6348
6336 } // namespace content 6349 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698