move pdf viewer behind feature flag

This commit is contained in:
deepak1556 2018-03-15 17:51:48 +09:00 committed by Aleksei Kuzmin
parent c1908147a9
commit 4b39d17e5f
21 changed files with 159 additions and 63 deletions

View file

@ -9,7 +9,6 @@
#include "atom/browser/atom_access_token_store.h"
#include "atom/browser/atom_browser_client.h"
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/atom_web_ui_controller_factory.h"
#include "atom/browser/bridge_task_runner.h"
#include "atom/browser/browser.h"
#include "atom/browser/javascript_environment.h"
@ -33,6 +32,10 @@
#include "ui/events/devices/x11/touch_factory_x11.h"
#endif
#if defined(ENABLE_PDF_VIEWER)
#include "atom/browser/atom_web_ui_controller_factory.h"
#endif // defined(ENABLE_PDF_VIEWER)
namespace atom {
namespace {
@ -186,8 +189,10 @@ void AtomBrowserMainParts::PreMainMessageLoopRun() {
base::Bind(&v8::Isolate::LowMemoryNotification,
base::Unretained(js_env_->isolate())));
#if defined(ENABLE_PDF_VIEWER)
content::WebUIControllerFactory::RegisterFactory(
AtomWebUIControllerFactory::GetInstance());
#endif // defined(ENABLE_PDF_VIEWER)
brightray::BrowserMainParts::PreMainMessageLoopRun();
bridge_task_runner_->MessageLoopIsReady();