1 // Copyright (c) 2014 Intel Corporation. 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.
5 #include "xwalk/runtime/browser/xwalk_render_message_filter.h"
7 #include "xwalk/runtime/common/xwalk_common_messages.h"
8 #include "xwalk/runtime/browser/runtime_platform_util.h"
12 XWalkRenderMessageFilter::XWalkRenderMessageFilter()
13 : BrowserMessageFilter(ViewMsgStart) {
16 bool XWalkRenderMessageFilter::OnMessageReceived(
17 const IPC::Message& message,
18 bool* message_was_ok) {
20 IPC_BEGIN_MESSAGE_MAP_EX(XWalkRenderMessageFilter, message, *message_was_ok)
22 IPC_MESSAGE_HANDLER(ViewMsg_OpenLinkExternal, OnOpenLinkExternal)
24 IPC_MESSAGE_UNHANDLED(handled = false)
31 void XWalkRenderMessageFilter::OnOpenLinkExternal(const GURL& url) {
32 LOG(INFO) << "OpenLinkExternal: " << url.spec();
33 platform_util::OpenExternal(url);