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

Side by Side Diff: extensions/shell/browser/shell_browser_main_parts.cc

Issue 2587683002: AppShell: enable touch emulation from command line (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/shell/browser/shell_browser_main_parts.h" 5 #include "extensions/shell/browser/shell_browser_main_parts.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "extensions/shell/browser/shell_browser_main_parts_mac.h" 60 #include "extensions/shell/browser/shell_browser_main_parts_mac.h"
61 #endif 61 #endif
62 62
63 #if !defined(DISABLE_NACL) 63 #if !defined(DISABLE_NACL)
64 #include "components/nacl/browser/nacl_browser.h" 64 #include "components/nacl/browser/nacl_browser.h"
65 #include "components/nacl/browser/nacl_process_host.h" 65 #include "components/nacl/browser/nacl_process_host.h"
66 #include "content/public/browser/browser_thread.h" 66 #include "content/public/browser/browser_thread.h"
67 #include "extensions/shell/browser/shell_nacl_browser_delegate.h" 67 #include "extensions/shell/browser/shell_nacl_browser_delegate.h"
68 #endif 68 #endif
69 69
70 #if defined(USE_AURA) && defined(USE_X11)
71 #include "ui/events/devices/x11/touch_factory_x11.h" // nogncheck
Rahul Chaturvedi 2017/01/09 18:25:40 Add this to DEPS instead of the nogncheck.
michaelpg 2017/01/09 18:59:18 Done.
72 #endif
73
70 using base::CommandLine; 74 using base::CommandLine;
71 using content::BrowserContext; 75 using content::BrowserContext;
72 76
73 #if !defined(DISABLE_NACL) 77 #if !defined(DISABLE_NACL)
74 using content::BrowserThread; 78 using content::BrowserThread;
75 #endif 79 #endif
76 80
77 namespace extensions { 81 namespace extensions {
78 82
79 ShellBrowserMainParts::ShellBrowserMainParts( 83 ShellBrowserMainParts::ShellBrowserMainParts(
80 const content::MainFunctionParams& parameters, 84 const content::MainFunctionParams& parameters,
81 ShellBrowserMainDelegate* browser_main_delegate) 85 ShellBrowserMainDelegate* browser_main_delegate)
82 : extension_system_(nullptr), 86 : extension_system_(nullptr),
83 parameters_(parameters), 87 parameters_(parameters),
84 run_message_loop_(true), 88 run_message_loop_(true),
85 browser_main_delegate_(browser_main_delegate) { 89 browser_main_delegate_(browser_main_delegate) {
86 } 90 }
87 91
88 ShellBrowserMainParts::~ShellBrowserMainParts() { 92 ShellBrowserMainParts::~ShellBrowserMainParts() {
89 } 93 }
90 94
91 void ShellBrowserMainParts::PreMainMessageLoopStart() { 95 void ShellBrowserMainParts::PreMainMessageLoopStart() {
92 // TODO(jamescook): Initialize touch here? 96 #if defined(USE_AURA) && defined(USE_X11)
97 ui::TouchFactory::SetTouchDeviceListFromCommandLine();
98 #endif
93 #if defined(OS_MACOSX) 99 #if defined(OS_MACOSX)
94 MainPartsPreMainMessageLoopStartMac(); 100 MainPartsPreMainMessageLoopStartMac();
95 #endif 101 #endif
96 } 102 }
97 103
98 void ShellBrowserMainParts::PostMainMessageLoopStart() { 104 void ShellBrowserMainParts::PostMainMessageLoopStart() {
99 #if defined(OS_CHROMEOS) 105 #if defined(OS_CHROMEOS)
100 // Perform initialization of D-Bus objects here rather than in the below 106 // Perform initialization of D-Bus objects here rather than in the below
101 // helper classes so those classes' tests can initialize stub versions of the 107 // helper classes so those classes' tests can initialize stub versions of the
102 // D-Bus objects. 108 // D-Bus objects.
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 } 294 }
289 295
290 void ShellBrowserMainParts::CreateExtensionSystem() { 296 void ShellBrowserMainParts::CreateExtensionSystem() {
291 DCHECK(browser_context_); 297 DCHECK(browser_context_);
292 extension_system_ = static_cast<ShellExtensionSystem*>( 298 extension_system_ = static_cast<ShellExtensionSystem*>(
293 ExtensionSystem::Get(browser_context_.get())); 299 ExtensionSystem::Get(browser_context_.get()));
294 extension_system_->InitForRegularProfile(true); 300 extension_system_->InitForRegularProfile(true);
295 } 301 }
296 302
297 } // namespace extensions 303 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698