OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/public/browser/browser_main_runner.h" | 5 #include "content/public/browser/browser_main_runner.h" |
6 | 6 |
7 #include "base/allocator/allocator_shim.h" | 7 #include "base/allocator/allocator_shim.h" |
8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 namespace content { | 29 namespace content { |
30 | 30 |
31 class BrowserMainRunnerImpl : public BrowserMainRunner { | 31 class BrowserMainRunnerImpl : public BrowserMainRunner { |
32 public: | 32 public: |
33 BrowserMainRunnerImpl() | 33 BrowserMainRunnerImpl() |
34 : is_initialized_(false), | 34 : is_initialized_(false), |
35 is_shutdown_(false), | 35 is_shutdown_(false), |
36 created_threads_(false) { | 36 created_threads_(false) { |
37 } | 37 } |
38 | 38 |
39 ~BrowserMainRunnerImpl() { | 39 virtual ~BrowserMainRunnerImpl() { |
40 if (is_initialized_ && !is_shutdown_) | 40 if (is_initialized_ && !is_shutdown_) |
41 Shutdown(); | 41 Shutdown(); |
42 } | 42 } |
43 | 43 |
44 virtual int Initialize(const MainFunctionParams& parameters) | 44 virtual int Initialize(const MainFunctionParams& parameters) |
45 OVERRIDE { | 45 OVERRIDE { |
46 is_initialized_ = true; | 46 is_initialized_ = true; |
47 | 47 |
48 #if !defined(OS_IOS) | 48 #if !defined(OS_IOS) |
49 // ChildProcess:: is a misnomer unless you consider context. Use | 49 // ChildProcess:: is a misnomer unless you consider context. Use |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 164 |
165 DISALLOW_COPY_AND_ASSIGN(BrowserMainRunnerImpl); | 165 DISALLOW_COPY_AND_ASSIGN(BrowserMainRunnerImpl); |
166 }; | 166 }; |
167 | 167 |
168 // static | 168 // static |
169 BrowserMainRunner* BrowserMainRunner::Create() { | 169 BrowserMainRunner* BrowserMainRunner::Create() { |
170 return new BrowserMainRunnerImpl(); | 170 return new BrowserMainRunnerImpl(); |
171 } | 171 } |
172 | 172 |
173 } // namespace content | 173 } // namespace content |
OLD | NEW |