Upstream version 6.35.121.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / browser / runtime_platform_util_tizen.cc
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.
4
5 #include "xwalk/runtime/browser/runtime_platform_util.h"
6
7 #include "base/logging.h"
8 #include "base/process/kill.h"
9 #include "base/process/launch.h"
10 #include "url/gurl.h"
11
12 namespace platform_util {
13
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;
21
22     if (base::LaunchProcess(argv, base::LaunchOptions(), &handle))
23       base::EnsureProcessGetsReaped(handle);
24   }
25 }
26
27 }  // namespace platform_util