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

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

Issue 2174203002: OnDrawHardware() implementation with async messages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added flag to branch old and new implementation Created 4 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "content/public/gpu/content_gpu_client.h" 62 #include "content/public/gpu/content_gpu_client.h"
63 #include "content/public/renderer/content_renderer_client.h" 63 #include "content/public/renderer/content_renderer_client.h"
64 #include "content/public/utility/content_utility_client.h" 64 #include "content/public/utility/content_utility_client.h"
65 #include "content/renderer/in_process_renderer_thread.h" 65 #include "content/renderer/in_process_renderer_thread.h"
66 #include "content/utility/in_process_utility_thread.h" 66 #include "content/utility/in_process_utility_thread.h"
67 #include "ipc/ipc_descriptors.h" 67 #include "ipc/ipc_descriptors.h"
68 #include "ipc/ipc_switches.h" 68 #include "ipc/ipc_switches.h"
69 #include "media/base/media.h" 69 #include "media/base/media.h"
70 #include "ui/base/ui_base_paths.h" 70 #include "ui/base/ui_base_paths.h"
71 #include "ui/base/ui_base_switches.h" 71 #include "ui/base/ui_base_switches.h"
72 #include "ui/gl/init/gl_factory.h"
72 73
73 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 74 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
74 #include "gin/v8_initializer.h" 75 #include "gin/v8_initializer.h"
75 #endif 76 #endif
76 77
77 #if defined(OS_WIN) 78 #if defined(OS_WIN)
78 #include <malloc.h> 79 #include <malloc.h>
79 #include <cstring> 80 #include <cstring>
80 81
81 #include "base/trace_event/trace_event_etw_export_win.h" 82 #include "base/trace_event/trace_event_etw_export_win.h"
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 // On OS X the renderer sandbox needs to be initialized later in the 748 // On OS X the renderer sandbox needs to be initialized later in the
748 // startup sequence in RendererMainPlatformDelegate::EnableSandbox(). 749 // startup sequence in RendererMainPlatformDelegate::EnableSandbox().
749 } else { 750 } else {
750 CHECK(InitializeSandbox()); 751 CHECK(InitializeSandbox());
751 } 752 }
752 #endif 753 #endif
753 754
754 if (delegate_) 755 if (delegate_)
755 delegate_->SandboxInitialized(process_type); 756 delegate_->SandboxInitialized(process_type);
756 757
758 if (!gl::init::InitializeGLOneOff())
759 VLOG(1) << "gl::init::InitializeGLOneOff failed";
boliu 2016/08/11 19:23:39 let's pull out the binding init into a separate CL
ojars 2016/08/23 02:15:42 Done.
760
757 // Return -1 to indicate no early termination. 761 // Return -1 to indicate no early termination.
758 return -1; 762 return -1;
759 } 763 }
760 764
761 int Run() override { 765 int Run() override {
762 DCHECK(is_initialized_); 766 DCHECK(is_initialized_);
763 DCHECK(!is_shutdown_); 767 DCHECK(!is_shutdown_);
764 const base::CommandLine& command_line = 768 const base::CommandLine& command_line =
765 *base::CommandLine::ForCurrentProcess(); 769 *base::CommandLine::ForCurrentProcess();
766 std::string process_type = 770 std::string process_type =
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 845
842 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 846 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
843 }; 847 };
844 848
845 // static 849 // static
846 ContentMainRunner* ContentMainRunner::Create() { 850 ContentMainRunner* ContentMainRunner::Create() {
847 return new ContentMainRunnerImpl(); 851 return new ContentMainRunnerImpl();
848 } 852 }
849 853
850 } // namespace content 854 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698