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

Side by Side Diff: chrome/renderer/renderer_main.cc

Issue 4078003: Refactoring select popup on Mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 2 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
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | chrome/test/render_view_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #if defined(OS_MACOSX) 5 #if defined(OS_MACOSX)
6 #include <signal.h> 6 #include <signal.h>
7 #include <unistd.h> 7 #include <unistd.h>
8 #endif // OS_MACOSX 8 #endif // OS_MACOSX
9 9
10 #include "app/hi_res_timer_manager.h" 10 #include "app/hi_res_timer_manager.h"
(...skipping 18 matching lines...) Expand all
29 #include "chrome/common/pepper_plugin_registry.h" 29 #include "chrome/common/pepper_plugin_registry.h"
30 #include "chrome/renderer/renderer_main_platform_delegate.h" 30 #include "chrome/renderer/renderer_main_platform_delegate.h"
31 #include "chrome/renderer/render_process_impl.h" 31 #include "chrome/renderer/render_process_impl.h"
32 #include "chrome/renderer/render_thread.h" 32 #include "chrome/renderer/render_thread.h"
33 #include "grit/generated_resources.h" 33 #include "grit/generated_resources.h"
34 #include "net/base/net_module.h" 34 #include "net/base/net_module.h"
35 35
36 #if defined(OS_MACOSX) 36 #if defined(OS_MACOSX)
37 #include "base/eintr_wrapper.h" 37 #include "base/eintr_wrapper.h"
38 #include "chrome/app/breakpad_mac.h" 38 #include "chrome/app/breakpad_mac.h"
39 #include "third_party/WebKit/WebKit/chromium/public/WebView.h"
39 #endif // OS_MACOSX 40 #endif // OS_MACOSX
40 41
41 #if defined(USE_LINUX_BREAKPAD) 42 #if defined(USE_LINUX_BREAKPAD)
42 #include "chrome/app/breakpad_linux.h" 43 #include "chrome/app/breakpad_linux.h"
43 #endif 44 #endif
44 45
45 #if defined(OS_MACOSX) 46 #if defined(OS_MACOSX)
46 namespace { 47 namespace {
47 48
48 // TODO(viettrungluu): crbug.com/28547: The following signal handling is needed, 49 // TODO(viettrungluu): crbug.com/28547: The following signal handling is needed,
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // Do not move this function down since that would mean we can't easily debug 221 // Do not move this function down since that would mean we can't easily debug
221 // whatever occurs before it. 222 // whatever occurs before it.
222 HandleRendererErrorTestParameters(parsed_command_line); 223 HandleRendererErrorTestParameters(parsed_command_line);
223 224
224 RendererMainPlatformDelegate platform(parameters); 225 RendererMainPlatformDelegate platform(parameters);
225 226
226 base::StatsScope<base::StatsCounterTimer> 227 base::StatsScope<base::StatsCounterTimer>
227 startup_timer(chrome::Counters::renderer_main()); 228 startup_timer(chrome::Counters::renderer_main());
228 229
229 #if defined(OS_MACOSX) 230 #if defined(OS_MACOSX)
231 // On Mac, the select popups are rendered by the browser.
232 WebKit::WebView::setUseExternalPopupMenus(true);
233
230 // As long as we use Cocoa in the renderer (for the forseeable future as of 234 // As long as we use Cocoa in the renderer (for the forseeable future as of
231 // now; see http://crbug.com/13890 for info) we need to have a UI loop. 235 // now; see http://crbug.com/13890 for info) we need to have a UI loop.
232 MessageLoop main_message_loop(MessageLoop::TYPE_UI); 236 MessageLoop main_message_loop(MessageLoop::TYPE_UI);
233 #else 237 #else
234 // The main message loop of the renderer services doesn't have IO or UI tasks, 238 // The main message loop of the renderer services doesn't have IO or UI tasks,
235 // unless in-process-plugins is used. 239 // unless in-process-plugins is used.
236 MessageLoop main_message_loop(RenderProcessImpl::InProcessPlugins() ? 240 MessageLoop main_message_loop(RenderProcessImpl::InProcessPlugins() ?
237 MessageLoop::TYPE_UI : MessageLoop::TYPE_DEFAULT); 241 MessageLoop::TYPE_UI : MessageLoop::TYPE_DEFAULT);
238 #endif 242 #endif
239 243
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 pool->Recycle(); 296 pool->Recycle();
293 TRACE_EVENT_BEGIN("RendererMain.START_MSG_LOOP", 0, 0); 297 TRACE_EVENT_BEGIN("RendererMain.START_MSG_LOOP", 0, 0);
294 MessageLoop::current()->Run(); 298 MessageLoop::current()->Run();
295 TRACE_EVENT_END("RendererMain.START_MSG_LOOP", 0, 0); 299 TRACE_EVENT_END("RendererMain.START_MSG_LOOP", 0, 0);
296 } 300 }
297 } 301 }
298 platform.PlatformUninitialize(); 302 platform.PlatformUninitialize();
299 TRACE_EVENT_END("RendererMain", 0, ""); 303 TRACE_EVENT_END("RendererMain", 0, "");
300 return 0; 304 return 0;
301 } 305 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | chrome/test/render_view_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698