Browse Source

Format line length to 80 instead of 100

Kevin Sawicki 8 years ago
parent
commit
2ece711c2e
27 changed files with 161 additions and 96 deletions
  1. 0 1
      brightray/CPPLINT.cfg
  2. 2 1
      brightray/browser/browser_client.cc
  3. 2 1
      brightray/browser/browser_client.h
  4. 6 4
      brightray/browser/browser_context.cc
  5. 2 1
      brightray/browser/inspectable_web_contents.h
  6. 45 29
      brightray/browser/inspectable_web_contents_impl.cc
  7. 2 1
      brightray/browser/inspectable_web_contents_impl.h
  8. 5 4
      brightray/browser/linux/libnotify_loader.cc
  9. 6 3
      brightray/browser/linux/libnotify_loader.h
  10. 2 1
      brightray/browser/linux/libnotify_notification.cc
  11. 4 2
      brightray/browser/media/media_stream_devices_controller.cc
  12. 3 2
      brightray/browser/net/devtools_network_controller.h
  13. 3 2
      brightray/browser/net/devtools_network_controller_handle.h
  14. 2 1
      brightray/browser/net/devtools_network_protocol_handler.cc
  15. 4 3
      brightray/browser/net/devtools_network_transaction_factory.h
  16. 2 1
      brightray/browser/net_log.cc
  17. 2 1
      brightray/browser/network_delegate.cc
  18. 7 4
      brightray/browser/permission_manager.h
  19. 4 2
      brightray/browser/platform_notification_service.cc
  20. 18 9
      brightray/browser/url_request_context_getter.cc
  21. 3 3
      brightray/browser/url_request_context_getter.h
  22. 19 10
      brightray/browser/views/inspectable_web_contents_view_views.cc
  23. 2 1
      brightray/browser/views/views_delegate.cc
  24. 2 1
      brightray/browser/win/notification_presenter_win.cc
  25. 9 3
      brightray/browser/win/notification_presenter_win.h
  26. 3 4
      brightray/common/main_delegate.cc
  27. 2 1
      brightray/common/switches.cc

+ 0 - 1
brightray/CPPLINT.cfg

@@ -1,2 +1 @@
 filter=-build/header_guard,-build/include_what_you_use,-legal/copyright,-runtime/references
-linelength=100

+ 2 - 1
brightray/browser/browser_client.cc

@@ -68,7 +68,8 @@ content::MediaObserver* BrowserClient::GetMediaObserver() {
   return MediaCaptureDevicesDispatcher::GetInstance();
 }
 
-content::PlatformNotificationService* BrowserClient::GetPlatformNotificationService() {
+content::PlatformNotificationService*
+BrowserClient::GetPlatformNotificationService() {
   if (!notification_service_)
     notification_service_.reset(new PlatformNotificationService(this));
   return notification_service_.get();

+ 2 - 1
brightray/browser/browser_client.h

@@ -39,7 +39,8 @@ class BrowserClient : public content::ContentBrowserClient {
   content::BrowserMainParts* CreateBrowserMainParts(
       const content::MainFunctionParams&) override;
   content::MediaObserver* GetMediaObserver() override;
-  content::PlatformNotificationService* GetPlatformNotificationService() override;
+  content::PlatformNotificationService* GetPlatformNotificationService()
+      override;
   void GetAdditionalAllowedSchemesForFileSystem(
       std::vector<std::string>* additional_schemes) override;
   net::NetLog* GetNetLog() override;

+ 6 - 4
brightray/browser/browser_context.cc

@@ -94,7 +94,8 @@ BrowserContext::BrowserContext(const std::string& partition, bool in_memory)
 
   if (!in_memory_ && !partition.empty())
     path_ = path_.Append(FILE_PATH_LITERAL("Partitions"))
-                 .Append(base::FilePath::FromUTF8Unsafe(MakePartitionName(partition)));
+                .Append(base::FilePath::FromUTF8Unsafe(
+                    MakePartitionName(partition)));
 
   content::BrowserContext::Initialize(this, path_);
 
@@ -168,8 +169,8 @@ base::FilePath BrowserContext::GetPath() const {
   return path_;
 }
 
-std::unique_ptr<content::ZoomLevelDelegate> BrowserContext::CreateZoomLevelDelegate(
-    const base::FilePath& partition_path) {
+std::unique_ptr<content::ZoomLevelDelegate>
+BrowserContext::CreateZoomLevelDelegate(const base::FilePath& partition_path) {
   if (!IsOffTheRecord()) {
     return base::MakeUnique<ZoomLevelDelegate>(prefs(), partition_path);
   }
@@ -210,7 +211,8 @@ content::PermissionManager* BrowserContext::GetPermissionManager() {
   return permission_manager_.get();
 }
 
-content::BackgroundSyncController* BrowserContext::GetBackgroundSyncController() {
+content::BackgroundSyncController*
+BrowserContext::GetBackgroundSyncController() {
   return nullptr;
 }
 

+ 2 - 1
brightray/browser/inspectable_web_contents.h

@@ -18,7 +18,8 @@ class InspectableWebContentsView;
 
 class InspectableWebContents {
  public:
-  static InspectableWebContents* Create(const content::WebContents::CreateParams&);
+  static InspectableWebContents* Create(
+      const content::WebContents::CreateParams&);
 
   // The returned InspectableWebContents takes ownership of the passed-in
   // WebContents.

+ 45 - 29
brightray/browser/inspectable_web_contents_impl.cc

@@ -136,7 +136,8 @@ GURL GetDevToolsURL(bool can_dock) {
 
 class ResponseWriter : public net::URLFetcherResponseWriter {
  public:
-  ResponseWriter(base::WeakPtr<InspectableWebContentsImpl> bindings, int stream_id);
+  ResponseWriter(base::WeakPtr<InspectableWebContentsImpl> bindings,
+                 int stream_id);
   ~ResponseWriter() override;
 
   // URLFetcherResponseWriter overrides:
@@ -153,8 +154,9 @@ class ResponseWriter : public net::URLFetcherResponseWriter {
   DISALLOW_COPY_AND_ASSIGN(ResponseWriter);
 };
 
-ResponseWriter::ResponseWriter(base::WeakPtr<InspectableWebContentsImpl> bindings,
-                               int stream_id)
+ResponseWriter::ResponseWriter(
+    base::WeakPtr<InspectableWebContentsImpl> bindings,
+    int stream_id)
     : bindings_(bindings),
       stream_id_(stream_id) {
 }
@@ -207,7 +209,8 @@ InspectableWebContentsImpl::InspectableWebContentsImpl(
       delegate_(nullptr),
       web_contents_(web_contents),
       weak_factory_(this) {
-  auto context = static_cast<BrowserContext*>(web_contents_->GetBrowserContext());
+  auto context =
+      static_cast<BrowserContext*>(web_contents_->GetBrowserContext());
   pref_service_ = context->prefs();
   auto bounds_dict = pref_service_->GetDictionary(kDevToolsBoundsPref);
   if (bounds_dict) {
@@ -226,8 +229,10 @@ InspectableWebContentsImpl::InspectableWebContentsImpl(
         display = display::Screen::GetScreen()->GetPrimaryDisplay().bounds();
       }
 
-      devtools_bounds_.set_x(display.x() + (display.width() - devtools_bounds_.width()) / 2);
-      devtools_bounds_.set_y(display.y() + (display.height() - devtools_bounds_.height()) / 2);
+      devtools_bounds_.set_x(display.x() +
+                             (display.width() - devtools_bounds_.width()) / 2);
+      devtools_bounds_.set_y(
+          display.y() + (display.height() - devtools_bounds_.height()) / 2);
     }
   }
 
@@ -246,7 +251,8 @@ content::WebContents* InspectableWebContentsImpl::GetWebContents() const {
   return web_contents_.get();
 }
 
-content::WebContents* InspectableWebContentsImpl::GetDevToolsWebContents() const {
+content::WebContents* InspectableWebContentsImpl::GetDevToolsWebContents()
+    const {
   return devtools_web_contents_.get();
 }
 
@@ -255,11 +261,13 @@ void InspectableWebContentsImpl::InspectElement(int x, int y) {
     agent_host_->InspectElement(this, x, y);
 }
 
-void InspectableWebContentsImpl::SetDelegate(InspectableWebContentsDelegate* delegate) {
+void InspectableWebContentsImpl::SetDelegate(
+    InspectableWebContentsDelegate* delegate) {
   delegate_ = delegate;
 }
 
-InspectableWebContentsDelegate* InspectableWebContentsImpl::GetDelegate() const {
+InspectableWebContentsDelegate* InspectableWebContentsImpl::GetDelegate()
+    const {
   return delegate_;
 }
 
@@ -279,7 +287,8 @@ void InspectableWebContentsImpl::ShowDevTools() {
     embedder_message_dispatcher_.reset(
         DevToolsEmbedderMessageDispatcher::CreateForDevToolsFrontend(this));
 
-    content::WebContents::CreateParams create_params(web_contents_->GetBrowserContext());
+    content::WebContents::CreateParams create_params(
+        web_contents_->GetBrowserContext());
     devtools_web_contents_.reset(content::WebContents::Create(create_params));
 
     Observe(devtools_web_contents_.get());
@@ -324,10 +333,11 @@ void InspectableWebContentsImpl::Detach() {
   agent_host_ = nullptr;
 }
 
-void InspectableWebContentsImpl::CallClientFunction(const std::string& function_name,
-                                                    const base::Value* arg1,
-                                                    const base::Value* arg2,
-                                                    const base::Value* arg3) {
+void InspectableWebContentsImpl::CallClientFunction(
+    const std::string& function_name,
+    const base::Value* arg1,
+    const base::Value* arg2,
+    const base::Value* arg3) {
   if (!devtools_web_contents_)
     return;
 
@@ -433,15 +443,17 @@ void InspectableWebContentsImpl::LoadNetworkResource(
     return;
   }
 
-  auto browser_context = static_cast<BrowserContext*>(devtools_web_contents_->GetBrowserContext());
+  auto browser_context =
+      static_cast<BrowserContext*>(devtools_web_contents_->GetBrowserContext());
 
   net::URLFetcher* fetcher =
       (net::URLFetcher::Create(gurl, net::URLFetcher::GET, this)).release();
   pending_requests_[fetcher] = callback;
   fetcher->SetRequestContext(browser_context->url_request_context_getter());
   fetcher->SetExtraRequestHeaders(headers);
-  fetcher->SaveResponseWithWriter(std::unique_ptr<net::URLFetcherResponseWriter>(
-      new ResponseWriter(weak_factory_.GetWeakPtr(), stream_id)));
+  fetcher->SaveResponseWithWriter(
+      std::unique_ptr<net::URLFetcherResponseWriter>(
+          new ResponseWriter(weak_factory_.GetWeakPtr(), stream_id)));
   fetcher->Start();
 }
 
@@ -509,7 +521,8 @@ void InspectableWebContentsImpl::SearchInPath(
     delegate_->DevToolsSearchInPath(request_id, file_system_path, query);
 }
 
-void InspectableWebContentsImpl::SetWhitelistedShortcuts(const std::string& message) {
+void InspectableWebContentsImpl::SetWhitelistedShortcuts(
+    const std::string& message) {
 }
 
 void InspectableWebContentsImpl::ZoomIn() {
@@ -548,16 +561,18 @@ void InspectableWebContentsImpl::DispatchProtocolMessageFromDevToolsFrontend(
     agent_host_->DispatchProtocolMessage(this, message);
 }
 
-void InspectableWebContentsImpl::RecordActionUMA(const std::string& name, int action) {
+void InspectableWebContentsImpl::RecordActionUMA(const std::string& name,
+                                                 int action) {
   if (name == kDevToolsActionTakenHistogram)
     UMA_HISTOGRAM_ENUMERATION(name, action, kDevToolsActionTakenBoundary);
   else if (name == kDevToolsPanelShownHistogram)
     UMA_HISTOGRAM_ENUMERATION(name, action, kDevToolsPanelShownBoundary);
 }
 
-void InspectableWebContentsImpl::SendJsonRequest(const DispatchCallback& callback,
-                                         const std::string& browser_id,
-                                         const std::string& url) {
+void InspectableWebContentsImpl::SendJsonRequest(
+    const DispatchCallback& callback,
+    const std::string& browser_id,
+    const std::string& url) {
   callback.Run(nullptr);
 }
 
@@ -584,7 +599,8 @@ void InspectableWebContentsImpl::ClearPreferences() {
   update.Get()->Clear();
 }
 
-void InspectableWebContentsImpl::HandleMessageFromDevToolsFrontend(const std::string& message) {
+void InspectableWebContentsImpl::HandleMessageFromDevToolsFrontend(
+    const std::string& message) {
   std::string method;
   base::ListValue empty_params;
   base::ListValue* params = &empty_params;
@@ -728,14 +744,14 @@ void InspectableWebContentsImpl::OnWebContentsFocused() {
 void InspectableWebContentsImpl::DidStartNavigationToPendingEntry(
     const GURL& url,
     content::ReloadType reload_type) {
-  frontend_host_.reset(
-      content::DevToolsFrontendHost::Create(
-          web_contents()->GetMainFrame(),
-          base::Bind(&InspectableWebContentsImpl::HandleMessageFromDevToolsFrontend,
-                     base::Unretained(this))));
+  frontend_host_.reset(content::DevToolsFrontendHost::Create(
+      web_contents()->GetMainFrame(),
+      base::Bind(&InspectableWebContentsImpl::HandleMessageFromDevToolsFrontend,
+                 base::Unretained(this))));
 }
 
-void InspectableWebContentsImpl::OnURLFetchComplete(const net::URLFetcher* source) {
+void InspectableWebContentsImpl::OnURLFetchComplete(
+    const net::URLFetcher* source) {
   DCHECK(source);
   auto it = pending_requests_.find(source);
   DCHECK(it != pending_requests_.end());

+ 2 - 1
brightray/browser/inspectable_web_contents_impl.h

@@ -173,7 +173,8 @@ class InspectableWebContentsImpl :
   bool frontend_loaded_;
   scoped_refptr<content::DevToolsAgentHost> agent_host_;
   std::unique_ptr<content::DevToolsFrontendHost> frontend_host_;
-  std::unique_ptr<DevToolsEmbedderMessageDispatcher> embedder_message_dispatcher_;
+  std::unique_ptr<DevToolsEmbedderMessageDispatcher>
+      embedder_message_dispatcher_;
 
   DevToolsContentsResizingStrategy contents_resizing_strategy_;
   gfx::Rect devtools_bounds_;

+ 5 - 4
brightray/browser/linux/libnotify_loader.cc

@@ -1,5 +1,6 @@
 // This is generated file. Do not modify directly.
-// Path to the code generator: tools/generate_library_loader/generate_library_loader.py .
+// Path to the code generator:
+// tools/generate_library_loader/generate_library_loader.py .
 
 #include "browser/linux/libnotify_loader.h"
 
@@ -68,9 +69,9 @@ bool LibNotifyLoader::Load(const std::string& library_name) {
     return false;
   }
 
-  notify_notification_set_image_from_pixbuf =
-      reinterpret_cast<decltype(this->notify_notification_set_image_from_pixbuf)>(
-          dlsym(library_, "notify_notification_set_image_from_pixbuf"));
+  notify_notification_set_image_from_pixbuf = reinterpret_cast<decltype(
+      this->notify_notification_set_image_from_pixbuf)>(
+      dlsym(library_, "notify_notification_set_image_from_pixbuf"));
   if (!notify_notification_set_image_from_pixbuf) {
     CleanUp(true);
     return false;

+ 6 - 3
brightray/browser/linux/libnotify_loader.h

@@ -1,5 +1,6 @@
 // This is generated file. Do not modify directly.
-// Path to the code generator: tools/generate_library_loader/generate_library_loader.py .
+// Path to the code generator:
+// tools/generate_library_loader/generate_library_loader.py .
 
 #ifndef BRIGHTRAY_BROWSER_LINUX_LIBNOTIFY_LOADER_H_
 #define BRIGHTRAY_BROWSER_LINUX_LIBNOTIFY_LOADER_H_
@@ -24,9 +25,11 @@ class LibNotifyLoader {
   decltype(&::notify_get_server_info) notify_get_server_info;
   decltype(&::notify_notification_new) notify_notification_new;
   decltype(&::notify_notification_add_action) notify_notification_add_action;
-  decltype(&::notify_notification_set_image_from_pixbuf) notify_notification_set_image_from_pixbuf;
+  decltype(&::notify_notification_set_image_from_pixbuf)
+      notify_notification_set_image_from_pixbuf;
   decltype(&::notify_notification_set_timeout) notify_notification_set_timeout;
-  decltype(&::notify_notification_set_hint_string) notify_notification_set_hint_string;
+  decltype(&::notify_notification_set_hint_string)
+      notify_notification_set_hint_string;
   decltype(&::notify_notification_show) notify_notification_show;
   decltype(&::notify_notification_close) notify_notification_close;
 

+ 2 - 1
brightray/browser/linux/libnotify_notification.cc

@@ -22,7 +22,8 @@ bool HasCapability(const std::string& capability) {
   bool result = false;
   GList* capabilities = libnotify_loader_.notify_get_server_caps();
 
-  if (g_list_find_custom(capabilities, capability.c_str(), (GCompareFunc) g_strcmp0) != NULL)
+  if (g_list_find_custom(capabilities, capability.c_str(),
+                         (GCompareFunc)g_strcmp0) != NULL)
     result = true;
 
   g_list_free_full(capabilities, g_free);

+ 4 - 2
brightray/browser/media/media_stream_devices_controller.cc

@@ -142,10 +142,12 @@ void MediaStreamDevicesController::Accept() {
 
   content::MediaResponseCallback cb = callback_;
   callback_.Reset();
-  cb.Run(devices, content::MEDIA_DEVICE_OK, std::unique_ptr<content::MediaStreamUI>());
+  cb.Run(devices, content::MEDIA_DEVICE_OK,
+         std::unique_ptr<content::MediaStreamUI>());
 }
 
-void MediaStreamDevicesController::Deny(content::MediaStreamRequestResult result) {
+void MediaStreamDevicesController::Deny(
+    content::MediaStreamRequestResult result) {
   content::MediaResponseCallback cb = callback_;
   callback_.Reset();
   cb.Run(content::MediaStreamDevices(),

+ 3 - 2
brightray/browser/net/devtools_network_controller.h

@@ -24,8 +24,9 @@ class DevToolsNetworkController {
   DevToolsNetworkInterceptor* GetInterceptor(const std::string& client_id);
 
  private:
-  using InterceptorMap = base::ScopedPtrHashMap<std::string,
-                                                std::unique_ptr<DevToolsNetworkInterceptor>>;
+  using InterceptorMap =
+      base::ScopedPtrHashMap<std::string,
+                             std::unique_ptr<DevToolsNetworkInterceptor>>;
 
   std::unique_ptr<DevToolsNetworkInterceptor> appcache_interceptor_;
   InterceptorMap interceptors_;

+ 3 - 2
brightray/browser/net/devtools_network_controller_handle.h

@@ -31,8 +31,9 @@ class DevToolsNetworkControllerHandle {
 
  private:
   void LazyInitialize();
-  void SetNetworkStateOnIO(const std::string& client_id,
-                           std::unique_ptr<DevToolsNetworkConditions> conditions);
+  void SetNetworkStateOnIO(
+      const std::string& client_id,
+      std::unique_ptr<DevToolsNetworkConditions> conditions);
 
   std::unique_ptr<DevToolsNetworkController> controller_;
 

+ 2 - 1
brightray/browser/net/devtools_network_protocol_handler.cc

@@ -30,7 +30,8 @@ const char kErrorMessage[] = "message";
 }  //  namespace params
 
 const char kEmulateNetworkConditions[] = "Network.emulateNetworkConditions";
-const char kCanEmulateNetworkConditions[] = "Network.canEmulateNetworkConditions";
+const char kCanEmulateNetworkConditions[] =
+    "Network.canEmulateNetworkConditions";
 const char kId[] = "id";
 const char kMethod[] = "method";
 const char kParams[] = "params";

+ 4 - 3
brightray/browser/net/devtools_network_transaction_factory.h

@@ -21,13 +21,14 @@ class DevToolsNetworkTransactionFactory : public net::HttpTransactionFactory {
   ~DevToolsNetworkTransactionFactory() override;
 
   // net::HttpTransactionFactory:
-  int CreateTransaction(net::RequestPriority priority,
-                        std::unique_ptr<net::HttpTransaction>* transaction) override;
+  int CreateTransaction(
+      net::RequestPriority priority,
+      std::unique_ptr<net::HttpTransaction>* transaction) override;
   net::HttpCache* GetCache() override;
   net::HttpNetworkSession* GetSession() override;
 
  private:
-  DevToolsNetworkController*  controller_;
+  DevToolsNetworkController* controller_;
   std::unique_ptr<net::HttpTransactionFactory> network_layer_;
 
   DISALLOW_COPY_AND_ASSIGN(DevToolsNetworkTransactionFactory);

+ 2 - 1
brightray/browser/net_log.cc

@@ -40,7 +40,8 @@ void NetLog::StartLogging(net::URLRequestContext* url_request_context) {
   if (!command_line->HasSwitch(switches::kLogNetLog))
     return;
 
-  base::FilePath log_path = command_line->GetSwitchValuePath(switches::kLogNetLog);
+  base::FilePath log_path =
+      command_line->GetSwitchValuePath(switches::kLogNetLog);
 #if defined(OS_WIN)
   log_file_.reset(_wfopen(log_path.value().c_str(), L"w"));
 #elif defined(OS_POSIX)

+ 2 - 1
brightray/browser/network_delegate.cc

@@ -25,7 +25,8 @@ const char kIgnoreConnectionsLimit[] = "ignore-connections-limit";
 NetworkDelegate::NetworkDelegate() {
   auto command_line = base::CommandLine::ForCurrentProcess();
   if (command_line->HasSwitch(kIgnoreConnectionsLimit)) {
-    std::string value = command_line->GetSwitchValueASCII(kIgnoreConnectionsLimit);
+    std::string value =
+        command_line->GetSwitchValueASCII(kIgnoreConnectionsLimit);
     ignore_connections_limit_domains_ = base::SplitString(
         value, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
   }

+ 7 - 4
brightray/browser/permission_manager.h

@@ -22,14 +22,16 @@ class PermissionManager : public content::PermissionManager {
       content::RenderFrameHost* render_frame_host,
       const GURL& requesting_origin,
       bool user_gesture,
-      const base::Callback<void(blink::mojom::PermissionStatus)>& callback) override;
+      const base::Callback<void(blink::mojom::PermissionStatus)>& callback)
+      override;
   int RequestPermissions(
       const std::vector<content::PermissionType>& permissions,
       content::RenderFrameHost* render_frame_host,
       const GURL& requesting_origin,
       bool user_gesture,
-      const base::Callback<void(
-          const std::vector<blink::mojom::PermissionStatus>&)>& callback) override;
+      const base::Callback<
+          void(const std::vector<blink::mojom::PermissionStatus>&)>& callback)
+      override;
   void CancelPermissionRequest(int request_id) override;
   void ResetPermission(content::PermissionType permission,
                        const GURL& requesting_origin,
@@ -45,7 +47,8 @@ class PermissionManager : public content::PermissionManager {
       content::PermissionType permission,
       const GURL& requesting_origin,
       const GURL& embedding_origin,
-      const base::Callback<void(blink::mojom::PermissionStatus)>& callback) override;
+      const base::Callback<void(blink::mojom::PermissionStatus)>& callback)
+      override;
   void UnsubscribePermissionStatusChange(int subscription_id) override;
 
  private:

+ 4 - 2
brightray/browser/platform_notification_service.cc

@@ -45,7 +45,8 @@ PlatformNotificationService::PlatformNotificationService(
 
 PlatformNotificationService::~PlatformNotificationService() {}
 
-blink::mojom::PermissionStatus PlatformNotificationService::CheckPermissionOnUIThread(
+blink::mojom::PermissionStatus
+PlatformNotificationService::CheckPermissionOnUIThread(
     content::BrowserContext* browser_context,
     const GURL& origin,
     int render_process_id) {
@@ -53,7 +54,8 @@ blink::mojom::PermissionStatus PlatformNotificationService::CheckPermissionOnUIT
   return blink::mojom::PermissionStatus::GRANTED;
 }
 
-blink::mojom::PermissionStatus PlatformNotificationService::CheckPermissionOnIOThread(
+blink::mojom::PermissionStatus
+PlatformNotificationService::CheckPermissionOnIOThread(
     content::ResourceContext* resource_context,
     const GURL& origin,
     int render_process_id) {

+ 18 - 9
brightray/browser/url_request_context_getter.cc

@@ -69,7 +69,8 @@ std::string URLRequestContextGetter::Delegate::GetUserAgent() {
 std::unique_ptr<net::URLRequestJobFactory>
 URLRequestContextGetter::Delegate::CreateURLRequestJobFactory(
     content::ProtocolHandlerMap* protocol_handlers) {
-  std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory(new net::URLRequestJobFactoryImpl);
+  std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory(
+      new net::URLRequestJobFactoryImpl);
 
   for (auto& it : *protocol_handlers) {
     job_factory->SetProtocolHandler(
@@ -89,7 +90,8 @@ URLRequestContextGetter::Delegate::CreateURLRequestJobFactory(
 }
 
 net::HttpCache::BackendFactory*
-URLRequestContextGetter::Delegate::CreateHttpCacheBackendFactory(const base::FilePath& base_path) {
+URLRequestContextGetter::Delegate::CreateHttpCacheBackendFactory(
+    const base::FilePath& base_path) {
   base::FilePath cache_path = base_path.Append(FILE_PATH_LITERAL("Cache"));
   return new net::HttpCache::DefaultBackend(
       net::DISK_CACHE,
@@ -104,11 +106,13 @@ URLRequestContextGetter::Delegate::CreateCertVerifier() {
   return net::CertVerifier::CreateDefault();
 }
 
-net::SSLConfigService* URLRequestContextGetter::Delegate::CreateSSLConfigService() {
+net::SSLConfigService*
+URLRequestContextGetter::Delegate::CreateSSLConfigService() {
   return new net::SSLConfigServiceDefaults;
 }
 
-std::vector<std::string> URLRequestContextGetter::Delegate::GetCookieableSchemes() {
+std::vector<std::string>
+URLRequestContextGetter::Delegate::GetCookieableSchemes() {
   return { "http", "https", "ws", "wss" };
 }
 
@@ -177,7 +181,8 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
     network_delegate_.reset(delegate_->CreateNetworkDelegate());
     url_request_context_->set_network_delegate(network_delegate_.get());
 
-    storage_.reset(new net::URLRequestContextStorage(url_request_context_.get()));
+    storage_.reset(
+        new net::URLRequestContextStorage(url_request_context_.get()));
 
     auto cookie_path = in_memory_ ?
         base::FilePath() : base_path_.Append(FILE_PATH_LITERAL("Cookies"));
@@ -261,7 +266,8 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
     // --auth-negotiate-delegate-whitelist
     if (command_line.HasSwitch(switches::kAuthNegotiateDelegateWhitelist)) {
       http_auth_preferences_->set_delegate_whitelist(
-          command_line.GetSwitchValueASCII(switches::kAuthNegotiateDelegateWhitelist));
+          command_line.GetSwitchValueASCII(
+              switches::kAuthNegotiateDelegateWhitelist));
     }
 
     auto auth_handler_factory =
@@ -309,7 +315,8 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
 
     // Give |storage_| ownership at the end in case it's |mapped_host_resolver|.
     storage_->set_host_resolver(std::move(host_resolver));
-    network_session_params.host_resolver = url_request_context_->host_resolver();
+    network_session_params.host_resolver =
+        url_request_context_->host_resolver();
 
     http_network_session_.reset(
         new net::HttpNetworkSession(network_session_params));
@@ -324,7 +331,8 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
       storage_->set_http_transaction_factory(base::WrapUnique(
           new net::HttpCache(
               base::WrapUnique(new DevToolsNetworkTransactionFactory(
-                  network_controller_handle_->GetController(), http_network_session_.get())),
+                  network_controller_handle_->GetController(),
+                  http_network_session_.get())),
               std::move(backend),
               false)));
     } else {
@@ -356,7 +364,8 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
   return url_request_context_.get();
 }
 
-scoped_refptr<base::SingleThreadTaskRunner> URLRequestContextGetter::GetNetworkTaskRunner() const {
+scoped_refptr<base::SingleThreadTaskRunner>
+URLRequestContextGetter::GetNetworkTaskRunner() const {
   return BrowserThread::GetTaskRunnerForThread(BrowserThread::IO);
 }
 

+ 3 - 3
brightray/browser/url_request_context_getter.h

@@ -47,8 +47,7 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
     }
     virtual std::string GetUserAgent();
     virtual std::unique_ptr<net::URLRequestJobFactory>
-        CreateURLRequestJobFactory(
-            content::ProtocolHandlerMap* protocol_handlers);
+    CreateURLRequestJobFactory(content::ProtocolHandlerMap* protocol_handlers);
     virtual net::HttpCache::BackendFactory* CreateHttpCacheBackendFactory(
         const base::FilePath& base_path);
     virtual std::unique_ptr<net::CertVerifier> CreateCertVerifier();
@@ -75,7 +74,8 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
 
   // net::URLRequestContextGetter:
   net::URLRequestContext* GetURLRequestContext() override;
-  scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() const override;
+  scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
+      const override;
 
   net::HostResolver* host_resolver();
   net::URLRequestJobFactory* job_factory() const { return job_factory_; }

+ 19 - 10
brightray/browser/views/inspectable_web_contents_view_views.cc

@@ -48,7 +48,9 @@ class DevToolsWindowDelegate : public views::ClientView,
   views::Widget* GetWidget() override { return widget_; }
   const views::Widget* GetWidget() const override { return widget_; }
   views::View* GetContentsView() override { return view_; }
-  views::ClientView* CreateClientView(views::Widget* widget) override { return this; }
+  views::ClientView* CreateClientView(views::Widget* widget) override {
+    return this;
+  }
 
   // views::ClientView:
   bool CanClose() override {
@@ -85,10 +87,12 @@ InspectableWebContentsViewViews::InspectableWebContentsViewViews(
 
   if (inspectable_web_contents_->GetWebContents()->GetNativeView()) {
     views::WebView* contents_web_view = new views::WebView(nullptr);
-    contents_web_view->SetWebContents(inspectable_web_contents_->GetWebContents());
+    contents_web_view->SetWebContents(
+        inspectable_web_contents_->GetWebContents());
     contents_web_view_ = contents_web_view;
   } else {
-    contents_web_view_ = new views::Label(base::ASCIIToUTF16("No content under offscreen mode"));
+    contents_web_view_ = new views::Label(
+        base::ASCIIToUTF16("No content under offscreen mode"));
   }
 
   devtools_web_view_->SetVisible(false);
@@ -98,7 +102,8 @@ InspectableWebContentsViewViews::InspectableWebContentsViewViews(
 
 InspectableWebContentsViewViews::~InspectableWebContentsViewViews() {
   if (devtools_window_)
-    inspectable_web_contents()->SaveDevToolsBounds(devtools_window_->GetWindowBoundsInScreen());
+    inspectable_web_contents()->SaveDevToolsBounds(
+        devtools_window_->GetWindowBoundsInScreen());
 }
 
 views::View* InspectableWebContentsViewViews::GetView() {
@@ -117,7 +122,8 @@ void InspectableWebContentsViewViews::ShowDevTools() {
   if (devtools_window_) {
     devtools_window_web_view_->SetWebContents(
         inspectable_web_contents_->GetDevToolsWebContents());
-    devtools_window_->SetBounds(inspectable_web_contents()->GetDevToolsBounds());
+    devtools_window_->SetBounds(
+        inspectable_web_contents()->GetDevToolsBounds());
     devtools_window_->Show();
   } else {
     devtools_web_view_->SetVisible(true);
@@ -134,7 +140,8 @@ void InspectableWebContentsViewViews::CloseDevTools() {
 
   devtools_visible_ = false;
   if (devtools_window_) {
-    inspectable_web_contents()->SaveDevToolsBounds(devtools_window_->GetWindowBoundsInScreen());
+    inspectable_web_contents()->SaveDevToolsBounds(
+        devtools_window_->GetWindowBoundsInScreen());
     devtools_window_.reset();
     devtools_window_web_view_ = nullptr;
     devtools_window_delegate_ = nullptr;
@@ -164,9 +171,10 @@ void InspectableWebContentsViewViews::SetIsDocked(bool docked) {
   if (!docked) {
     devtools_window_.reset(new views::Widget);
     devtools_window_web_view_ = new views::WebView(NULL);
-    devtools_window_delegate_ = new DevToolsWindowDelegate(this,
-                                                           devtools_window_web_view_,
-                                                           devtools_window_.get());
+    devtools_window_delegate_ = new DevToolsWindowDelegate(
+        this,
+        devtools_window_web_view_
+        devtools_window_.get());
 
     views::Widget::InitParams params;
     params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
@@ -176,7 +184,8 @@ void InspectableWebContentsViewViews::SetIsDocked(bool docked) {
 #if defined(USE_X11)
     params.wm_role_name = "devtools";
     if (GetDelegate())
-      GetDelegate()->GetDevToolsWindowWMClass(&params.wm_class_name, &params.wm_class_class);
+      GetDelegate()->GetDevToolsWindowWMClass(&params.wm_class_name,
+                                              &params.wm_class_class);
 #endif
 
     devtools_window_->Init(params);

+ 2 - 1
brightray/browser/views/views_delegate.cc

@@ -48,7 +48,8 @@ void ViewsDelegate::NotifyMenuItemFocused(
 #if defined(OS_WIN)
 HICON ViewsDelegate::GetDefaultWindowIcon() const {
   // Use current exe's icon as default window icon.
-  return LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(1  /* IDR_MAINFRAME */));
+  return LoadIcon(GetModuleHandle(NULL),
+                  MAKEINTRESOURCE(1  /* IDR_MAINFRAME */));
 }
 
 HICON ViewsDelegate::GetSmallWindowIcon() const {

+ 2 - 1
brightray/browser/win/notification_presenter_win.cc

@@ -38,7 +38,8 @@ bool SaveIconToPath(const SkBitmap& bitmap, const base::FilePath& path) {
 NotificationPresenter* NotificationPresenter::Create() {
   if (!WindowsToastNotification::Initialize())
     return nullptr;
-  std::unique_ptr<NotificationPresenterWin> presenter(new NotificationPresenterWin);
+  std::unique_ptr<NotificationPresenterWin> presenter(
+      new NotificationPresenterWin);
   if (!presenter->Init())
     return nullptr;
   return presenter.release();

+ 9 - 3
brightray/browser/win/notification_presenter_win.h

@@ -10,9 +10,15 @@
 //   icon: "file:///C:/Path/To/Your/Image.png"
 // });
 
-// windowsNotification.onshow  = function () { console.log("Notification shown") };
-// windowsNotification.onclick = function () { console.log("Notification clicked") };
-// windowsNotification.onclose = function () { console.log("Notification dismissed") };
+// windowsNotification.onshow  = function () {
+//   console.log("Notification shown")
+// };
+// windowsNotification.onclick = function () {
+//   console.log("Notification clicked")
+// };
+// windowsNotification.onclose = function () {
+//   console.log("Notification dismissed")
+// };
 
 #ifndef BRIGHTRAY_BROWSER_WIN_NOTIFICATION_PRESENTER_WIN_H_
 #define BRIGHTRAY_BROWSER_WIN_NOTIFICATION_PRESENTER_WIN_H_

+ 3 - 4
brightray/common/main_delegate.cc

@@ -61,9 +61,9 @@ void InitializeResourceBundle(const std::string& locale) {
   bundle.AddDataPackFromPath(
       pak_dir.Append(FILE_PATH_LITERAL("pdf_viewer_resources.pak")),
       ui::GetSupportedScaleFactors()[0]);
-  bundle.AddDataPackFromPath(
-      pak_dir.Append(FILE_PATH_LITERAL("blink_image_resources_200_percent.pak")),
-      ui::SCALE_FACTOR_200P);
+  bundle.AddDataPackFromPath(pak_dir.Append(FILE_PATH_LITERAL(
+                                 "blink_image_resources_200_percent.pak")),
+                             ui::SCALE_FACTOR_200P);
   bundle.AddDataPackFromPath(
       pak_dir.Append(FILE_PATH_LITERAL("content_resources_200_percent.pak")),
       ui::SCALE_FACTOR_200P);
@@ -76,7 +76,6 @@ void InitializeResourceBundle(const std::string& locale) {
 #endif
 }
 
-
 MainDelegate::MainDelegate() {
 }
 

+ 2 - 1
brightray/common/switches.cc

@@ -47,7 +47,8 @@ const char kDisableHttp2[] = "disable-http2";
 const char kAuthServerWhitelist[] = "auth-server-whitelist";
 
 // Whitelist containing servers for which Kerberos delegation is allowed.
-const char kAuthNegotiateDelegateWhitelist[] = "auth-negotiate-delegate-whitelist";
+const char kAuthNegotiateDelegateWhitelist[] =
+    "auth-negotiate-delegate-whitelist";
 
 // Ignores certificate-related errors.
 const char kIgnoreCertificateErrors[] = "ignore-certificate-errors";