Browse Source

Fix compilation errors on OS X

Cheng Zhao 9 years ago
parent
commit
5fae63a2f5
93 changed files with 242 additions and 317 deletions
  1. 1 1
      atom/app/atom_library_main.h
  2. 1 1
      atom/app/atom_main_delegate.cc
  3. 1 5
      atom/browser/api/atom_api_app.cc
  4. 1 2
      atom/browser/api/atom_api_app.h
  5. 2 13
      atom/browser/api/atom_api_content_tracing.cc
  6. 2 1
      atom/browser/api/atom_api_cookies.cc
  7. 4 3
      atom/browser/api/atom_api_desktop_capturer.cc
  8. 2 2
      atom/browser/api/atom_api_download_item.cc
  9. 2 2
      atom/browser/api/atom_api_download_item.h
  10. 2 2
      atom/browser/api/atom_api_protocol.h
  11. 8 6
      atom/browser/api/atom_api_web_contents.cc
  12. 5 4
      atom/browser/api/atom_api_web_contents.h
  13. 1 1
      atom/browser/api/frame_subscriber.cc
  14. 3 4
      atom/browser/atom_browser_client.cc
  15. 1 2
      atom/browser/atom_browser_client.h
  16. 4 3
      atom/browser/atom_browser_context.cc
  17. 20 0
      atom/browser/atom_permission_manager.cc
  18. 7 0
      atom/browser/atom_permission_manager.h
  19. 2 2
      atom/browser/atom_resource_dispatcher_host_delegate.cc
  20. 7 6
      atom/browser/atom_resource_dispatcher_host_delegate.h
  21. 1 0
      atom/browser/atom_speech_recognition_manager_delegate.h
  22. 3 4
      atom/browser/common_web_contents_delegate.cc
  23. 1 0
      atom/browser/javascript_environment.cc
  24. 5 4
      atom/browser/native_window.cc
  25. 32 40
      atom/browser/net/asar/url_request_asar_job.cc
  26. 6 6
      atom/browser/net/asar/url_request_asar_job.h
  27. 4 4
      atom/browser/net/atom_network_delegate.cc
  28. 1 1
      atom/browser/net/js_asker.h
  29. 7 9
      atom/browser/net/url_request_fetch_job.cc
  30. 1 3
      atom/browser/net/url_request_fetch_job.h
  31. 1 1
      atom/browser/node_debugger.cc
  32. 1 1
      atom/browser/ui/accelerator_util_mac.mm
  33. 1 1
      atom/browser/ui/message_box_mac.mm
  34. 7 4
      atom/browser/web_view_guest_delegate.cc
  35. 2 2
      atom/common/api/atom_api_asar.cc
  36. 1 0
      atom/common/api/atom_bindings.h
  37. 2 2
      atom/common/asar/archive.cc
  38. 1 1
      atom/common/asar/archive.h
  39. 1 1
      atom/common/asar/scoped_temporary_file.cc
  40. 1 1
      atom/common/asar/scoped_temporary_file.h
  41. 2 1
      atom/common/crash_reporter/crash_reporter_mac.mm
  42. 4 4
      atom/common/native_mate_converters/net_converter.cc
  43. 2 2
      atom/common/native_mate_converters/v8_value_converter.cc
  44. 1 1
      atom/common/node_bindings.cc
  45. 1 59
      atom/renderer/api/atom_api_spell_check_client.cc
  46. 0 2
      atom/renderer/api/atom_api_spell_check_client.h
  47. 1 1
      chromium_src/chrome/browser/browser_process.h
  48. 1 1
      chromium_src/chrome/browser/extensions/global_shortcut_listener.h
  49. 0 1
      chromium_src/chrome/browser/media/desktop_media_list.h
  50. 9 8
      chromium_src/chrome/browser/media/native_desktop_media_list.cc
  51. 0 1
      chromium_src/chrome/browser/media/native_desktop_media_list.h
  52. 1 1
      chromium_src/chrome/browser/printing/pdf_to_emf_converter.cc
  53. 1 1
      chromium_src/chrome/browser/printing/print_job.cc
  54. 0 1
      chromium_src/chrome/browser/printing/print_job.h
  55. 1 1
      chromium_src/chrome/browser/printing/print_preview_message_handler.cc
  56. 1 1
      chromium_src/chrome/browser/printing/print_preview_message_handler.h
  57. 5 5
      chromium_src/chrome/browser/printing/print_view_manager_base.cc
  58. 1 1
      chromium_src/chrome/browser/printing/printing_message_filter.cc
  59. 1 1
      chromium_src/chrome/browser/printing/printing_message_filter.h
  60. 0 1
      chromium_src/chrome/browser/printing/printing_ui_web_contents_observer.h
  61. 0 1
      chromium_src/chrome/browser/process_singleton.h
  62. 5 5
      chromium_src/chrome/browser/process_singleton_posix.cc
  63. 0 1
      chromium_src/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h
  64. 2 2
      chromium_src/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.cc
  65. 0 2
      chromium_src/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h
  66. 3 3
      chromium_src/chrome/browser/ui/cocoa/color_chooser_mac.mm
  67. 0 2
      chromium_src/chrome/browser/ui/views/color_chooser_aura.h
  68. 0 1
      chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h
  69. 0 1
      chromium_src/chrome/common/print_messages.cc
  70. 2 2
      chromium_src/chrome/common/print_messages.h
  71. 2 2
      chromium_src/chrome/common/tts_utterance_request.h
  72. 2 2
      chromium_src/chrome/common/widevine_cdm_constants.cc
  73. 2 2
      chromium_src/chrome/common/widevine_cdm_constants.h
  74. 0 2
      chromium_src/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.h
  75. 0 2
      chromium_src/chrome/renderer/pepper/pepper_flash_font_file_host.h
  76. 0 2
      chromium_src/chrome/renderer/pepper/pepper_flash_fullscreen_host.h
  77. 0 1
      chromium_src/chrome/renderer/pepper/pepper_flash_renderer_host.h
  78. 2 3
      chromium_src/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc
  79. 0 2
      chromium_src/chrome/renderer/pepper/pepper_shared_memory_message_filter.h
  80. 11 13
      chromium_src/chrome/renderer/printing/print_web_view_helper.cc
  81. 1 1
      chromium_src/chrome/renderer/printing/print_web_view_helper_linux.cc
  82. 1 3
      chromium_src/chrome/renderer/printing/print_web_view_helper_mac.mm
  83. 2 2
      chromium_src/chrome/renderer/printing/print_web_view_helper_pdf_win.cc
  84. 1 2
      chromium_src/chrome/renderer/spellchecker/spellcheck_worditerator.cc
  85. 1 1
      chromium_src/chrome/renderer/spellchecker/spellcheck_worditerator.h
  86. 1 2
      chromium_src/chrome/renderer/tts_dispatcher.cc
  87. 1 3
      chromium_src/chrome/renderer/tts_dispatcher.h
  88. 1 1
      chromium_src/chrome/utility/printing_handler_win.cc
  89. 3 1
      chromium_src/net/test/embedded_test_server/stream_listen_socket.cc
  90. 1 1
      chromium_src/net/test/embedded_test_server/stream_listen_socket.h
  91. 6 5
      chromium_src/net/test/embedded_test_server/tcp_listen_socket.cc
  92. 4 4
      chromium_src/net/test/embedded_test_server/tcp_listen_socket.h
  93. 1 1
      vendor/brightray

+ 1 - 1
atom/app/atom_library_main.h

@@ -5,7 +5,7 @@
 #ifndef ATOM_APP_ATOM_LIBRARY_MAIN_H_
 #define ATOM_APP_ATOM_LIBRARY_MAIN_H_
 
-#include "base/macros.h"
+#include "build/build_config.h"
 
 #if defined(OS_MACOSX)
 extern "C" {

+ 1 - 1
atom/app/atom_main_delegate.cc

@@ -135,7 +135,7 @@ content::ContentUtilityClient* AtomMainDelegate::CreateContentUtilityClient() {
 }
 
 scoped_ptr<brightray::ContentClient> AtomMainDelegate::CreateContentClient() {
-  return scoped_ptr<brightray::ContentClient>(new AtomContentClient).Pass();
+  return scoped_ptr<brightray::ContentClient>(new AtomContentClient);
 }
 
 }  // namespace atom

+ 1 - 5
atom/browser/api/atom_api_app.cc

@@ -230,8 +230,7 @@ void App::OnLogin(LoginHandler* login_handler) {
 }
 
 void App::AllowCertificateError(
-    int pid,
-    int fid,
+    content::WebContents* web_contents,
     int cert_error,
     const net::SSLInfo& ssl_info,
     const GURL& request_url,
@@ -241,9 +240,6 @@ void App::AllowCertificateError(
     bool expired_previous_decision,
     const base::Callback<void(bool)>& callback,
     content::CertificateRequestResultType* request) {
-  auto rfh = content::RenderFrameHost::FromID(pid, fid);
-  auto web_contents = content::WebContents::FromRenderFrameHost(rfh);
-
   v8::Locker locker(isolate());
   v8::HandleScope handle_scope(isolate());
   bool prevent_default = Emit("certificate-error",

+ 1 - 2
atom/browser/api/atom_api_app.h

@@ -52,8 +52,7 @@ class App : public AtomBrowserClient::Delegate,
 
   // content::ContentBrowserClient:
   void AllowCertificateError(
-      int render_process_id,
-      int render_frame_id,
+      content::WebContents* web_contents,
       int cert_error,
       const net::SSLInfo& ssl_info,
       const GURL& request_url,

+ 2 - 13
atom/browser/api/atom_api_content_tracing.cc

@@ -53,13 +53,7 @@ scoped_refptr<TracingController::TraceDataSink> GetTraceDataSink(
 
 void StopRecording(const base::FilePath& path,
                    const CompletionCallback& callback) {
-  TracingController::GetInstance()->DisableRecording(
-      GetTraceDataSink(path, callback));
-}
-
-void CaptureMonitoringSnapshot(const base::FilePath& path,
-                               const CompletionCallback& callback) {
-  TracingController::GetInstance()->CaptureMonitoringSnapshot(
+  TracingController::GetInstance()->StopTracing(
       GetTraceDataSink(path, callback));
 }
 
@@ -70,13 +64,8 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
   dict.SetMethod("getCategories", base::Bind(
       &TracingController::GetCategories, controller));
   dict.SetMethod("startRecording", base::Bind(
-      &TracingController::EnableRecording, controller));
+      &TracingController::StartTracing, controller));
   dict.SetMethod("stopRecording", &StopRecording);
-  dict.SetMethod("startMonitoring", base::Bind(
-      &TracingController::EnableMonitoring, controller));
-  dict.SetMethod("stopMonitoring", base::Bind(
-      &TracingController::DisableMonitoring, controller));
-  dict.SetMethod("captureMonitoringSnapshot", &CaptureMonitoringSnapshot);
   dict.SetMethod("getTraceBufferUsage", base::Bind(
       &TracingController::GetTraceBufferUsage, controller));
   dict.SetMethod("setWatchEvent", base::Bind(

+ 2 - 1
atom/browser/api/atom_api_cookies.cc

@@ -180,7 +180,8 @@ void SetCookieOnIO(scoped_refptr<net::URLRequestContextGetter> getter,
 
   GetCookieStore(getter)->GetCookieMonster()->SetCookieWithDetailsAsync(
       GURL(url), name, value, domain, path, expiration_time, secure, http_only,
-      false, net::COOKIE_PRIORITY_DEFAULT, base::Bind(OnSetCookie, callback));
+      false, false, false, net::COOKIE_PRIORITY_DEFAULT,
+      base::Bind(OnSetCookie, callback));
 }
 
 }  // namespace

+ 4 - 3
atom/browser/api/atom_api_desktop_capturer.cc

@@ -5,7 +5,6 @@
 #include "atom/browser/api/atom_api_desktop_capturer.h"
 
 #include "atom/common/api/atom_api_native_image.h"
-#include "atom/common/node_includes.h"
 #include "atom/common/native_mate_converters/gfx_converter.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/media/desktop_media_list.h"
@@ -14,6 +13,8 @@
 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h"
 #include "third_party/webrtc/modules/desktop_capture/window_capturer.h"
 
+#include "atom/common/node_includes.h"
+
 namespace mate {
 
 template<>
@@ -63,8 +64,8 @@ void DesktopCapturer::StartHandling(bool capture_window,
       capture_screen ? webrtc::ScreenCapturer::Create(options) : nullptr);
   scoped_ptr<webrtc::WindowCapturer> window_capturer(
       capture_window ? webrtc::WindowCapturer::Create(options) : nullptr);
-  media_list_.reset(new NativeDesktopMediaList(screen_capturer.Pass(),
-      window_capturer.Pass()));
+  media_list_.reset(new NativeDesktopMediaList(
+      std::move(screen_capturer), std::move(window_capturer)));
 
   media_list_->SetThumbnailSize(thumbnail_size);
   media_list_->StartUpdating(this);

+ 2 - 2
atom/browser/api/atom_api_download_item.cc

@@ -106,11 +106,11 @@ void DownloadItem::Cancel() {
   download_item_->Remove();
 }
 
-int64 DownloadItem::GetReceivedBytes() const {
+int64_t DownloadItem::GetReceivedBytes() const {
   return download_item_->GetReceivedBytes();
 }
 
-int64 DownloadItem::GetTotalBytes() const {
+int64_t DownloadItem::GetTotalBytes() const {
   return download_item_->GetTotalBytes();
 }
 

+ 2 - 2
atom/browser/api/atom_api_download_item.h

@@ -30,8 +30,8 @@ class DownloadItem : public mate::TrackableObject<DownloadItem>,
   void Pause();
   void Resume();
   void Cancel();
-  int64 GetReceivedBytes() const;
-  int64 GetTotalBytes() const;
+  int64_t GetReceivedBytes() const;
+  int64_t GetTotalBytes() const;
   std::string GetMimeType() const;
   bool HasUserGesture() const;
   std::string GetFilename() const;

+ 2 - 2
atom/browser/api/atom_api_protocol.h

@@ -117,7 +117,7 @@ class Protocol : public mate::Wrappable {
     scoped_ptr<CustomProtocolHandler<RequestJob>> protocol_handler(
         new CustomProtocolHandler<RequestJob>(
             isolate(), request_context_getter_, handler));
-    if (job_factory_->SetProtocolHandler(scheme, protocol_handler.Pass()))
+    if (job_factory_->SetProtocolHandler(scheme, std::move(protocol_handler)))
       return PROTOCOL_OK;
     else
       return PROTOCOL_FAIL;
@@ -161,7 +161,7 @@ class Protocol : public mate::Wrappable {
             isolate(), request_context_getter_, handler));
     original_protocols_.set(
         scheme,
-        job_factory_->ReplaceProtocol(scheme, protocol_handler.Pass()));
+        job_factory_->ReplaceProtocol(scheme, std::move(protocol_handler)));
     return PROTOCOL_OK;
   }
 

+ 8 - 6
atom/browser/api/atom_api_web_contents.cc

@@ -44,6 +44,7 @@
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/render_process_host.h"
 #include "content/public/browser/render_view_host.h"
+#include "content/public/browser/render_widget_host.h"
 #include "content/public/browser/render_widget_host_view.h"
 #include "content/public/browser/resource_request_details.h"
 #include "content/public/browser/service_worker_context.h"
@@ -150,7 +151,7 @@ struct Converter<net::HttpResponseHeaders*> {
         } else {
           scoped_ptr<base::ListValue> values(new base::ListValue());
           values->AppendString(value);
-          response_headers.Set(key, values.Pass());
+          response_headers.Set(key, std::move(values));
         }
       }
     }
@@ -317,8 +318,9 @@ bool WebContents::AddMessageToConsole(content::WebContents* source,
 
 bool WebContents::ShouldCreateWebContents(
     content::WebContents* web_contents,
-    int route_id,
-    int main_frame_route_id,
+    int32_t route_id,
+    int32_t main_frame_route_id,
+    int32_t main_frame_widget_route_id,
     WindowContainerType window_container_type,
     const std::string& frame_name,
     const GURL& target_url,
@@ -509,11 +511,11 @@ void WebContents::PluginCrashed(const base::FilePath& plugin_path,
   Emit("plugin-crashed", info.name, info.version);
 }
 
-void WebContents::MediaStartedPlaying() {
+void WebContents::MediaStartedPlaying(const MediaPlayerId& id) {
   Emit("media-started-playing");
 }
 
-void WebContents::MediaPaused() {
+void WebContents::MediaStoppedPlaying(const MediaPlayerId& id) {
   Emit("media-paused");
 }
 
@@ -1070,7 +1072,7 @@ void WebContents::BeginFrameSubscription(
   if (view) {
     scoped_ptr<FrameSubscriber> frame_subscriber(new FrameSubscriber(
         isolate(), view, callback));
-    view->BeginFrameSubscription(frame_subscriber.Pass());
+    view->BeginFrameSubscription(std::move(frame_subscriber));
   }
 }
 

+ 5 - 4
atom/browser/api/atom_api_web_contents.h

@@ -168,8 +168,9 @@ class WebContents : public mate::TrackableObject<WebContents>,
                            const base::string16& source_id) override;
   bool ShouldCreateWebContents(
       content::WebContents* web_contents,
-      int route_id,
-      int main_frame_route_id,
+      int32_t route_id,
+      int32_t main_frame_route_id,
+      int32_t main_frame_widget_route_id,
       WindowContainerType window_container_type,
       const std::string& frame_name,
       const GURL& target_url,
@@ -252,8 +253,8 @@ class WebContents : public mate::TrackableObject<WebContents>,
       const std::vector<content::FaviconURL>& urls) override;
   void PluginCrashed(const base::FilePath& plugin_path,
                      base::ProcessId plugin_pid) override;
-  void MediaStartedPlaying() override;
-  void MediaPaused() override;
+  void MediaStartedPlaying(const MediaPlayerId& id) override;
+  void MediaStoppedPlaying(const MediaPlayerId& id) override;
   void DidChangeThemeColor(SkColor theme_color) override;
 
   // brightray::InspectableWebContentsViewDelegate:

+ 1 - 1
atom/browser/api/frame_subscriber.cc

@@ -54,7 +54,7 @@ void FrameSubscriber::OnFrameDelivered(const FrameCaptureCallback& callback,
     return;
 
   bitmap.copyPixelsTo(
-    reinterpret_cast<uint8*>(node::Buffer::Data(buffer.ToLocalChecked())),
+    reinterpret_cast<uint8_t*>(node::Buffer::Data(buffer.ToLocalChecked())),
     rgb_arr_size);
 
   callback_.Run(buffer.ToLocalChecked());

+ 3 - 4
atom/browser/atom_browser_client.cc

@@ -230,8 +230,7 @@ content::QuotaPermissionContext*
 }
 
 void AtomBrowserClient::AllowCertificateError(
-    int render_process_id,
-    int render_frame_id,
+    content::WebContents* web_contents,
     int cert_error,
     const net::SSLInfo& ssl_info,
     const GURL& request_url,
@@ -243,7 +242,7 @@ void AtomBrowserClient::AllowCertificateError(
     content::CertificateRequestResultType* request) {
   if (delegate_) {
     delegate_->AllowCertificateError(
-        render_process_id, render_frame_id, cert_error, ssl_info, request_url,
+        web_contents, cert_error, ssl_info, request_url,
         resource_type, overridable, strict_enforcement,
         expired_previous_decision, callback, request);
   }
@@ -265,7 +264,7 @@ void AtomBrowserClient::SelectClientCertificate(
 
   if (!cert_request_info->client_certs.empty() && delegate_) {
     delegate_->SelectClientCertificate(
-        web_contents, cert_request_info, delegate.Pass());
+        web_contents, cert_request_info, std::move(delegate));
   }
 }
 

+ 1 - 2
atom/browser/atom_browser_client.h

@@ -61,8 +61,7 @@ class AtomBrowserClient : public brightray::BrowserClient,
   void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) override;
   content::QuotaPermissionContext* CreateQuotaPermissionContext() override;
   void AllowCertificateError(
-      int render_process_id,
-      int render_frame_id,
+      content::WebContents* web_contents,
       int cert_error,
       const net::SSLInfo& ssl_info,
       const GURL& request_url,

+ 4 - 3
atom/browser/atom_browser_context.cc

@@ -134,14 +134,15 @@ AtomBrowserContext::CreateURLRequestJobFactory(
           new net::FtpNetworkLayer(host_resolver))));
 
   // Set up interceptors in the reverse order.
-  scoped_ptr<net::URLRequestJobFactory> top_job_factory = job_factory.Pass();
+  scoped_ptr<net::URLRequestJobFactory> top_job_factory =
+      std::move(job_factory);
   content::URLRequestInterceptorScopedVector::reverse_iterator it;
   for (it = interceptors->rbegin(); it != interceptors->rend(); ++it)
     top_job_factory.reset(new net::URLRequestInterceptingJobFactory(
-        top_job_factory.Pass(), make_scoped_ptr(*it)));
+        std::move(top_job_factory), make_scoped_ptr(*it)));
   interceptors->weak_clear();
 
-  return top_job_factory.Pass();
+  return top_job_factory;
 }
 
 net::HttpCache::BackendFactory*

+ 20 - 0
atom/browser/atom_permission_manager.cc

@@ -80,6 +80,26 @@ int AtomPermissionManager::RequestPermission(
   return kNoPendingOperation;
 }
 
+int AtomPermissionManager::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<content::PermissionStatus>&)>& callback) {
+  // FIXME(zcbenz): Just ignore multiple permissions request for now.
+  std::vector<content::PermissionStatus> permissionStatuses;
+  for (auto permission : permissions) {
+    if (permission == content::PermissionType::MIDI_SYSEX) {
+      content::ChildProcessSecurityPolicy::GetInstance()->
+          GrantSendMidiSysExMessage(render_frame_host->GetProcess()->GetID());
+    }
+    permissionStatuses.push_back(content::PERMISSION_STATUS_GRANTED);
+  }
+  callback.Run(permissionStatuses);
+  return kNoPendingOperation;
+}
+
 void AtomPermissionManager::OnPermissionResponse(
     int request_id,
     const GURL& origin,

+ 7 - 0
atom/browser/atom_permission_manager.h

@@ -38,6 +38,13 @@ class AtomPermissionManager : public content::PermissionManager {
       const GURL& requesting_origin,
       bool user_gesture,
       const ResponseCallback& 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<content::PermissionStatus>&)>& callback) override;
 
  protected:
   void OnPermissionResponse(int request_id,

+ 2 - 2
atom/browser/atom_resource_dispatcher_host_delegate.cc

@@ -19,8 +19,8 @@ AtomResourceDispatcherHostDelegate::AtomResourceDispatcherHostDelegate() {
 
 bool AtomResourceDispatcherHostDelegate::HandleExternalProtocol(
     const GURL& url,
-    int render_process_id,
-    int render_view_id,
+    int child_id,
+    const content::ResourceRequestInfo::WebContentsGetter&,
     bool is_main_frame,
     ui::PageTransition transition,
     bool has_user_gesture) {

+ 7 - 6
atom/browser/atom_resource_dispatcher_host_delegate.h

@@ -15,12 +15,13 @@ class AtomResourceDispatcherHostDelegate
   AtomResourceDispatcherHostDelegate();
 
   // content::ResourceDispatcherHostDelegate:
-  bool HandleExternalProtocol(const GURL& url,
-                              int render_process_id,
-                              int render_view_id,
-                              bool is_main_frame,
-                              ui::PageTransition transition,
-                              bool has_user_gesture) override;
+  bool HandleExternalProtocol(
+      const GURL& url,
+      int child_id,
+      const content::ResourceRequestInfo::WebContentsGetter&,
+      bool is_main_frame,
+      ui::PageTransition transition,
+      bool has_user_gesture) override;
   content::ResourceDispatcherHostLoginDelegate* CreateLoginDelegate(
       net::AuthChallengeInfo* auth_info,
       net::URLRequest* request) override;

+ 1 - 0
atom/browser/atom_speech_recognition_manager_delegate.h

@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "content/public/browser/speech_recognition_event_listener.h"
 #include "content/public/browser/speech_recognition_manager_delegate.h"
 

+ 3 - 4
atom/browser/common_web_contents_delegate.cc

@@ -19,6 +19,7 @@
 #include "content/public/browser/child_process_security_policy.h"
 #include "content/public/browser/render_process_host.h"
 #include "content/public/browser/render_view_host.h"
+#include "content/public/browser/render_widget_host.h"
 #include "storage/browser/fileapi/isolated_context.h"
 
 #if defined(TOOLKIT_VIEWS)
@@ -173,8 +174,6 @@ content::WebContents* CommonWebContentsDelegate::OpenURLFromTab(
   load_url_params.should_replace_current_entry =
       params.should_replace_current_entry;
   load_url_params.is_renderer_initiated = params.is_renderer_initiated;
-  load_url_params.transferred_global_request_id =
-      params.transferred_global_request_id;
   load_url_params.should_clear_history_list = true;
 
   source->GetController().LoadURLWithParams(load_url_params);
@@ -223,7 +222,7 @@ void CommonWebContentsDelegate::EnterFullscreenModeForTab(
     return;
   SetHtmlApiFullscreen(true);
   owner_window_->NotifyWindowEnterHtmlFullScreen();
-  source->GetRenderViewHost()->WasResized();
+  source->GetRenderViewHost()->GetWidget()->WasResized();
 }
 
 void CommonWebContentsDelegate::ExitFullscreenModeForTab(
@@ -232,7 +231,7 @@ void CommonWebContentsDelegate::ExitFullscreenModeForTab(
     return;
   SetHtmlApiFullscreen(false);
   owner_window_->NotifyWindowLeaveHtmlFullScreen();
-  source->GetRenderViewHost()->WasResized();
+  source->GetRenderViewHost()->GetWidget()->WasResized();
 }
 
 bool CommonWebContentsDelegate::IsFullscreenForTabOrPending(

+ 1 - 0
atom/browser/javascript_environment.cc

@@ -37,6 +37,7 @@ bool JavascriptEnvironment::Initialize() {
     v8::V8::SetFlagsFromString(js_flags.c_str(), js_flags.size());
 
   gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode,
+                                 gin::IsolateHolder::kStableV8Extras,
                                  gin::ArrayBufferAllocator::SharedInstance());
   return true;
 }

+ 5 - 4
atom/browser/native_window.cc

@@ -27,6 +27,7 @@
 #include "content/public/browser/plugin_service.h"
 #include "content/public/browser/render_process_host.h"
 #include "content/public/browser/render_view_host.h"
+#include "content/public/browser/render_widget_host.h"
 #include "content/public/browser/render_widget_host_view.h"
 #include "content/public/common/content_switches.h"
 #include "ipc/ipc_message_macros.h"
@@ -275,15 +276,15 @@ bool NativeWindow::HasModalDialog() {
 }
 
 void NativeWindow::FocusOnWebView() {
-  web_contents()->GetRenderViewHost()->Focus();
+  web_contents()->GetRenderViewHost()->GetWidget()->Focus();
 }
 
 void NativeWindow::BlurWebView() {
-  web_contents()->GetRenderViewHost()->Blur();
+  web_contents()->GetRenderViewHost()->GetWidget()->Blur();
 }
 
 bool NativeWindow::IsWebViewFocused() {
-  auto host_view = web_contents()->GetRenderViewHost()->GetView();
+  auto host_view = web_contents()->GetRenderViewHost()->GetWidget()->GetView();
   return host_view && host_view->HasFocus();
 }
 
@@ -511,7 +512,7 @@ scoped_ptr<SkRegion> NativeWindow::DraggableRegionsToSkRegion(
         region.bounds.bottom(),
         region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
   }
-  return sk_region.Pass();
+  return sk_region;
 }
 
 void NativeWindow::RenderViewCreated(

+ 32 - 40
atom/browser/net/asar/url_request_asar_job.cc

@@ -44,6 +44,7 @@ URLRequestAsarJob::URLRequestAsarJob(
     : net::URLRequestJob(request, network_delegate),
       type_(TYPE_ERROR),
       remaining_bytes_(0),
+      range_parse_result_(net::OK),
       weak_ptr_factory_(this) {}
 
 URLRequestAsarJob::~URLRequestAsarJob() {}
@@ -99,7 +100,7 @@ void URLRequestAsarJob::InitializeFileJob(
 
 void URLRequestAsarJob::Start() {
   if (type_ == TYPE_ASAR) {
-    remaining_bytes_ = static_cast<int64>(file_info_.size);
+    remaining_bytes_ = static_cast<int64_t>(file_info_.size);
 
     int flags = base::File::FLAG_OPEN |
                 base::File::FLAG_READ |
@@ -131,18 +132,14 @@ void URLRequestAsarJob::Kill() {
   URLRequestJob::Kill();
 }
 
-bool URLRequestAsarJob::ReadRawData(net::IOBuffer* dest,
-                                    int dest_size,
-                                    int* bytes_read) {
+int URLRequestAsarJob::ReadRawData(net::IOBuffer* dest, int dest_size) {
   if (remaining_bytes_ < dest_size)
     dest_size = static_cast<int>(remaining_bytes_);
 
   // If we should copy zero bytes because |remaining_bytes_| is zero, short
   // circuit here.
-  if (!dest_size) {
-    *bytes_read = 0;
-    return true;
-  }
+  if (!dest_size)
+    return 0;
 
   int rv = stream_->Read(dest,
                          dest_size,
@@ -150,20 +147,11 @@ bool URLRequestAsarJob::ReadRawData(net::IOBuffer* dest,
                                     weak_ptr_factory_.GetWeakPtr(),
                                     make_scoped_refptr(dest)));
   if (rv >= 0) {
-    // Data is immediately available.
-    *bytes_read = rv;
     remaining_bytes_ -= rv;
     DCHECK_GE(remaining_bytes_, 0);
-    return true;
   }
 
-  // Otherwise, a read error occured.  We may just need to wait...
-  if (rv == net::ERR_IO_PENDING) {
-    SetStatus(net::URLRequestStatus(net::URLRequestStatus::IO_PENDING, 0));
-  } else {
-    NotifyDone(net::URLRequestStatus(net::URLRequestStatus::FAILED, rv));
-  }
-  return false;
+  return rv;
 }
 
 bool URLRequestAsarJob::IsRedirectResponse(GURL* location,
@@ -214,15 +202,16 @@ void URLRequestAsarJob::SetExtraRequestHeaders(
     const net::HttpRequestHeaders& headers) {
   std::string range_header;
   if (headers.GetHeader(net::HttpRequestHeaders::kRange, &range_header)) {
-    // We only care about "Range" header here.
+    // This job only cares about the Range header. This method stashes the value
+    // for later use in DidOpen(), which is responsible for some of the range
+    // validation as well. NotifyStartError is not legal to call here since
+    // the job has not started.
     std::vector<net::HttpByteRange> ranges;
     if (net::HttpUtil::ParseRangeHeader(range_header, &ranges)) {
       if (ranges.size() == 1) {
         byte_range_ = ranges[0];
       } else {
-        NotifyDone(net::URLRequestStatus(
-            net::URLRequestStatus::FAILED,
-            net::ERR_REQUEST_RANGE_NOT_SATISFIABLE));
+        range_parse_result_ = net::ERR_REQUEST_RANGE_NOT_SATISFIABLE;
       }
     }
   }
@@ -274,7 +263,14 @@ void URLRequestAsarJob::DidFetchMetaInfo(const FileMetaInfo* meta_info) {
 
 void URLRequestAsarJob::DidOpen(int result) {
   if (result != net::OK) {
-    NotifyDone(net::URLRequestStatus(net::URLRequestStatus::FAILED, result));
+    NotifyStartError(net::URLRequestStatus(net::URLRequestStatus::FAILED,
+                                           result));
+    return;
+  }
+
+  if (range_parse_result_ != net::OK) {
+    NotifyStartError(net::URLRequestStatus(net::URLRequestStatus::FAILED,
+                                           range_parse_result_));
     return;
   }
 
@@ -289,8 +285,9 @@ void URLRequestAsarJob::DidOpen(int result) {
     }
   } else {
     if (!byte_range_.ComputeBounds(meta_info_.file_size)) {
-      NotifyDone(net::URLRequestStatus(net::URLRequestStatus::FAILED,
-                 net::ERR_REQUEST_RANGE_NOT_SATISFIABLE));
+      NotifyStartError(
+          net::URLRequestStatus(net::URLRequestStatus::FAILED,
+                                net::ERR_REQUEST_RANGE_NOT_SATISFIABLE));
       return;
     }
 
@@ -315,17 +312,19 @@ void URLRequestAsarJob::DidOpen(int result) {
   }
 }
 
-void URLRequestAsarJob::DidSeek(int64 result) {
+void URLRequestAsarJob::DidSeek(int64_t result) {
   if (type_ == TYPE_ASAR) {
-    if (result != static_cast<int64>(file_info_.offset)) {
-      NotifyDone(net::URLRequestStatus(net::URLRequestStatus::FAILED,
-                                       net::ERR_REQUEST_RANGE_NOT_SATISFIABLE));
+    if (result != static_cast<int64_t>(file_info_.offset)) {
+      NotifyStartError(
+          net::URLRequestStatus(net::URLRequestStatus::FAILED,
+                                net::ERR_REQUEST_RANGE_NOT_SATISFIABLE));
       return;
     }
   } else {
     if (result != byte_range_.first_byte_position()) {
-      NotifyDone(net::URLRequestStatus(net::URLRequestStatus::FAILED,
-                                       net::ERR_REQUEST_RANGE_NOT_SATISFIABLE));
+      NotifyStartError(
+          net::URLRequestStatus(net::URLRequestStatus::FAILED,
+                                net::ERR_REQUEST_RANGE_NOT_SATISFIABLE));
       return;
     }
   }
@@ -334,21 +333,14 @@ void URLRequestAsarJob::DidSeek(int64 result) {
 }
 
 void URLRequestAsarJob::DidRead(scoped_refptr<net::IOBuffer> buf, int result) {
-  if (result > 0) {
-    SetStatus(net::URLRequestStatus());  // Clear the IO_PENDING status
+  if (result >= 0) {
     remaining_bytes_ -= result;
     DCHECK_GE(remaining_bytes_, 0);
   }
 
   buf = NULL;
 
-  if (result == 0) {
-    NotifyDone(net::URLRequestStatus());
-  } else if (result < 0) {
-    NotifyDone(net::URLRequestStatus(net::URLRequestStatus::FAILED, result));
-  }
-
-  NotifyReadComplete(result);
+  ReadRawDataComplete(result);
 }
 
 }  // namespace asar

+ 6 - 6
atom/browser/net/asar/url_request_asar_job.h

@@ -54,9 +54,7 @@ class URLRequestAsarJob : public net::URLRequestJob {
   // net::URLRequestJob:
   void Start() override;
   void Kill() override;
-  bool ReadRawData(net::IOBuffer* buf,
-                   int buf_size,
-                   int* bytes_read) override;
+  int ReadRawData(net::IOBuffer* buf, int buf_size) override;
   bool IsRedirectResponse(GURL* location, int* http_status_code) override;
   net::Filter* SetupFilter() const override;
   bool GetMimeType(std::string* mime_type) const override;
@@ -72,7 +70,7 @@ class URLRequestAsarJob : public net::URLRequestJob {
     FileMetaInfo();
 
     // Size of the file.
-    int64 file_size;
+    int64_t file_size;
     // Mime type associated with the file.
     std::string mime_type;
     // Result returned from GetMimeTypeFromFile(), i.e. flag showing whether
@@ -97,7 +95,7 @@ class URLRequestAsarJob : public net::URLRequestJob {
 
   // Callback after seeking to the beginning of |byte_range_| in the file
   // on a background thread.
-  void DidSeek(int64 result);
+  void DidSeek(int64_t result);
 
   // Callback after data is asynchronously read from the file into |buf|.
   void DidRead(scoped_refptr<net::IOBuffer> buf, int result);
@@ -119,7 +117,9 @@ class URLRequestAsarJob : public net::URLRequestJob {
   scoped_refptr<base::TaskRunner> file_task_runner_;
 
   net::HttpByteRange byte_range_;
-  int64 remaining_bytes_;
+  int64_t remaining_bytes_;
+
+  net::Error range_parse_result_;
 
   base::WeakPtrFactory<URLRequestAsarJob> weak_ptr_factory_;
 

+ 4 - 4
atom/browser/net/atom_network_delegate.cc

@@ -78,7 +78,7 @@ void ToDictionary(base::DictionaryValue* details, net::URLRequest* request) {
   scoped_ptr<base::ListValue> list(new base::ListValue);
   GetUploadData(list.get(), request);
   if (!list->empty())
-    details->Set("uploadData", list.Pass());
+    details->Set("uploadData", std::move(list));
 }
 
 void ToDictionary(base::DictionaryValue* details,
@@ -87,7 +87,7 @@ void ToDictionary(base::DictionaryValue* details,
   net::HttpRequestHeaders::Iterator it(headers);
   while (it.GetNext())
     dict->SetString(it.name(), it.value());
-  details->Set("requestHeaders", dict.Pass());
+  details->Set("requestHeaders", std::move(dict));
 }
 
 void ToDictionary(base::DictionaryValue* details,
@@ -107,10 +107,10 @@ void ToDictionary(base::DictionaryValue* details,
     } else {
       scoped_ptr<base::ListValue> values(new base::ListValue);
       values->AppendString(value);
-      dict->Set(key, values.Pass());
+      dict->Set(key, std::move(values));
     }
   }
-  details->Set("responseHeaders", dict.Pass());
+  details->Set("responseHeaders", std::move(dict));
   details->SetString("statusLine", headers->GetStatusLine());
   details->SetInteger("statusCode", headers->response_code());
 }

+ 1 - 1
atom/browser/net/js_asker.h

@@ -81,7 +81,7 @@ class JsAsker : public RequestJob {
   void OnResponse(bool success, scoped_ptr<base::Value> value) {
     int error = net::ERR_NOT_IMPLEMENTED;
     if (success && value && !internal::IsErrorOptions(value.get(), &error)) {
-      StartAsync(value.Pass());
+      StartAsync(std::move(value));
     } else {
       RequestJob::NotifyStartError(
           net::URLRequestStatus(net::URLRequestStatus::FAILED, error));

+ 7 - 9
atom/browser/net/url_request_fetch_job.cc

@@ -181,7 +181,7 @@ int URLRequestFetchJob::DataAvailable(net::IOBuffer* buffer, int num_bytes) {
   pending_buffer_ = nullptr;
   pending_buffer_size_ = 0;
 
-  NotifyReadComplete(bytes_read);
+  ReadRawDataComplete(bytes_read);
   return bytes_read;
 }
 
@@ -190,18 +190,15 @@ void URLRequestFetchJob::Kill() {
   fetcher_.reset();
 }
 
-bool URLRequestFetchJob::ReadRawData(net::IOBuffer* dest,
-                                     int dest_size,
-                                     int* bytes_read) {
+int URLRequestFetchJob::ReadRawData(net::IOBuffer* dest, int dest_size) {
   if (GetResponseCode() == 204) {
-    *bytes_read = 0;
     request()->set_received_response_content_length(prefilter_bytes_read());
-    return true;
+    return 0;
   }
   pending_buffer_ = dest;
   pending_buffer_size_ = dest_size;
   SetStatus(net::URLRequestStatus(net::URLRequestStatus::IO_PENDING, 0));
-  return false;
+  return dest_size;
 }
 
 bool URLRequestFetchJob::GetMimeType(std::string* mime_type) const {
@@ -234,9 +231,10 @@ void URLRequestFetchJob::OnURLFetchComplete(const net::URLFetcher* source) {
 
   pending_buffer_ = nullptr;
   pending_buffer_size_ = 0;
-  NotifyDone(fetcher_->GetStatus());
   if (fetcher_->GetStatus().is_success())
-    NotifyReadComplete(0);
+    ReadRawDataComplete(0);
+  else
+    NotifyStartError(fetcher_->GetStatus());
 }
 
 }  // namespace atom

+ 1 - 3
atom/browser/net/url_request_fetch_job.h

@@ -31,9 +31,7 @@ class URLRequestFetchJob : public JsAsker<net::URLRequestJob>,
 
   // net::URLRequestJob:
   void Kill() override;
-  bool ReadRawData(net::IOBuffer* buf,
-                   int buf_size,
-                   int* bytes_read) override;
+  int ReadRawData(net::IOBuffer* buf, int buf_size) override;
   bool GetMimeType(std::string* mime_type) const override;
   void GetResponseInfo(net::HttpResponseInfo* info) override;
   int GetResponseCode() const override;

+ 1 - 1
atom/browser/node_debugger.cc

@@ -152,7 +152,7 @@ void NodeDebugger::DidAccept(
     return;
   }
 
-  accepted_socket_ = socket.Pass();
+  accepted_socket_ = std::move(socket);
   SendConnectMessage();
 }
 

+ 1 - 1
atom/browser/ui/accelerator_util_mac.mm

@@ -28,7 +28,7 @@ void SetPlatformAccelerator(ui::Accelerator* accelerator) {
 
   scoped_ptr<ui::PlatformAccelerator> platform_accelerator(
       new ui::PlatformAcceleratorCocoa(characters, modifiers));
-  accelerator->set_platform_accelerator(platform_accelerator.Pass());
+  accelerator->set_platform_accelerator(std::move(platform_accelerator));
 }
 
 }  // namespace accelerator_util

+ 1 - 1
atom/browser/ui/message_box_mac.mm

@@ -96,7 +96,7 @@ NSAlert* CreateNSAlert(NativeWindow* parent_window,
   }
 
   if (!icon.isNull()) {
-    NSImage* image = gfx::SkBitmapToNSImageWithColorSpace(
+    NSImage* image = skia::SkBitmapToNSImageWithColorSpace(
         *icon.bitmap(), base::mac::GetGenericRGBColorSpace());
     [alert setIcon:image];
   }

+ 7 - 4
atom/browser/web_view_guest_delegate.cc

@@ -9,6 +9,7 @@
 #include "content/public/browser/guest_host.h"
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/render_view_host.h"
+#include "content/public/browser/render_widget_host.h"
 #include "content/public/browser/render_widget_host_view.h"
 
 namespace atom {
@@ -101,13 +102,14 @@ void WebViewGuestDelegate::SetAllowTransparency(bool allow) {
 
   auto render_view_host = web_contents()->GetRenderViewHost();
   guest_opaque_ = !allow;
-  if (!render_view_host->GetView())
+  if (!render_view_host->GetWidget()->GetView())
     return;
 
   if (guest_opaque_) {
-    render_view_host->GetView()->SetBackgroundColorToDefault();
+    render_view_host->GetWidget()->GetView()->SetBackgroundColorToDefault();
   } else {
-    render_view_host->GetView()->SetBackgroundColor(SK_ColorTRANSPARENT);
+    render_view_host->GetWidget()->GetView()->SetBackgroundColor(
+        SK_ColorTRANSPARENT);
   }
 }
 
@@ -123,7 +125,8 @@ void WebViewGuestDelegate::RenderViewReady() {
   // WebContents::GetRenderWidgetHostView will return the RWHV of an
   // interstitial page if one is showing at this time. We only want opacity
   // to apply to web pages.
-  auto render_view_host_view = web_contents()->GetRenderViewHost()->GetView();
+  auto render_view_host_view =
+      web_contents()->GetRenderViewHost()->GetWidget()->GetView();
   if (guest_opaque_)
     render_view_host_view->SetBackgroundColorToDefault();
   else

+ 2 - 2
atom/common/api/atom_api_asar.cc

@@ -27,12 +27,12 @@ class Archive : public mate::Wrappable {
     scoped_ptr<asar::Archive> archive(new asar::Archive(path));
     if (!archive->Init())
       return v8::False(isolate);
-    return (new Archive(archive.Pass()))->GetWrapper(isolate);
+    return (new Archive(std::move(archive)))->GetWrapper(isolate);
   }
 
  protected:
   explicit Archive(scoped_ptr<asar::Archive> archive)
-      : archive_(archive.Pass()) {}
+      : archive_(std::move(archive)) {}
 
   // Reads the offset and size of file.
   v8::Local<v8::Value> GetFileInfo(v8::Isolate* isolate,

+ 1 - 0
atom/common/api/atom_bindings.h

@@ -7,6 +7,7 @@
 
 #include <list>
 
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "v8/include/v8.h"
 #include "vendor/node/deps/uv/include/uv.h"

+ 2 - 2
atom/common/asar/archive.cc

@@ -158,7 +158,7 @@ bool Archive::Init() {
   }
 
   uint32_t size;
-  if (!base::PickleIterator(base::Pickle(buf.data(), buf.size())).ReadUint32_t(
+  if (!base::PickleIterator(base::Pickle(buf.data(), buf.size())).ReadUInt32(
           &size)) {
     LOG(ERROR) << "Failed to parse header size from " << path_.value();
     return false;
@@ -296,7 +296,7 @@ bool Archive::CopyFileOut(const base::FilePath& path, base::FilePath* out) {
 #endif
 
   *out = temp_file->path();
-  external_files_.set(path, temp_file.Pass());
+  external_files_.set(path, std::move(temp_file));
   return true;
 }
 

+ 1 - 1
atom/common/asar/archive.h

@@ -29,7 +29,7 @@ class Archive {
     bool unpacked;
     bool executable;
     uint32_t size;
-    uint64 offset;
+    uint64_t offset;
   };
 
   struct Stats : public FileInfo {

+ 1 - 1
atom/common/asar/scoped_temporary_file.cc

@@ -51,7 +51,7 @@ bool ScopedTemporaryFile::Init(const base::FilePath::StringType& ext) {
 
 bool ScopedTemporaryFile::InitFromFile(base::File* src,
                                        const base::FilePath::StringType& ext,
-                                       uint64 offset, uint64 size) {
+                                       uint64_t offset, uint64_t size) {
   if (!src->IsValid())
     return false;
 

+ 1 - 1
atom/common/asar/scoped_temporary_file.h

@@ -28,7 +28,7 @@ class ScopedTemporaryFile {
   // Init an temporary file and fill it with content of |path|.
   bool InitFromFile(base::File* src,
                     const base::FilePath::StringType& ext,
-                    uint64 offset, uint64 size);
+                    uint64_t offset, uint64_t size);
 
   base::FilePath path() const { return path_; }
 

+ 2 - 1
atom/common/crash_reporter/crash_reporter_mac.mm

@@ -48,7 +48,8 @@ void CrashReporterMac::InitBreakpad(const std::string& product_name,
       if (crashpad_client.StartHandler(handler_path, database_path,
                                        submit_url,
                                        StringMap(),
-                                       std::vector<std::string>())) {
+                                       std::vector<std::string>(),
+                                       true)) {
         crashpad_client.UseHandler();
       }
     }  // @autoreleasepool

+ 4 - 4
atom/common/native_mate_converters/net_converter.cc

@@ -34,7 +34,7 @@ v8::Local<v8::Value> Converter<const net::URLRequest*>::ToV8(
   scoped_ptr<base::ListValue> list(new base::ListValue);
   atom::GetUploadData(list.get(), val);
   if (!list->empty())
-    dict->Set("uploadData", list.Pass());
+    dict->Set("uploadData", std::move(list));
   return mate::ConvertToV8(isolate, *(dict.get()));
 }
 
@@ -74,7 +74,7 @@ void GetUploadData(base::ListValue* upload_data_list,
   const net::UploadDataStream* upload_data = request->get_upload();
   if (!upload_data)
     return;
-  const ScopedVector<net::UploadElementReader>* readers =
+  const std::vector<scoped_ptr<net::UploadElementReader>>* readers =
       upload_data->GetElementReaders();
   for (const auto& reader : *readers) {
     scoped_ptr<base::DictionaryValue> upload_data_dict(
@@ -85,14 +85,14 @@ void GetUploadData(base::ListValue* upload_data_list,
       scoped_ptr<base::Value> bytes(
           base::BinaryValue::CreateWithCopiedBuffer(bytes_reader->bytes(),
                                                     bytes_reader->length()));
-      upload_data_dict->Set("bytes", bytes.Pass());
+      upload_data_dict->Set("bytes", std::move(bytes));
     } else if (reader->AsFileReader()) {
       const net::UploadFileElementReader* file_reader =
           reader->AsFileReader();
       auto file_path = file_reader->path().AsUTF8Unsafe();
       upload_data_dict->SetStringWithoutPathExpansion("file", file_path);
     }
-    upload_data_list->Append(upload_data_dict.Pass());
+    upload_data_list->Append(std::move(upload_data_dict));
   }
 }
 

+ 2 - 2
atom/common/native_mate_converters/v8_value_converter.cc

@@ -222,8 +222,8 @@ base::Value* V8ValueConverter::FromV8ValueImpl(
   if (val->IsBoolean())
     return new base::FundamentalValue(val->ToBoolean()->Value());
 
-  if (val->Isint32_t())
-    return new base::FundamentalValue(val->Toint32_t()->Value());
+  if (val->IsInt32())
+    return new base::FundamentalValue(val->ToInt32()->Value());
 
   if (val->IsNumber())
     return new base::FundamentalValue(val->ToNumber()->Value());

+ 1 - 1
atom/common/node_bindings.cc

@@ -85,7 +85,7 @@ scoped_ptr<const char*[]> StringVectorToArgArray(
   for (size_t i = 0; i < vector.size(); ++i) {
     array[i] = vector[i].c_str();
   }
-  return array.Pass();
+  return array;
 }
 
 base::FilePath GetResourcesPath(bool is_browser) {

+ 1 - 59
atom/renderer/api/atom_api_spell_check_client.cc

@@ -21,8 +21,6 @@ namespace api {
 
 namespace {
 
-const int kMaxAutoCorrectWordSize = 8;
-
 bool HasWordCharacters(const base::string16& text, int index) {
   const base::char16* data = text.data();
   int length = text.length();
@@ -42,8 +40,7 @@ SpellCheckClient::SpellCheckClient(const std::string& language,
                                    bool auto_spell_correct_turned_on,
                                    v8::Isolate* isolate,
                                    v8::Local<v8::Object> provider)
-    : auto_spell_correct_turned_on_(auto_spell_correct_turned_on),
-      isolate_(isolate),
+    : isolate_(isolate),
       provider_(isolate, provider) {
   character_attributes_.SetDefaultLanguage(language);
 
@@ -96,14 +93,6 @@ void SpellCheckClient::requestCheckingOfText(
   completionCallback->didFinishCheckingText(results);
 }
 
-blink::WebString SpellCheckClient::autoCorrectWord(
-    const blink::WebString& misspelledWord) {
-  if (auto_spell_correct_turned_on_)
-    return GetAutoCorrectionWord(base::string16(misspelledWord));
-  else
-    return blink::WebString();
-}
-
 void SpellCheckClient::showSpellingUI(bool show) {
 }
 
@@ -170,53 +159,6 @@ bool SpellCheckClient::SpellCheckWord(const base::string16& word_to_check) {
     return true;
 }
 
-base::string16 SpellCheckClient::GetAutoCorrectionWord(
-    const base::string16& word) {
-  base::string16 autocorrect_word;
-
-  int word_length = static_cast<int>(word.size());
-  if (word_length < 2 || word_length > kMaxAutoCorrectWordSize)
-    return autocorrect_word;
-
-  base::char16 misspelled_word[kMaxAutoCorrectWordSize + 1];
-  const base::char16* word_char = word.c_str();
-  for (int i = 0; i <= kMaxAutoCorrectWordSize; ++i) {
-    if (i >= word_length)
-      misspelled_word[i] = 0;
-    else
-      misspelled_word[i] = word_char[i];
-  }
-
-  // Swap adjacent characters and spellcheck.
-  int misspelling_start, misspelling_len;
-  for (int i = 0; i < word_length - 1; i++) {
-    // Swap.
-    std::swap(misspelled_word[i], misspelled_word[i + 1]);
-
-    // Check spelling.
-    misspelling_start = misspelling_len = 0;
-    spellCheck(blink::WebString(misspelled_word, word_length),
-               misspelling_start,
-               misspelling_len,
-               NULL);
-
-    // Make decision: if only one swap produced a valid word, then we want to
-    // return it. If we found two or more, we don't do autocorrection.
-    if (misspelling_len == 0) {
-      if (autocorrect_word.empty()) {
-        autocorrect_word.assign(misspelled_word);
-      } else {
-        autocorrect_word.clear();
-        break;
-      }
-    }
-
-    // Restore the swapped characters.
-    std::swap(misspelled_word[i], misspelled_word[i + 1]);
-  }
-  return autocorrect_word;
-}
-
 // Returns whether or not the given string is a valid contraction.
 // This function is a fall-back when the SpellcheckWordIterator class
 // returns a concatenated word which is not in the selected dictionary

+ 0 - 2
atom/renderer/api/atom_api_spell_check_client.h

@@ -41,8 +41,6 @@ class SpellCheckClient : public blink::WebSpellCheckClient {
       const blink::WebVector<uint32_t>& markersInText,
       const blink::WebVector<unsigned>& markerOffsets,
       blink::WebTextCheckingCompletion* completionCallback) override;
-  blink::WebString autoCorrectWord(
-      const blink::WebString& misspelledWord) override;
   void showSpellingUI(bool show) override;
   bool isShowingSpellingUI() override;
   void updateSpellingUIWithMisspelledWord(

+ 1 - 1
chromium_src/chrome/browser/browser_process.h

@@ -12,7 +12,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 
 namespace printing {

+ 1 - 1
chromium_src/chrome/browser/extensions/global_shortcut_listener.h

@@ -7,7 +7,7 @@
 
 #include <map>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "ui/events/keycodes/keyboard_codes.h"
 
 namespace ui {

+ 0 - 1
chromium_src/chrome/browser/media/desktop_media_list.h

@@ -5,7 +5,6 @@
 #ifndef CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_H_
 #define CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_H_
 
-#include "base/basictypes.h"
 #include "base/strings/string16.h"
 #include "base/time/time.h"
 #include "content/public/browser/desktop_media_id.h"

+ 9 - 8
chromium_src/chrome/browser/media/native_desktop_media_list.cc

@@ -34,7 +34,7 @@ const int kDefaultUpdatePeriod = 1000;
 
 // Returns a hash of a DesktopFrame content to detect when image for a desktop
 // media source has changed.
-uint32 GetFrameHash(webrtc::DesktopFrame* frame) {
+uint32_t GetFrameHash(webrtc::DesktopFrame* frame) {
   int data_size = frame->stride() * frame->size().height();
   return base::SuperFastHash(reinterpret_cast<char*>(frame->data()), data_size);
 }
@@ -117,8 +117,8 @@ NativeDesktopMediaList::Worker::Worker(
     scoped_ptr<webrtc::ScreenCapturer> screen_capturer,
     scoped_ptr<webrtc::WindowCapturer> window_capturer)
     : media_list_(media_list),
-      screen_capturer_(screen_capturer.Pass()),
-      window_capturer_(window_capturer.Pass()) {
+      screen_capturer_(std::move(screen_capturer)),
+      window_capturer_(std::move(window_capturer)) {
   if (screen_capturer_)
     screen_capturer_->Start(this);
   if (window_capturer_)
@@ -195,14 +195,14 @@ void NativeDesktopMediaList::Worker::Refresh(
     // |current_frame_| may be NULL if capture failed (e.g. because window has
     // been closed).
     if (current_frame_) {
-      uint32 frame_hash = GetFrameHash(current_frame_.get());
+      uint32_t frame_hash = GetFrameHash(current_frame_.get());
       new_image_hashes[source.id] = frame_hash;
 
       // Scale the image only if it has changed.
       ImageHashesMap::iterator it = image_hashes_.find(source.id);
       if (it == image_hashes_.end() || it->second != frame_hash) {
         gfx::ImageSkia thumbnail =
-            ScaleDesktopFrame(current_frame_.Pass(), thumbnail_size);
+            ScaleDesktopFrame(std::move(current_frame_), thumbnail_size);
         BrowserThread::PostTask(
             BrowserThread::UI, FROM_HERE,
             base::Bind(&NativeDesktopMediaList::OnSourceThumbnail,
@@ -231,8 +231,8 @@ void NativeDesktopMediaList::Worker::OnCaptureCompleted(
 NativeDesktopMediaList::NativeDesktopMediaList(
     scoped_ptr<webrtc::ScreenCapturer> screen_capturer,
     scoped_ptr<webrtc::WindowCapturer> window_capturer)
-    : screen_capturer_(screen_capturer.Pass()),
-      window_capturer_(window_capturer.Pass()),
+    : screen_capturer_(std::move(screen_capturer)),
+      window_capturer_(std::move(window_capturer)),
       update_period_(base::TimeDelta::FromMilliseconds(kDefaultUpdatePeriod)),
       thumbnail_size_(100, 100),
       view_dialog_id_(-1),
@@ -269,7 +269,8 @@ void NativeDesktopMediaList::StartUpdating(DesktopMediaListObserver* observer) {
   observer_ = observer;
 
   worker_.reset(new Worker(weak_factory_.GetWeakPtr(),
-                           screen_capturer_.Pass(), window_capturer_.Pass()));
+                           std::move(screen_capturer_),
+                           std::move(window_capturer_)));
   Refresh();
 }
 

+ 0 - 1
chromium_src/chrome/browser/media/native_desktop_media_list.h

@@ -5,7 +5,6 @@
 #ifndef CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_H_
 #define CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_H_
 
-#include "base/basictypes.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/sequenced_task_runner.h"

+ 1 - 1
chromium_src/chrome/browser/printing/pdf_to_emf_converter.cc

@@ -256,7 +256,7 @@ void LazyEmf::Close() const {
 
 bool LazyEmf::LoadEmf(Emf* emf) const {
   file_->Seek(base::File::FROM_BEGIN, 0);
-  int64 size = file_->GetLength();
+  int64_t size = file_->GetLength();
   if (size <= 0)
     return false;
   std::vector<char> data(size);

+ 1 - 1
chromium_src/chrome/browser/printing/print_job.cc

@@ -441,7 +441,7 @@ void PrintJob::HoldUntilStopIsCalled() {
 }
 
 void PrintJob::Quit() {
-  base::MessageLoop::current()->Quit();
+  base::MessageLoop::current()->QuitWhenIdle();
 }
 
 // Takes settings_ ownership and will be deleted in the receiving thread.

+ 0 - 1
chromium_src/chrome/browser/printing/print_job.h

@@ -5,7 +5,6 @@
 #ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_H_
 #define CHROME_BROWSER_PRINTING_PRINT_JOB_H_
 
-#include "base/basictypes.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"

+ 1 - 1
chromium_src/chrome/browser/printing/print_preview_message_handler.cc

@@ -118,7 +118,7 @@ void PrintPreviewMessageHandler::PrintToPDF(
 }
 
 void PrintPreviewMessageHandler::RunPrintToPDFCallback(
-     int request_id, uint32 data_size, char* data) {
+    int request_id, uint32_t data_size, char* data) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
   v8::Isolate* isolate = v8::Isolate::GetCurrent();

+ 1 - 1
chromium_src/chrome/browser/printing/print_preview_message_handler.h

@@ -47,7 +47,7 @@ class PrintPreviewMessageHandler
       const PrintHostMsg_DidPreviewDocument_Params& params);
   void OnPrintPreviewFailed(int document_cookie, int request_id);
 
-  void RunPrintToPDFCallback(int request_id, uint32 data_size, char* data);
+  void RunPrintToPDFCallback(int request_id, uint32_t data_size, char* data);
 
   PrintToPDFCallbackMap print_to_pdf_callback_map_;
 

+ 5 - 5
chromium_src/chrome/browser/printing/print_view_manager_base.cc

@@ -144,7 +144,7 @@ void PrintViewManagerBase::OnDidPrintPage(
 #if !defined(OS_WIN)
   // Update the rendered document. It will send notifications to the listener.
   document->SetPage(params.page_number,
-                    metafile.Pass(),
+                    std::move(metafile),
                     params.page_size,
                     params.content_area);
 
@@ -305,7 +305,7 @@ void PrintViewManagerBase::ShouldQuitFromInnerMessageLoop() {
       inside_inner_message_loop_) {
     // We are in a message loop created by RenderAllMissingPagesNow. Quit from
     // it.
-    base::MessageLoop::current()->Quit();
+    base::MessageLoop::current()->QuitWhenIdle();
     inside_inner_message_loop_ = false;
   }
 }
@@ -411,9 +411,9 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
   // memory-bound.
   static const int kPrinterSettingsTimeout = 60000;
   base::OneShotTimer quit_timer;
-  quit_timer.Start(FROM_HERE,
-                   TimeDelta::FromMilliseconds(kPrinterSettingsTimeout),
-                   base::MessageLoop::current(), &base::MessageLoop::Quit);
+  quit_timer.Start(
+      FROM_HERE, TimeDelta::FromMilliseconds(kPrinterSettingsTimeout),
+      base::MessageLoop::current(), &base::MessageLoop::QuitWhenIdle);
 
   inside_inner_message_loop_ = true;
 

+ 1 - 1
chromium_src/chrome/browser/printing/printing_message_filter.cc

@@ -394,7 +394,7 @@ void PrintingMessageFilter::OnUpdatePrintSettings(
     printer_query = queue_->CreatePrinterQuery(host_id, routing_id);
   }
   printer_query->SetSettings(
-      new_settings.Pass(),
+      std::move(new_settings),
       base::Bind(&PrintingMessageFilter::OnUpdatePrintSettingsReply, this,
                  printer_query, reply_msg));
 }

+ 1 - 1
chromium_src/chrome/browser/printing/printing_message_filter.h

@@ -107,7 +107,7 @@ class PrintingMessageFilter : public content::BrowserMessageFilter {
 
 #if defined(ENABLE_FULL_PRINTING)
   // Check to see if print preview has been cancelled.
-  void OnCheckForCancel(int32 preview_ui_id,
+  void OnCheckForCancel(int32_t preview_ui_id,
                         int preview_request_id,
                         bool* cancel);
 #endif

+ 0 - 1
chromium_src/chrome/browser/printing/printing_ui_web_contents_observer.h

@@ -5,7 +5,6 @@
 #ifndef CHROME_BROWSER_PRINTING_PRINTING_UI_WEB_CONTENTS_OBSERVER_H_
 #define CHROME_BROWSER_PRINTING_PRINTING_UI_WEB_CONTENTS_OBSERVER_H_
 
-#include "base/basictypes.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "ui/gfx/native_widget_types.h"
 

+ 0 - 1
chromium_src/chrome/browser/process_singleton.h

@@ -12,7 +12,6 @@
 #include <set>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
 #include "base/command_line.h"
 #include "base/files/file_path.h"

+ 5 - 5
chromium_src/chrome/browser/process_singleton_posix.cc

@@ -54,7 +54,6 @@
 
 #include "atom/common/atom_command_line.h"
 #include "base/base_paths.h"
-#include "base/basictypes.h"
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/files/file_path.h"
@@ -75,6 +74,7 @@
 #include "base/strings/stringprintf.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
 #include "base/threading/platform_thread.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
@@ -222,7 +222,7 @@ int SetupSocketOnly() {
   int sock = socket(PF_UNIX, SOCK_STREAM, 0);
   PCHECK(sock >= 0) << "socket() failed";
 
-  int rv = net::SetNonBlocking(sock);
+  int rv = base::SetNonBlocking(sock);
   DCHECK_EQ(0, rv) << "Failed to make non-blocking socket.";
   rv = SetCloseOnExec(sock);
   DCHECK_EQ(0, rv) << "Failed to set CLOEXEC on socket.";
@@ -577,7 +577,7 @@ void ProcessSingleton::LinuxWatcher::OnFileCanReadWithoutBlocking(int fd) {
     PLOG(ERROR) << "accept() failed";
     return;
   }
-  int rv = net::SetNonBlocking(connection_socket);
+  int rv = base::SetNonBlocking(connection_socket);
   DCHECK_EQ(0, rv) << "Failed to make non-blocking socket.";
   SocketReader* reader = new SocketReader(this,
                                           ui_message_loop_,
@@ -990,8 +990,8 @@ bool ProcessSingleton::Create() {
   // In Electron the ProcessSingleton is created earlier than the IO
   // thread gets created, so we have to postpone the call until message
   // loop is up an running.
-  scoped_refptr<base::SingleThreadTaskRunner> task_runner(
-      base::ThreadTaskRunnerHandle::Get());
+  scoped_refptr<base::SingleThreadTaskRunner> task_runner =
+      base::ThreadTaskRunnerHandle::Get();
   task_runner->PostTask(
       FROM_HERE,
       base::Bind(&ProcessSingleton::StartListening,

+ 0 - 1
chromium_src/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h

@@ -5,7 +5,6 @@
 #ifndef CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_
 #define CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_
 
-#include "base/basictypes.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "ppapi/host/host_message_context.h"

+ 2 - 2
chromium_src/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.cc

@@ -240,8 +240,8 @@ int32_t PepperFlashClipboardMessageFilter::OnMsgReadData(
 
       base::string16 html;
       std::string url;
-      uint32 fragment_start;
-      uint32 fragment_end;
+      uint32_t fragment_start;
+      uint32_t fragment_end;
       clipboard->ReadHTML(type, &html, &url, &fragment_start, &fragment_end);
       result = PP_OK;
       clipboard_string = base::UTF16ToUTF8(

+ 0 - 2
chromium_src/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h

@@ -8,8 +8,6 @@
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
 #include "ppapi/host/resource_message_filter.h"
 #include "ppapi/shared_impl/flash_clipboard_format_registry.h"
 

+ 3 - 3
chromium_src/chrome/browser/ui/cocoa/color_chooser_mac.mm

@@ -74,7 +74,7 @@ ColorChooserMac::ColorChooserMac(content::WebContents* web_contents,
                                  SkColor initial_color)
     : web_contents_(web_contents) {
   panel_.reset([[ColorPanelCocoa alloc] initWithChooser:this]);
-  [panel_ setColor:gfx::SkColorToDeviceNSColor(initial_color)];
+  [panel_ setColor:skia::SkColorToDeviceNSColor(initial_color)];
   [[NSColorPanel sharedColorPanel] makeKeyAndOrderFront:nil];
 }
 
@@ -101,7 +101,7 @@ void ColorChooserMac::End() {
 }
 
 void ColorChooserMac::SetSelectedColor(SkColor color) {
-  [panel_ setColor:gfx::SkColorToDeviceNSColor(color)];
+  [panel_ setColor:skia::SkColorToDeviceNSColor(color)];
 }
 
 @implementation ColorPanelCocoa
@@ -139,7 +139,7 @@ void ColorChooserMac::SetSelectedColor(SkColor color) {
     nonUserChange_ = NO;
     return;
   }
-  chooser_->DidChooseColorInColorPanel(gfx::NSDeviceColorToSkColor(
+  chooser_->DidChooseColorInColorPanel(skia::NSDeviceColorToSkColor(
       [[panel color] colorUsingColorSpaceName:NSDeviceRGBColorSpace]));
   nonUserChange_ = NO;
 }

+ 0 - 2
chromium_src/chrome/browser/ui/views/color_chooser_aura.h

@@ -5,8 +5,6 @@
 #ifndef CHROME_BROWSER_UI_VIEWS_COLOR_CHOOSER_AURA_H_
 #define CHROME_BROWSER_UI_VIEWS_COLOR_CHOOSER_AURA_H_
 
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
 #include "content/public/browser/color_chooser.h"
 #include "ui/views/color_chooser/color_chooser_listener.h"
 

+ 0 - 1
chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h

@@ -9,7 +9,6 @@
 
 #include <set>
 
-#include "base/basictypes.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/singleton.h"
 #include "ui/base/glib/glib_signal.h"

+ 0 - 1
chromium_src/chrome/common/print_messages.cc

@@ -4,7 +4,6 @@
 
 #include "chrome/common/print_messages.h"
 
-#include "base/basictypes.h"
 #include "base/strings/string16.h"
 #include "ui/gfx/geometry/size.h"
 

+ 2 - 2
chromium_src/chrome/common/print_messages.h

@@ -161,7 +161,7 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params)
   IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle)
 
   // Size of the metafile data.
-  IPC_STRUCT_MEMBER(uint32, data_size)
+  IPC_STRUCT_MEMBER(uint32_t, data_size)
 
   // Cookie for the document to ensure correctness.
   IPC_STRUCT_MEMBER(int, document_cookie)
@@ -193,7 +193,7 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewDocument_Params)
   IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle)
 
   // Size of metafile data.
-  IPC_STRUCT_MEMBER(uint32, data_size)
+  IPC_STRUCT_MEMBER(uint32_t, data_size)
 
   // Cookie for the document to ensure correctness.
   IPC_STRUCT_MEMBER(int, document_cookie)

+ 2 - 2
chromium_src/chrome/common/tts_utterance_request.h

@@ -7,7 +7,7 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 
 struct TtsUtteranceRequest {
@@ -41,4 +41,4 @@ struct TtsUtteranceResponse {
   int id;
 };
 
-#endif  // CHROME_COMMON_TTS_UTTERANCE_REQUEST_H_
+#endif  // CHROME_COMMON_TTS_UTTERANCE_REQUEST_H_

+ 2 - 2
chromium_src/chrome/common/widevine_cdm_constants.cc

@@ -12,5 +12,5 @@ const base::FilePath::CharType kWidevineCdmBaseDirectory[] =
 
 const char kWidevineCdmPluginExtension[] = "";
 
-const int32 kWidevineCdmPluginPermissions = ppapi::PERMISSION_DEV |
-                                            ppapi::PERMISSION_PRIVATE;
+const int32_t kWidevineCdmPluginPermissions = ppapi::PERMISSION_DEV |
+                                              ppapi::PERMISSION_PRIVATE;

+ 2 - 2
chromium_src/chrome/common/widevine_cdm_constants.h

@@ -5,7 +5,7 @@
 #ifndef CHROME_COMMON_WIDEVINE_CDM_CONSTANTS_H_
 #define CHROME_COMMON_WIDEVINE_CDM_CONSTANTS_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/files/file_path.h"
 
 // The Widevine CDM adapter and Widevine CDM are in this directory.
@@ -14,6 +14,6 @@ extern const base::FilePath::CharType kWidevineCdmBaseDirectory[];
 extern const char kWidevineCdmPluginExtension[];
 
 // Permission bits for Widevine CDM plugin.
-extern const int32 kWidevineCdmPluginPermissions;
+extern const int32_t kWidevineCdmPluginPermissions;
 
 #endif  // CHROME_COMMON_WIDEVINE_CDM_CONSTANTS_H_

+ 0 - 2
chromium_src/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.h

@@ -5,8 +5,6 @@
 #ifndef CHROME_RENDERER_PEPPER_CHROME_RENDERER_PEPPER_HOST_FACTORY_H_
 #define CHROME_RENDERER_PEPPER_CHROME_RENDERER_PEPPER_HOST_FACTORY_H_
 
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
 #include "ppapi/host/host_factory.h"
 
 namespace content {

+ 0 - 2
chromium_src/chrome/renderer/pepper/pepper_flash_font_file_host.h

@@ -5,8 +5,6 @@
 #ifndef CHROME_RENDERER_PEPPER_PEPPER_FLASH_FONT_FILE_HOST_H_
 #define CHROME_RENDERER_PEPPER_PEPPER_FLASH_FONT_FILE_HOST_H_
 
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
 #include "ppapi/c/private/pp_private_font_charset.h"
 #include "ppapi/host/resource_host.h"
 

+ 0 - 2
chromium_src/chrome/renderer/pepper/pepper_flash_fullscreen_host.h

@@ -5,8 +5,6 @@
 #ifndef CHROME_RENDERER_PEPPER_PEPPER_FLASH_FULLSCREEN_HOST_H_
 #define CHROME_RENDERER_PEPPER_PEPPER_FLASH_FULLSCREEN_HOST_H_
 
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
 #include "ppapi/host/resource_host.h"
 
 namespace content {

+ 0 - 1
chromium_src/chrome/renderer/pepper/pepper_flash_renderer_host.h

@@ -8,7 +8,6 @@
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/memory/weak_ptr.h"
 #include "ppapi/host/host_message_context.h"
 #include "ppapi/host/resource_host.h"

+ 2 - 3
chromium_src/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc

@@ -43,9 +43,8 @@ void PepperSharedMemoryMessageFilter::OnHostMsgCreateSharedMemory(
     ppapi::proxy::SerializedHandle* plugin_handle) {
   plugin_handle->set_null_shmem();
   *host_handle_id = -1;
-  scoped_ptr<base::SharedMemory> shm(content::RenderThread::Get()
-                                         ->HostAllocateSharedMemoryBuffer(size)
-                                         .Pass());
+  scoped_ptr<base::SharedMemory> shm(
+      content::RenderThread::Get()->HostAllocateSharedMemoryBuffer(size));
   if (!shm.get())
     return;
 

+ 0 - 2
chromium_src/chrome/renderer/pepper/pepper_shared_memory_message_filter.h

@@ -5,8 +5,6 @@
 #ifndef CHROME_RENDERER_PEPPER_PEPPER_SHARED_MEMORY_MESSAGE_FILTER_H_
 #define CHROME_RENDERER_PEPPER_PEPPER_SHARED_MEMORY_MESSAGE_FILTER_H_
 
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/host/instance_message_filter.h"
 

+ 11 - 13
chromium_src/chrome/renderer/printing/print_web_view_helper.cc

@@ -415,22 +415,19 @@ class PrepareFrameAndViewForPrint : public blink::WebViewClient,
     return owns_web_view_ && frame() && frame()->isLoading();
   }
 
-  // TODO(ojan): Remove this override and have this class use a non-null
-  // layerTreeView.
-  // blink::WebViewClient override:
-  virtual bool allowsBrokenNullLayerTreeView() const;
-
  protected:
   // blink::WebViewClient override:
-  virtual void didStopLoading();
+  void didStopLoading() override;
+  bool allowsBrokenNullLayerTreeView() const override;
 
-  // blink::WebFrameClient override:
-  virtual blink::WebFrame* createChildFrame(
+  // blink::WebFrameClient:
+  blink::WebFrame* createChildFrame(
       blink::WebLocalFrame* parent,
       blink::WebTreeScopeType scope,
       const blink::WebString& name,
-      blink::WebSandboxFlags sandboxFlags);
-  virtual void frameDetached(blink::WebFrame* frame, DetachType type);
+      blink::WebSandboxFlags sandboxFlags,
+      const blink::WebFrameOwnerProperties& frameOwnerProperties) override;
+  void frameDetached(blink::WebFrame* frame, DetachType type) override;
 
  private:
   void CallOnReady();
@@ -576,7 +573,8 @@ blink::WebFrame* PrepareFrameAndViewForPrint::createChildFrame(
     blink::WebLocalFrame* parent,
     blink::WebTreeScopeType scope,
     const blink::WebString& name,
-    blink::WebSandboxFlags sandboxFlags) {
+    blink::WebSandboxFlags sandboxFlags,
+    const blink::WebFrameOwnerProperties& frameOwnerProperties) {
   blink::WebFrame* frame = blink::WebLocalFrame::create(scope, this);
   parent->appendChild(frame);
   return frame;
@@ -814,7 +812,7 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
 
   // Get the size of the resulting metafile.
   PdfMetafileSkia* metafile = print_preview_context_.metafile();
-  uint32 buf_size = metafile->GetDataSize();
+  uint32_t buf_size = metafile->GetDataSize();
   DCHECK_GT(buf_size, 0u);
 
   PrintHostMsg_DidPreviewDocument_Params preview_params;
@@ -1164,7 +1162,7 @@ bool PrintWebViewHelper::RenderPagesForPrint(blink::WebLocalFrame* frame,
 bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
     PdfMetafileSkia* metafile,
     base::SharedMemoryHandle* shared_mem_handle) {
-  uint32 buf_size = metafile->GetDataSize();
+  uint32_t buf_size = metafile->GetDataSize();
   scoped_ptr<base::SharedMemory> shared_buf(
       content::RenderThread::Get()->HostAllocateSharedMemoryBuffer(
           buf_size).release());

+ 1 - 1
chromium_src/chrome/renderer/printing/print_web_view_helper_linux.cc

@@ -92,7 +92,7 @@ bool PrintWebViewHelper::PrintPagesNative(blink::WebFrame* frame,
   metafile.FinishDocument();
 
   // Get the size of the resulting metafile.
-  uint32 buf_size = metafile.GetDataSize();
+  uint32_t buf_size = metafile.GetDataSize();
   DCHECK_GT(buf_size, 0u);
 
 #if defined(OS_CHROMEOS) || defined(OS_ANDROID)

+ 1 - 3
chromium_src/chrome/renderer/printing/print_web_view_helper_mac.mm

@@ -116,15 +116,13 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
   gfx::Rect canvas_area = content_area;
 
   {
-    skia::PlatformCanvas* canvas = metafile->GetVectorCanvasForNewPage(
+    SkCanvas* canvas = metafile->GetVectorCanvasForNewPage(
         *page_size, canvas_area, scale_factor);
     if (!canvas)
       return;
 
     MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
-    skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
     skia::SetIsPreviewMetafile(*canvas, is_preview);
-
     RenderPageContent(frame, page_number, canvas_area, content_area,
                       scale_factor, static_cast<blink::WebCanvas*>(canvas));
   }

+ 2 - 2
chromium_src/chrome/renderer/printing/print_web_view_helper_pdf_win.cc

@@ -96,7 +96,7 @@ bool PrintWebViewHelper::PrintPagesNative(blink::WebFrame* frame,
   metafile.FinishDocument();
 
   // Get the size of the resulting metafile.
-  uint32 buf_size = metafile.GetDataSize();
+  uint32_t buf_size = metafile.GetDataSize();
   DCHECK_GT(buf_size, 0u);
 
   PrintHostMsg_DidPrintPage_Params printed_page_params;
@@ -218,7 +218,7 @@ void PrintWebViewHelper::PrintPageInternal(
 bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
     PdfMetafileSkia* metafile,
     base::SharedMemoryHandle* shared_mem_handle) {
-  uint32 buf_size = metafile->GetDataSize();
+  uint32_t buf_size = metafile->GetDataSize();
   base::SharedMemory shared_buf;
   // Allocate a shared memory buffer to hold the generated metafile data.
   if (!shared_buf.CreateAndMapAnonymous(buf_size)) {

+ 1 - 2
chromium_src/chrome/renderer/spellchecker/spellcheck_worditerator.cc

@@ -9,7 +9,6 @@
 #include <map>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/i18n/break_iterator.h"
 #include "base/logging.h"
 #include "base/strings/stringprintf.h"
@@ -332,7 +331,7 @@ bool SpellcheckWordIterator::Initialize(
     NOTREACHED() << "failed to open iterator (broken rules)";
     return false;
   }
-  iterator_ = iterator.Pass();
+  iterator_ = std::move(iterator);
 
   // Set the character attributes so we can normalize the words extracted by
   // this iterator.

+ 1 - 1
chromium_src/chrome/renderer/spellchecker/spellcheck_worditerator.h

@@ -11,7 +11,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "third_party/icu/source/common/unicode/uscript.h"

+ 1 - 2
chromium_src/chrome/renderer/tts_dispatcher.cc

@@ -4,7 +4,6 @@
 
 #include "chrome/renderer/tts_dispatcher.h"
 
-#include "base/basictypes.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/common/tts_messages.h"
 #include "chrome/common/tts_utterance_request.h"
@@ -197,4 +196,4 @@ void TtsDispatcher::OnSpeakingErrorOccurred(int utterance_id,
   // The web speech API doesn't support an error message.
   synthesizer_client_->speakingErrorOccurred(utterance);
   utterance_id_map_.erase(utterance_id);
-}
+}

+ 1 - 3
chromium_src/chrome/renderer/tts_dispatcher.h

@@ -7,8 +7,6 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
 #include "base/containers/hash_tables.h"
 #include "content/public/renderer/render_process_observer.h"
 #include "third_party/WebKit/public/platform/WebSpeechSynthesizer.h"
@@ -75,4 +73,4 @@ class TtsDispatcher
   DISALLOW_COPY_AND_ASSIGN(TtsDispatcher);
 };
 
-#endif  // CHROME_RENDERER_TTS_DISPATCHER_H_
+#endif  // CHROME_RENDERER_TTS_DISPATCHER_H_

+ 1 - 1
chromium_src/chrome/utility/printing_handler_win.cc

@@ -177,7 +177,7 @@ int PrintingHandlerWin::LoadPDF(base::File pdf_file) {
   if (!g_pdf_lib.Get().IsValid())
     return 0;
 
-  int64 length64 = pdf_file.GetLength();
+  int64_t length64 = pdf_file.GetLength();
   if (length64 <= 0 || length64 > std::numeric_limits<int>::max())
     return 0;
   int length = static_cast<int>(length64);

+ 3 - 1
chromium_src/net/test/embedded_test_server/stream_listen_socket.cc

@@ -17,6 +17,7 @@
 #include "net/base/net_errors.h"
 #endif
 
+#include "base/files/file_util.h"
 #include "base/logging.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
@@ -27,6 +28,7 @@
 #include "net/base/ip_endpoint.h"
 #include "net/base/net_errors.h"
 #include "net/base/net_util.h"
+#include "net/base/sockaddr_storage.h"
 #include "net/socket/socket_descriptor.h"
 
 using std::string;
@@ -125,7 +127,7 @@ SocketDescriptor StreamListenSocket::AcceptSocket() {
   if (conn == kInvalidSocket)
     LOG(ERROR) << "Error accepting connection.";
   else
-    SetNonBlocking(conn);
+    base::SetNonBlocking(conn);
   return conn;
 }
 

+ 1 - 1
chromium_src/net/test/embedded_test_server/stream_listen_socket.h

@@ -28,7 +28,7 @@
 #include "base/message_loop/message_loop.h"
 #endif
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/compiler_specific.h"
 #include "base/memory/scoped_ptr.h"
 #include "net/base/net_export.h"

+ 6 - 5
chromium_src/net/test/embedded_test_server/tcp_listen_socket.cc

@@ -34,14 +34,14 @@ namespace test_server {
 // static
 scoped_ptr<TCPListenSocket> TCPListenSocket::CreateAndListen(
     const string& ip,
-    uint16 port,
+    uint16_t port,
     StreamListenSocket::Delegate* del) {
   SocketDescriptor s = CreateAndBind(ip, port);
   if (s == kInvalidSocket)
     return scoped_ptr<TCPListenSocket>();
   scoped_ptr<TCPListenSocket> sock(new TCPListenSocket(s, del));
   sock->Listen();
-  return sock.Pass();
+  return sock;
 }
 
 TCPListenSocket::TCPListenSocket(SocketDescriptor s,
@@ -52,7 +52,8 @@ TCPListenSocket::TCPListenSocket(SocketDescriptor s,
 TCPListenSocket::~TCPListenSocket() {
 }
 
-SocketDescriptor TCPListenSocket::CreateAndBind(const string& ip, uint16 port) {
+SocketDescriptor TCPListenSocket::CreateAndBind(const string& ip,
+                                                uint16_t port) {
   SocketDescriptor s = CreatePlatformSocket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
   if (s != kInvalidSocket) {
 #if defined(OS_POSIX)
@@ -79,7 +80,7 @@ SocketDescriptor TCPListenSocket::CreateAndBind(const string& ip, uint16 port) {
 }
 
 SocketDescriptor TCPListenSocket::CreateAndBindAnyPort(const string& ip,
-                                                       uint16* port) {
+                                                       uint16_t* port) {
   SocketDescriptor s = CreateAndBind(ip, 0);
   if (s == kInvalidSocket)
     return kInvalidSocket;
@@ -110,7 +111,7 @@ void TCPListenSocket::Accept() {
 #if defined(OS_POSIX)
   sock->WatchSocket(WAITING_READ);
 #endif
-  socket_delegate_->DidAccept(this, sock.Pass());
+  socket_delegate_->DidAccept(this, std::move(sock));
 }
 
 }  // namespace test_server

+ 4 - 4
chromium_src/net/test/embedded_test_server/tcp_listen_socket.h

@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "net/base/net_export.h"
 #include "net/socket/socket_descriptor.h"
 #include "net/test/embedded_test_server/stream_listen_socket.h"
@@ -25,7 +25,7 @@ class TCPListenSocket : public StreamListenSocket {
   // accept local connections.
   static scoped_ptr<TCPListenSocket> CreateAndListen(
       const std::string& ip,
-      uint16 port,
+      uint16_t port,
       StreamListenSocket::Delegate* del);
 
  protected:
@@ -39,11 +39,11 @@ class TCPListenSocket : public StreamListenSocket {
   friend class TCPListenSocketTester;
 
   // Get raw TCP socket descriptor bound to ip:port.
-  static SocketDescriptor CreateAndBind(const std::string& ip, uint16 port);
+  static SocketDescriptor CreateAndBind(const std::string& ip, uint16_t port);
 
   // Get raw TCP socket descriptor bound to ip and return port it is bound to.
   static SocketDescriptor CreateAndBindAnyPort(const std::string& ip,
-                                               uint16* port);
+                                               uint16_t* port);
 
   DISALLOW_COPY_AND_ASSIGN(TCPListenSocket);
 };

+ 1 - 1
vendor/brightray

@@ -1 +1 @@
-Subproject commit 2a29ea6c1de3accd01f1883ac94326220349bbe1
+Subproject commit 70f475e34dd5f580dc8d5184d6fa8e5c96c5f601