Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: blimp/engine/app/blimp_browser_main_parts.cc

Issue 1810213009: blimp: Add settings to allow the client to download the whole page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@record_full_document
Patch Set: Use ContentBrowserClient to override prefs. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "blimp/engine/app/blimp_browser_main_parts.h" 5 #include "blimp/engine/app/blimp_browser_main_parts.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/threading/thread_restrictions.h" 8 #include "base/threading/thread_restrictions.h"
9 #include "blimp/common/proto/blimp_message.pb.h" 9 #include "blimp/common/proto/blimp_message.pb.h"
10 #include "blimp/engine/app/blimp_engine_config.h" 10 #include "blimp/engine/app/blimp_engine_config.h"
11 #include "blimp/engine/app/settings_manager.h"
11 #include "blimp/engine/common/blimp_browser_context.h" 12 #include "blimp/engine/common/blimp_browser_context.h"
12 #include "blimp/engine/session/blimp_engine_session.h" 13 #include "blimp/engine/session/blimp_engine_session.h"
13 #include "blimp/net/blimp_connection.h" 14 #include "blimp/net/blimp_connection.h"
14 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
15 #include "content/public/common/main_function_params.h" 16 #include "content/public/common/main_function_params.h"
16 #include "net/base/net_module.h" 17 #include "net/base/net_module.h"
17 #include "net/log/net_log.h" 18 #include "net/log/net_log.h"
18 19
19 namespace blimp { 20 namespace blimp {
20 namespace engine { 21 namespace engine {
(...skipping 10 matching lines...) Expand all
31 { 32 {
32 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); 33 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
33 base::ThreadRestrictions::ScopedAllowIO allow_io; 34 base::ThreadRestrictions::ScopedAllowIO allow_io;
34 engine_config_ = BlimpEngineConfig::Create(*cmd_line); 35 engine_config_ = BlimpEngineConfig::Create(*cmd_line);
35 CHECK(engine_config_); 36 CHECK(engine_config_);
36 } 37 }
37 } 38 }
38 39
39 void BlimpBrowserMainParts::PreMainMessageLoopRun() { 40 void BlimpBrowserMainParts::PreMainMessageLoopRun() {
40 net_log_.reset(new net::NetLog()); 41 net_log_.reset(new net::NetLog());
42 settings_manager_.reset(new SettingsManager);
41 scoped_ptr<BlimpBrowserContext> browser_context( 43 scoped_ptr<BlimpBrowserContext> browser_context(
42 new BlimpBrowserContext(false, net_log_.get())); 44 new BlimpBrowserContext(false, net_log_.get()));
43 engine_session_.reset(new BlimpEngineSession( 45 engine_session_.reset(
44 std::move(browser_context), net_log_.get(), engine_config_.get())); 46 new BlimpEngineSession(std::move(browser_context), net_log_.get(),
47 engine_config_.get(), settings_manager_.get()));
45 engine_session_->Initialize(); 48 engine_session_->Initialize();
46 } 49 }
47 50
48 void BlimpBrowserMainParts::PostMainMessageLoopRun() { 51 void BlimpBrowserMainParts::PostMainMessageLoopRun() {
49 engine_session_.reset(); 52 engine_session_.reset();
50 } 53 }
51 54
52 BlimpBrowserContext* BlimpBrowserMainParts::GetBrowserContext() { 55 BlimpBrowserContext* BlimpBrowserMainParts::GetBrowserContext() {
53 return engine_session_->browser_context(); 56 return engine_session_->browser_context();
54 } 57 }
55 58
59 SettingsManager* BlimpBrowserMainParts::GetSettingsManager() {
60 return settings_manager_.get();
61 }
62
56 } // namespace engine 63 } // namespace engine
57 } // namespace blimp 64 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/engine/app/blimp_browser_main_parts.h ('k') | blimp/engine/app/blimp_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698