| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 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 | 
|  | 3 // found in the LICENSE file. | 
|  | 4 | 
|  | 5 #include "content/renderer/web_frame_utils.h" | 
|  | 6 | 
|  | 7 #include "content/renderer/render_frame_impl.h" | 
|  | 8 #include "content/renderer/render_frame_proxy.h" | 
|  | 9 #include "ipc/ipc_message.h" | 
|  | 10 #include "third_party/WebKit/public/web/WebFrame.h" | 
|  | 11 | 
|  | 12 namespace content { | 
|  | 13 | 
|  | 14 int GetRoutingIdForFrameOrProxy(blink::WebFrame* web_frame) { | 
|  | 15   if (!web_frame) | 
|  | 16     return MSG_ROUTING_NONE; | 
|  | 17   if (web_frame->isWebRemoteFrame()) | 
|  | 18     return RenderFrameProxy::FromWebFrame(web_frame)->routing_id(); | 
|  | 19   return RenderFrameImpl::FromWebFrame(web_frame)->GetRoutingID(); | 
|  | 20 } | 
|  | 21 | 
|  | 22 }  // namespace content | 
| OLD | NEW | 
|---|