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/runtime_platform_util.h"
7 #include "base/logging.h"
8 #include "base/process/kill.h"
9 #include "base/process/launch.h"
12 namespace platform_util {
14 void OpenExternal(const GURL& url) {
15 if (url.SchemeIsHTTPOrHTTPS()) {
16 LOG(INFO) << "Open in MiniBrowser.";
17 std::vector<std::string> argv;
18 argv.push_back("MiniBrowser");
19 argv.push_back(url.spec());
20 base::ProcessHandle handle;
22 if (base::LaunchProcess(argv, base::LaunchOptions(), &handle))
23 base::EnsureProcessGetsReaped(handle);
27 } // namespace platform_util