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

Side by Side Diff: content/app/content_main_runner.cc

Issue 1128113011: ozone: Introduce ClientPixmap and ClientPixmapFactory for non-GPU processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to crrev.com/1258713002 Created 5 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
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/public/app/content_main_runner.h" 5 #include "content/public/app/content_main_runner.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/allocator/allocator_extension.h" 9 #include "base/allocator/allocator_extension.h"
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 #if !defined(OS_MACOSX) 103 #if !defined(OS_MACOSX)
104 #include "content/public/common/content_descriptors.h" 104 #include "content/public/common/content_descriptors.h"
105 #include "content/public/common/zygote_fork_delegate_linux.h" 105 #include "content/public/common/zygote_fork_delegate_linux.h"
106 #endif 106 #endif
107 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) 107 #if !defined(OS_MACOSX) && !defined(OS_ANDROID)
108 #include "content/zygote/zygote_main.h" 108 #include "content/zygote/zygote_main.h"
109 #endif 109 #endif
110 110
111 #endif // OS_POSIX 111 #endif // OS_POSIX
112 112
113 #if defined(USE_OZONE)
114 #include "ui/ozone/public/native_pixmap_manager.h"
115 #endif
116
113 #if !defined(OS_MACOSX) && defined(USE_TCMALLOC) 117 #if !defined(OS_MACOSX) && defined(USE_TCMALLOC)
114 extern "C" { 118 extern "C" {
115 int tc_set_new_mode(int mode); 119 int tc_set_new_mode(int mode);
116 } 120 }
117 #endif 121 #endif
118 122
119 namespace content { 123 namespace content {
120 extern int GpuMain(const content::MainFunctionParams&); 124 extern int GpuMain(const content::MainFunctionParams&);
121 #if defined(ENABLE_PLUGINS) 125 #if defined(ENABLE_PLUGINS)
122 #if !defined(OS_LINUX) 126 #if !defined(OS_LINUX)
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 if (service_port.is_valid()) { 680 if (service_port.is_valid()) {
677 ChildIOSurfaceManager::GetInstance()->set_service_port( 681 ChildIOSurfaceManager::GetInstance()->set_service_port(
678 service_port.release()); 682 service_port.release());
679 IOSurfaceManager::SetInstance(ChildIOSurfaceManager::GetInstance()); 683 IOSurfaceManager::SetInstance(ChildIOSurfaceManager::GetInstance());
680 } 684 }
681 } 685 }
682 #elif defined(OS_WIN) 686 #elif defined(OS_WIN)
683 SetupCRT(command_line); 687 SetupCRT(command_line);
684 #endif 688 #endif
685 689
690 #if defined(USE_OZONE)
691 if (process_type == switches::kRendererProcess) {
692 native_pixmap_manager_ = ui::NativePixmapManager::Create();
693 ui::NativePixmapManager::SetInstance(native_pixmap_manager_.get());
694 }
695 #endif
696
686 #if defined(OS_POSIX) 697 #if defined(OS_POSIX)
687 if (!process_type.empty()) { 698 if (!process_type.empty()) {
688 // When you hit Ctrl-C in a terminal running the browser 699 // When you hit Ctrl-C in a terminal running the browser
689 // process, a SIGINT is delivered to the entire process group. 700 // process, a SIGINT is delivered to the entire process group.
690 // When debugging the browser process via gdb, gdb catches the 701 // When debugging the browser process via gdb, gdb catches the
691 // SIGINT for the browser process (and dumps you back to the gdb 702 // SIGINT for the browser process (and dumps you back to the gdb
692 // console) but doesn't for the child processes, killing them. 703 // console) but doesn't for the child processes, killing them.
693 // The fix is to have child processes ignore SIGINT; they'll die 704 // The fix is to have child processes ignore SIGINT; they'll die
694 // on their own when the browser process goes away. 705 // on their own when the browser process goes away.
695 // 706 //
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 867
857 // The delegate will outlive this object. 868 // The delegate will outlive this object.
858 ContentMainDelegate* delegate_; 869 ContentMainDelegate* delegate_;
859 870
860 scoped_ptr<base::AtExitManager> exit_manager_; 871 scoped_ptr<base::AtExitManager> exit_manager_;
861 #if defined(OS_WIN) 872 #if defined(OS_WIN)
862 sandbox::SandboxInterfaceInfo sandbox_info_; 873 sandbox::SandboxInterfaceInfo sandbox_info_;
863 #elif defined(OS_MACOSX) 874 #elif defined(OS_MACOSX)
864 scoped_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_; 875 scoped_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_;
865 #endif 876 #endif
877 #if defined(USE_OZONE)
878 scoped_ptr<ui::NativePixmapManager> native_pixmap_manager_;
879 #endif
866 880
867 base::Closure* ui_task_; 881 base::Closure* ui_task_;
868 882
869 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 883 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
870 }; 884 };
871 885
872 // static 886 // static
873 ContentMainRunner* ContentMainRunner::Create() { 887 ContentMainRunner* ContentMainRunner::Create() {
874 return new ContentMainRunnerImpl(); 888 return new ContentMainRunnerImpl();
875 } 889 }
876 890
877 } // namespace content 891 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_main_loop.h » ('j') | ui/ozone/public/native_pixmap_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698