2013-03-13 19:12:05 +00:00
|
|
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE-CHROMIUM file.
|
|
|
|
|
2013-03-14 13:03:50 +00:00
|
|
|
#include "common/main_delegate.h"
|
|
|
|
|
|
|
|
#include "browser/browser_client.h"
|
|
|
|
#include "common/content_client.h"
|
2013-03-13 19:12:05 +00:00
|
|
|
|
|
|
|
#include "base/command_line.h"
|
|
|
|
#include "content/public/common/content_switches.h"
|
|
|
|
|
|
|
|
namespace brightray {
|
|
|
|
|
2013-04-24 22:30:47 +00:00
|
|
|
MainDelegate::MainDelegate() {
|
2013-03-13 19:12:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
MainDelegate::~MainDelegate() {
|
|
|
|
}
|
|
|
|
|
2013-04-24 22:30:47 +00:00
|
|
|
scoped_ptr<ContentClient> MainDelegate::CreateContentClient() {
|
|
|
|
return make_scoped_ptr(new ContentClient).Pass();
|
|
|
|
}
|
|
|
|
|
2013-03-14 13:03:50 +00:00
|
|
|
bool MainDelegate::BasicStartupComplete(int* exit_code) {
|
2013-04-24 22:30:47 +00:00
|
|
|
content_client_ = CreateContentClient().Pass();
|
2013-03-14 13:03:50 +00:00
|
|
|
SetContentClient(content_client_.get());
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2013-03-13 19:12:05 +00:00
|
|
|
void MainDelegate::PreSandboxStartup() {
|
|
|
|
#if defined(OS_MACOSX)
|
|
|
|
OverrideChildProcessPath();
|
|
|
|
OverrideFrameworkBundlePath();
|
2013-03-14 13:03:50 +00:00
|
|
|
InitializeResourceBundle();
|
2013-05-21 15:39:25 +00:00
|
|
|
#endif
|
2013-03-13 19:12:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|