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

Unified Diff: content/renderer/renderer_main.cc

Issue 177243021: [Mac] Remove NSApplication from the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Defer FakeActiveWindow creation Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/DEPS ('k') | content/renderer/renderer_main_platform_delegate_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_main.cc
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc
index 31b0781833079d476e37190e38ae867850a430ab..33aa0474134d62b48d285e7ffa9a604a4e32d5be 100644
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -45,6 +45,7 @@
#include "base/mac/mac_util.h"
#include "base/mac/scoped_nsautorelease_pool.h"
+#include "base/message_loop/message_pump_mac.h"
#include "third_party/WebKit/public/web/WebView.h"
#endif // OS_MACOSX
@@ -158,9 +159,11 @@ int RendererMain(const MainFunctionParams& parameters) {
RendererMessageLoopObserver task_observer;
#if defined(OS_MACOSX)
- // As long as we use Cocoa in the renderer (for the forseeable future as of
- // now; see http://crbug.com/306348 for info) we need to have a UI loop.
- base::MessageLoopForUI main_message_loop;
+ // As long as scrollbars on Mac are painted with Cocoa, the message pump
+ // needs to be backed by a Foundation-level loop to process NSTimers. See
+ // http://crbug.com/306348#c24 for details.
+ scoped_ptr<base::MessagePump> pump(new base::MessagePumpNSRunLoop());
+ base::MessageLoop main_message_loop(pump.Pass());
#else
// The main message loop of the renderer services doesn't have IO or UI tasks.
base::MessageLoop main_message_loop;
« no previous file with comments | « content/renderer/DEPS ('k') | content/renderer/renderer_main_platform_delegate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698