diff options
author | Zeno Albisser <zeno.albisser@digia.com> | 2013-06-06 17:29:45 +0200 |
---|---|---|
committer | Zeno Albisser <zeno.albisser@digia.com> | 2013-06-10 15:01:02 +0200 |
commit | 83a2bc6d446387d25fd10164e87627c9d49878eb (patch) | |
tree | 164f0c7cc5b4d8cb195afbf388f628e62eaa1b91 /lib/content_browser_client_qt.cpp | |
parent | 54ed434fe3ab34ca007bc58111d19196c686ecc0 (diff) |
Replace Shell with WebContentsDelegateQt.
Diffstat (limited to 'lib/content_browser_client_qt.cpp')
-rw-r--r-- | lib/content_browser_client_qt.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/content_browser_client_qt.cpp b/lib/content_browser_client_qt.cpp index 65ef0f75c..8acad3b03 100644 --- a/lib/content_browser_client_qt.cpp +++ b/lib/content_browser_client_qt.cpp @@ -14,6 +14,22 @@ #include "net/base/net_util.h" #include "browser_context_qt.h" #include "web_contents_view_qt.h" +#include "web_contents_delegate_qt.h" + +static GURL GetStartupURL() { + CommandLine* command_line = CommandLine::ForCurrentProcess(); + const CommandLine::StringVector& args = command_line->GetArgs(); + + if (args.empty()) + return GURL("http://www.google.com/"); + + GURL url(args[0]); + if (url.is_valid() && url.has_scheme()) + return url; + + return net::FilePathToFileURL(base::FilePath(args[0])); +} + class BrowserMainPartsQt : public content::BrowserMainParts { |