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

Side by Side Diff: content/shell/shell_main_delegate.cc

Issue 9316077: Enable audio/video tag in content_shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 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/shell/shell_main_delegate.h" 5 #include "content/shell/shell_main_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
11 #include "content/shell/shell_content_browser_client.h" 11 #include "content/shell/shell_content_browser_client.h"
12 #include "content/shell/shell_content_plugin_client.h" 12 #include "content/shell/shell_content_plugin_client.h"
13 #include "content/shell/shell_content_renderer_client.h" 13 #include "content/shell/shell_content_renderer_client.h"
14 #include "content/shell/shell_content_utility_client.h" 14 #include "content/shell/shell_content_utility_client.h"
15 #include "content/shell/shell_render_process_observer.h" 15 #include "content/shell/shell_render_process_observer.h"
16 #include "media/base/media.h"
16 #include "ui/base/resource/resource_bundle.h" 17 #include "ui/base/resource/resource_bundle.h"
17 #include "ui/base/ui_base_paths.h" 18 #include "ui/base/ui_base_paths.h"
18 19
19 ShellMainDelegate::ShellMainDelegate() { 20 ShellMainDelegate::ShellMainDelegate() {
20 } 21 }
21 22
22 ShellMainDelegate::~ShellMainDelegate() { 23 ShellMainDelegate::~ShellMainDelegate() {
23 } 24 }
24 25
25 bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { 26 bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 return false; 61 return false;
61 } 62 }
62 63
63 bool ShellMainDelegate::DelaySandboxInitialization( 64 bool ShellMainDelegate::DelaySandboxInitialization(
64 const std::string& process_type) { 65 const std::string& process_type) {
65 return false; 66 return false;
66 } 67 }
67 68
68 #elif defined(OS_POSIX) 69 #elif defined(OS_POSIX)
69 content::ZygoteForkDelegate* ShellMainDelegate::ZygoteStarting() { 70 content::ZygoteForkDelegate* ShellMainDelegate::ZygoteStarting() {
71 FilePath media_path;
jam 2012/02/03 00:49:44 in general, we want embedders to have to do as lea
vrk (LEFT CHROMIUM) 2012/03/06 02:07:50 Done.
72 if (PathService::Get(base::DIR_MODULE, &media_path))
73 media::InitializeMediaLibrary(media_path);
70 return NULL; 74 return NULL;
71 } 75 }
72 76
73 void ShellMainDelegate::ZygoteForked() { 77 void ShellMainDelegate::ZygoteForked() {
74 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 78 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
75 std::string process_type = 79 std::string process_type =
76 command_line.GetSwitchValueASCII(switches::kProcessType); 80 command_line.GetSwitchValueASCII(switches::kProcessType);
77 InitializeShellContentClient(process_type); 81 InitializeShellContentClient(process_type);
78 } 82 }
79 #endif // OS_MACOSX 83 #endif // OS_MACOSX
(...skipping 15 matching lines...) Expand all
95 } 99 }
96 } 100 }
97 101
98 void ShellMainDelegate::InitializeResourceBundle() { 102 void ShellMainDelegate::InitializeResourceBundle() {
99 FilePath pak_dir; 103 FilePath pak_dir;
100 PathService::Get(base::DIR_MODULE, &pak_dir); 104 PathService::Get(base::DIR_MODULE, &pak_dir);
101 105
102 FilePath pak_file = pak_dir.Append(FILE_PATH_LITERAL("content_shell.pak")); 106 FilePath pak_file = pak_dir.Append(FILE_PATH_LITERAL("content_shell.pak"));
103 ui::ResourceBundle::InitSharedInstanceWithPakFile(pak_file); 107 ui::ResourceBundle::InitSharedInstanceWithPakFile(pak_file);
104 } 108 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698