]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix coding styles
authorCheng Zhao <zcbenz@gmail.com>
Tue, 29 Dec 2015 08:41:44 +0000 (16:41 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 29 Dec 2015 10:59:27 +0000 (18:59 +0800)
atom/app/atom_content_client.cc
atom/browser/atom_browser_client.cc
atom/renderer/atom_renderer_client.cc
atom/renderer/atom_renderer_client.h
chromium_src/chrome/browser/renderer_host/pepper/widevine_cdm_message_filter.cc
chromium_src/chrome/common/chrome_paths.cc

index 18bc36f9445812d06ed23d7b20ecc08ca49ff7ec..997f66447ce9e363af187de0111973827442b08e 100644 (file)
 #include "content/public/common/pepper_plugin_info.h"
 #include "content/public/common/user_agent.h"
 #include "ppapi/shared_impl/ppapi_permissions.h"
-#include "url/url_constants.h"
-
 #include "third_party/widevine/cdm/stub/widevine_cdm_version.h"
+#include "url/url_constants.h"
 
-// The following must be after widevine_cdm_version.h.
 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
-// && !defined(WIDEVINE_CDM_IS_COMPONENT)
 #include "chrome/common/widevine_cdm_constants.h"
 #endif
 
@@ -73,10 +70,7 @@ content::PepperPluginInfo CreatePepperFlashInfo(const base::FilePath& path,
   return plugin;
 }
 
-
 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
-//&& !defined(WIDEVINE_CDM_IS_COMPONENT)
-
 content::PepperPluginInfo CreateWidevineCdmInfo(const base::FilePath& path,
                                                 const std::string& version) {
   content::PepperPluginInfo widevine_cdm;
@@ -113,11 +107,7 @@ content::PepperPluginInfo CreateWidevineCdmInfo(const base::FilePath& path,
 
   return widevine_cdm;
 }
-
 #endif
-// defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) &&
-// !defined(WIDEVINE_CDM_IS_COMPONENT)
-
 
 void ConvertStringWithSeparatorToVector(std::vector<std::string>* vec,
                                         const char* separator,
@@ -148,12 +138,11 @@ void AddPepperFlashFromCommandLine(
 }
 
 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
-//&& !defined(WIDEVINE_CDM_IS_COMPONENT)
 void AddWidevineCdmFromCommandLine(
     std::vector<content::PepperPluginInfo>* plugins) {
   auto command_line = base::CommandLine::ForCurrentProcess();
   auto widevine_cdm_path = command_line->GetSwitchValueNative(
-    switches::kWidevineCdmPath);
+      switches::kWidevineCdmPath);
   if (widevine_cdm_path.empty())
     return;
 
@@ -161,19 +150,14 @@ void AddWidevineCdmFromCommandLine(
     return;
 
   auto widevine_cdm_version = command_line->GetSwitchValueASCII(
-    switches::kWidevineCdmVersion);
+      switches::kWidevineCdmVersion);
   if (widevine_cdm_version.empty())
     return;
 
-  plugins->push_back(
-      CreateWidevineCdmInfo(base::FilePath(widevine_cdm_path),
-                            widevine_cdm_version));
+  plugins->push_back(CreateWidevineCdmInfo(base::FilePath(widevine_cdm_path),
+                                           widevine_cdm_version));
 }
 #endif
-// defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) &&
-// !defined(WIDEVINE_CDM_IS_COMPONENT)
-
-
 
 AtomContentClient::AtomContentClient() {
 }
@@ -207,11 +191,9 @@ void AtomContentClient::AddAdditionalSchemes(
 void AtomContentClient::AddPepperPlugins(
     std::vector<content::PepperPluginInfo>* plugins) {
   AddPepperFlashFromCommandLine(plugins);
-
-  #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
-  //&& !defined(WIDEVINE_CDM_IS_COMPONENT)
+#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
   AddWidevineCdmFromCommandLine(plugins);
-  #endif
+#endif
 }
 
 void AtomContentClient::AddServiceWorkerSchemes(
index 87653a6b94404ff43e8ef541fcff329ed05b9a33..5ad8e69ffc740a6a382d5f1a66f44ca866c35025 100644 (file)
@@ -107,7 +107,7 @@ void AtomBrowserClient::RenderProcessWillLaunch(
   host->AddFilter(new printing::PrintingMessageFilter(process_id));
   host->AddFilter(new TtsMessageFilter(process_id, host->GetBrowserContext()));
   host->AddFilter(
-    new WidevineCdmMessageFilter(process_id, host->GetBrowserContext()));
+      new WidevineCdmMessageFilter(process_id, host->GetBrowserContext()));
 }
 
 content::SpeechRecognitionManagerDelegate*
index ab2ac39815770fadf3b006fa3adba73386ed974c..6abe839b83f6e6770c5bef17b844124557d7834f 100644 (file)
@@ -237,7 +237,7 @@ void AtomRendererClient::EnableWebRuntimeFeatures() {
 }
 
 void AtomRendererClient::AddKeySystems(
-  std::vector<media::KeySystemInfo>* key_systems) {
+    std::vector<media::KeySystemInfo>* key_systems) {
   AddChromeKeySystems(key_systems);
 }
 
index e6da5366660019c38c2ec6a3096fea55626dd36a..ee082e964c765e89960070e9a1c8c7b7cb5e1c5c 100644 (file)
@@ -60,6 +60,7 @@ class AtomRendererClient : public content::ContentRendererClient,
       const content::RenderFrame* render_frame,
       blink::WebPageVisibilityState* override_state) override;
   void AddKeySystems(std::vector<media::KeySystemInfo>* key_systems) override;
+
   void EnableWebRuntimeFeatures();
 
   scoped_ptr<NodeBindings> node_bindings_;
index 869bf85cd3fc5868a53a54528483f660895fd218..c926b9e94aa7f7b41e90b567b5c8d8d7b5856d2f 100644 (file)
@@ -9,6 +9,7 @@
 #include "content/public/browser/render_process_host.h"
 #include "content/public/common/webplugininfo.h"
 #include "content/public/browser/plugin_service.h"
+
 using content::PluginService;
 using content::WebPluginInfo;
 using content::BrowserThread;
@@ -39,7 +40,6 @@ void WidevineCdmMessageFilter::OnIsInternalPluginAvailableForMimeType(
     bool* is_available,
     std::vector<base::string16>* additional_param_names,
     std::vector<base::string16>* additional_param_values) {
-
   std::vector<WebPluginInfo> plugins;
   PluginService::GetInstance()->GetInternalPlugins(&plugins);
 
@@ -67,4 +67,4 @@ void WidevineCdmMessageFilter::OnDestruct() const {
 }
 
 WidevineCdmMessageFilter::~WidevineCdmMessageFilter() {
-}
\ No newline at end of file
+}
index 3cc7b02ffa0060be1d4abf6ea3f0e627477ffe97..293ea2638aef8853ada5d8b5842dd517dd5c2173 100644 (file)
@@ -16,6 +16,7 @@
 #include "chrome/common/chrome_constants.h"
 #include "chrome/common/chrome_paths_internal.h"
 #include "chrome/common/widevine_cdm_constants.h"
+#include "third_party/widevine/cdm/stub/widevine_cdm_version.h"
 
 #if defined(OS_ANDROID)
 #include "base/android/path_utils.h"
@@ -32,8 +33,6 @@
 #include "base/win/registry.h"
 #endif
 
-#include "third_party/widevine/cdm/stub/widevine_cdm_version.h"
-
 namespace {
 
 // The Pepper Flash plugins are in a directory with this name.