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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 10824162: add device notification to Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed Tommi's comments Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
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/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/hi_res_timer_manager.h" 10 #include "base/hi_res_timer_manager.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #include "ui/base/l10n/l10n_util_win.h" 61 #include "ui/base/l10n/l10n_util_win.h"
62 #include "net/base/winsock_init.h" 62 #include "net/base/winsock_init.h"
63 #endif 63 #endif
64 64
65 #if defined(OS_LINUX) || defined(OS_OPENBSD) 65 #if defined(OS_LINUX) || defined(OS_OPENBSD)
66 #include <glib-object.h> 66 #include <glib-object.h>
67 #endif 67 #endif
68 68
69 #if defined(OS_LINUX) 69 #if defined(OS_LINUX)
70 #include "content/browser/device_monitor_linux.h" 70 #include "content/browser/device_monitor_linux.h"
71 #elif defined(OS_MACOSX)
72 #include "content/browser/device_monitor_mac.h"
71 #endif 73 #endif
72 74
73 #if defined(OS_CHROMEOS) 75 #if defined(OS_CHROMEOS)
74 #include <dbus/dbus-glib.h> 76 #include <dbus/dbus-glib.h>
75 #endif 77 #endif
76 78
77 #if defined(TOOLKIT_GTK) 79 #if defined(TOOLKIT_GTK)
78 #include "ui/gfx/gtk_util.h" 80 #include "ui/gfx/gtk_util.h"
79 #endif 81 #endif
80 82
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 void BrowserMainLoop::BrowserThreadsStarted() { 614 void BrowserMainLoop::BrowserThreadsStarted() {
613 HistogramSynchronizer::GetInstance(); 615 HistogramSynchronizer::GetInstance();
614 616
615 content::BrowserGpuChannelHostFactory::Initialize(); 617 content::BrowserGpuChannelHostFactory::Initialize();
616 #if defined(USE_AURA) 618 #if defined(USE_AURA)
617 ImageTransportFactory::Initialize(); 619 ImageTransportFactory::Initialize();
618 #endif 620 #endif
619 621
620 #if defined(OS_LINUX) 622 #if defined(OS_LINUX)
621 device_monitor_linux_.reset(new DeviceMonitorLinux()); 623 device_monitor_linux_.reset(new DeviceMonitorLinux());
624 #elif defined(OS_MACOSX)
625 device_monitor_mac_.reset(new DeviceMonitorMac());
622 #endif 626 #endif
623 627
624 // RDH needs the IO thread to be created. 628 // RDH needs the IO thread to be created.
625 resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl()); 629 resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl());
626 630
627 #if defined(ENABLE_INPUT_SPEECH) 631 #if defined(ENABLE_INPUT_SPEECH)
628 speech_recognition_manager_.reset(new speech::SpeechRecognitionManagerImpl()); 632 speech_recognition_manager_.reset(new speech::SpeechRecognitionManagerImpl());
629 #endif 633 #endif
630 634
631 // Start the GpuDataManager before we set up the MessageLoops because 635 // Start the GpuDataManager before we set up the MessageLoops because
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); 685 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type());
682 if (parameters_.ui_task) 686 if (parameters_.ui_task)
683 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); 687 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task);
684 688
685 base::RunLoop run_loop; 689 base::RunLoop run_loop;
686 run_loop.Run(); 690 run_loop.Run();
687 #endif 691 #endif
688 } 692 }
689 693
690 } // namespace content 694 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698