Update to API changes of Chrome 52

This commit is contained in:
Cheng Zhao 2016-07-04 15:08:55 +09:00
parent eb378bef3a
commit 1ba3907038
74 changed files with 304 additions and 176 deletions

View file

@ -10,7 +10,7 @@
#include "atom/common/node_includes.h"
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread_task_runner_handle.h"
#include "gin/array_buffer.h"
#include "gin/public/isolate_holder.h"
#include "gin/v8_initializer.h"

View file

@ -4,6 +4,7 @@
#include "atom/browser/api/atom_api_cookies.h"
#include "atom/browser/atom_browser_context.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/gurl_converter.h"
#include "atom/common/native_mate_converters/value_converter.h"
@ -204,8 +205,8 @@ void SetCookieOnIO(scoped_refptr<net::URLRequestContextGetter> getter,
} // namespace
Cookies::Cookies(v8::Isolate* isolate,
content::BrowserContext* browser_context)
: request_context_getter_(browser_context->GetRequestContext()) {
AtomBrowserContext* browser_context)
: request_context_getter_(browser_context->url_request_context_getter()) {
Init(isolate);
}
@ -241,7 +242,7 @@ void Cookies::Set(const base::DictionaryValue& details,
// static
mate::Handle<Cookies> Cookies::Create(
v8::Isolate* isolate,
content::BrowserContext* browser_context) {
AtomBrowserContext* browser_context) {
return mate::CreateHandle(isolate, new Cookies(isolate, browser_context));
}

View file

@ -16,16 +16,14 @@ namespace base {
class DictionaryValue;
}
namespace content {
class BrowserContext;
}
namespace net {
class URLRequestContextGetter;
}
namespace atom {
class AtomBrowserContext;
namespace api {
class Cookies : public mate::TrackableObject<Cookies> {
@ -39,14 +37,14 @@ class Cookies : public mate::TrackableObject<Cookies> {
using SetCallback = base::Callback<void(Error)>;
static mate::Handle<Cookies> Create(v8::Isolate* isolate,
content::BrowserContext* browser_context);
AtomBrowserContext* browser_context);
// mate::TrackableObject:
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype);
protected:
Cookies(v8::Isolate* isolate, content::BrowserContext* browser_context);
Cookies(v8::Isolate* isolate, AtomBrowserContext* browser_context);
~Cookies() override;
void Get(const base::DictionaryValue& filter, const GetCallback& callback);

View file

@ -5,13 +5,13 @@
#ifndef ATOM_BROWSER_API_ATOM_API_MENU_H_
#define ATOM_BROWSER_API_ATOM_API_MENU_H_
#include <memory>
#include <string>
#include "atom/browser/api/atom_api_window.h"
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/ui/atom_menu_model.h"
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
namespace atom {

View file

@ -6,7 +6,7 @@
#include "atom/browser/native_window_views.h"
#include "content/public/browser/render_widget_host_view.h"
#include "ui/gfx/screen.h"
#include "ui/display/screen.h"
#include "ui/views/controls/menu/menu_runner.h"
namespace atom {
@ -30,7 +30,7 @@ void MenuViews::PopupAt(Window* window, int x, int y, int positioning_item) {
// (-1, -1) means showing on mouse location.
gfx::Point location;
if (x == -1 || y == -1) {
location = gfx::Screen::GetScreen()->GetCursorScreenPoint();
location = display::Screen::GetScreen()->GetCursorScreenPoint();
} else {
gfx::Point origin = view->GetViewBounds().origin();
location = gfx::Point(origin.x() + x, origin.y() + y);

View file

@ -6,7 +6,7 @@
#define ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#include "atom/browser/api/atom_api_menu.h"
#include "ui/gfx/screen.h"
#include "ui/display/screen.h"
namespace atom {

View file

@ -6,9 +6,9 @@
#define ATOM_BROWSER_API_ATOM_API_POWER_SAVE_BLOCKER_H_
#include <map>
#include <memory>
#include "atom/browser/api/trackable_object.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/power_save_blocker.h"
#include "native_mate/handle.h"

View file

@ -27,8 +27,7 @@ namespace atom {
namespace api {
Protocol::Protocol(v8::Isolate* isolate, AtomBrowserContext* browser_context)
: request_context_getter_(static_cast<brightray::URLRequestContextGetter*>(
browser_context->GetRequestContext())),
: request_context_getter_(browser_context->url_request_context_getter()),
weak_factory_(this) {
Init(isolate);
}

View file

@ -12,7 +12,9 @@
#include "base/bind.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
#include "ui/gfx/screen.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/gfx/geometry/point.h"
#include "atom/common/node_includes.h"
@ -34,20 +36,20 @@ typename T::iterator FindById(T* container, int id) {
// Convert the changed_metrics bitmask to string array.
std::vector<std::string> MetricsToArray(uint32_t metrics) {
std::vector<std::string> array;
if (metrics & gfx::DisplayObserver::DISPLAY_METRIC_BOUNDS)
if (metrics & display::DisplayObserver::DISPLAY_METRIC_BOUNDS)
array.push_back("bounds");
if (metrics & gfx::DisplayObserver::DISPLAY_METRIC_WORK_AREA)
if (metrics & display::DisplayObserver::DISPLAY_METRIC_WORK_AREA)
array.push_back("workArea");
if (metrics & gfx::DisplayObserver::DISPLAY_METRIC_DEVICE_SCALE_FACTOR)
if (metrics & display::DisplayObserver::DISPLAY_METRIC_DEVICE_SCALE_FACTOR)
array.push_back("scaleFactor");
if (metrics & gfx::DisplayObserver::DISPLAY_METRIC_ROTATION)
if (metrics & display::DisplayObserver::DISPLAY_METRIC_ROTATION)
array.push_back("rotation");
return array;
}
} // namespace
Screen::Screen(v8::Isolate* isolate, gfx::Screen* screen)
Screen::Screen(v8::Isolate* isolate, display::Screen* screen)
: screen_(screen) {
screen_->AddObserver(this);
Init(isolate);
@ -61,31 +63,31 @@ gfx::Point Screen::GetCursorScreenPoint() {
return screen_->GetCursorScreenPoint();
}
gfx::Display Screen::GetPrimaryDisplay() {
display::Display Screen::GetPrimaryDisplay() {
return screen_->GetPrimaryDisplay();
}
std::vector<gfx::Display> Screen::GetAllDisplays() {
std::vector<display::Display> Screen::GetAllDisplays() {
return screen_->GetAllDisplays();
}
gfx::Display Screen::GetDisplayNearestPoint(const gfx::Point& point) {
display::Display Screen::GetDisplayNearestPoint(const gfx::Point& point) {
return screen_->GetDisplayNearestPoint(point);
}
gfx::Display Screen::GetDisplayMatching(const gfx::Rect& match_rect) {
display::Display Screen::GetDisplayMatching(const gfx::Rect& match_rect) {
return screen_->GetDisplayMatching(match_rect);
}
void Screen::OnDisplayAdded(const gfx::Display& new_display) {
void Screen::OnDisplayAdded(const display::Display& new_display) {
Emit("display-added", new_display);
}
void Screen::OnDisplayRemoved(const gfx::Display& old_display) {
void Screen::OnDisplayRemoved(const display::Display& old_display) {
Emit("display-removed", old_display);
}
void Screen::OnDisplayMetricsChanged(const gfx::Display& display,
void Screen::OnDisplayMetricsChanged(const display::Display& display,
uint32_t changed_metrics) {
Emit("display-metrics-changed", display, MetricsToArray(changed_metrics));
}
@ -99,7 +101,7 @@ v8::Local<v8::Value> Screen::Create(v8::Isolate* isolate) {
return v8::Null(isolate);
}
gfx::Screen* screen = gfx::Screen::GetScreen();
display::Screen* screen = display::Screen::GetScreen();
if (!screen) {
isolate->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate, "Failed to get screen information")));

View file

@ -9,7 +9,8 @@
#include "atom/browser/api/event_emitter.h"
#include "native_mate/handle.h"
#include "ui/gfx/display_observer.h"
#include "ui/display/display_observer.h"
#include "ui/display/screen.h"
namespace gfx {
class Point;
@ -22,7 +23,7 @@ namespace atom {
namespace api {
class Screen : public mate::EventEmitter<Screen>,
public gfx::DisplayObserver {
public display::DisplayObserver {
public:
static v8::Local<v8::Value> Create(v8::Isolate* isolate);
@ -30,23 +31,23 @@ class Screen : public mate::EventEmitter<Screen>,
v8::Local<v8::ObjectTemplate> prototype);
protected:
Screen(v8::Isolate* isolate, gfx::Screen* screen);
Screen(v8::Isolate* isolate, display::Screen* screen);
~Screen() override;
gfx::Point GetCursorScreenPoint();
gfx::Display GetPrimaryDisplay();
std::vector<gfx::Display> GetAllDisplays();
gfx::Display GetDisplayNearestPoint(const gfx::Point& point);
gfx::Display GetDisplayMatching(const gfx::Rect& match_rect);
display::Display GetPrimaryDisplay();
std::vector<display::Display> GetAllDisplays();
display::Display GetDisplayNearestPoint(const gfx::Point& point);
display::Display GetDisplayMatching(const gfx::Rect& match_rect);
// gfx::DisplayObserver:
void OnDisplayAdded(const gfx::Display& new_display) override;
void OnDisplayRemoved(const gfx::Display& old_display) override;
void OnDisplayMetricsChanged(const gfx::Display& display,
// display::DisplayObserver:
void OnDisplayAdded(const display::Display& new_display) override;
void OnDisplayRemoved(const display::Display& old_display) override;
void OnDisplayMetricsChanged(const display::Display& display,
uint32_t changed_metrics) override;
private:
gfx::Screen* screen_;
display::Screen* screen_;
DISALLOW_COPY_AND_ASSIGN(Screen);
};

View file

@ -26,7 +26,7 @@
#include "components/prefs/pref_service.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread_task_runner_handle.h"
#include "brightray/browser/net/devtools_network_conditions.h"
#include "brightray/browser/net/devtools_network_controller_handle.h"
#include "chrome/common/pref_names.h"
@ -175,7 +175,7 @@ class ResolveProxyHelper {
: callback_(callback),
original_thread_(base::ThreadTaskRunnerHandle::Get()) {
scoped_refptr<net::URLRequestContextGetter> context_getter =
browser_context->GetRequestContext();
browser_context->url_request_context_getter();
context_getter->GetNetworkTaskRunner()->PostTask(
FROM_HERE,
base::Bind(&ResolveProxyHelper::ResolveProxy,
@ -278,7 +278,7 @@ void SetProxyInIO(net::URLRequestContextGetter* getter,
const net::ProxyConfig& config,
const base::Closure& callback) {
auto proxy_service = getter->GetURLRequestContext()->proxy_service();
proxy_service->ResetConfigService(make_scoped_ptr(
proxy_service->ResetConfigService(base::WrapUnique(
new net::ProxyConfigServiceFixed(config)));
// Refetches and applies the new pac script if provided.
proxy_service->ForceReloadProxyConfig();
@ -354,7 +354,7 @@ template<Session::CacheAction action>
void Session::DoCacheAction(const net::CompletionCallback& callback) {
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&DoCacheActionInIO,
make_scoped_refptr(browser_context_->GetRequestContext()),
make_scoped_refptr(browser_context_->url_request_context_getter()),
action,
callback));
}
@ -385,7 +385,7 @@ void Session::FlushStorageData() {
void Session::SetProxy(const net::ProxyConfig& config,
const base::Closure& callback) {
auto getter = browser_context_->GetRequestContext();
auto getter = browser_context_->url_request_context_getter();
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&SetProxyInIO, base::Unretained(getter), config, callback));
}
@ -455,14 +455,14 @@ void Session::ClearHostResolverCache(mate::Arguments* args) {
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&ClearHostResolverCacheInIO,
make_scoped_refptr(browser_context_->GetRequestContext()),
make_scoped_refptr(browser_context_->url_request_context_getter()),
callback));
}
void Session::AllowNTLMCredentialsForDomains(const std::string& domains) {
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&AllowNTLMCredentialsForDomainsInIO,
make_scoped_refptr(browser_context_->GetRequestContext()),
make_scoped_refptr(browser_context_->url_request_context_getter()),
domains));
}
@ -473,7 +473,7 @@ void Session::SetUserAgent(const std::string& user_agent,
std::string accept_lang = l10n_util::GetApplicationLocale("");
args->GetNext(&accept_lang);
auto getter = browser_context_->GetRequestContext();
auto getter = browser_context_->url_request_context_getter();
getter->GetNetworkTaskRunner()->PostTask(
FROM_HERE,
base::Bind(&SetUserAgentInIO, getter, accept_lang, user_agent));

View file

@ -5,12 +5,12 @@
#ifndef ATOM_BROWSER_API_ATOM_API_TRAY_H_
#define ATOM_BROWSER_API_ATOM_API_TRAY_H_
#include <memory>
#include <string>
#include <vector>
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/ui/tray_icon_observer.h"
#include "base/memory/scoped_ptr.h"
#include "native_mate/handle.h"
namespace gfx {

View file

@ -10,7 +10,6 @@
#include "atom/browser/api/event_emitter.h"
#include "atom/common/key_weak_map.h"
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "native_mate/object_template_builder.h"

View file

@ -48,7 +48,7 @@ void AtomAccessTokenStore::SaveAccessToken(const GURL& server_url,
void AtomAccessTokenStore::GetRequestContextOnUIThread() {
auto browser_context = brightray::BrowserContext::From("", false);
request_context_getter_ = browser_context->GetRequestContext();
request_context_getter_ = browser_context->url_request_context_getter();
}
void AtomAccessTokenStore::RespondOnOriginatingThread(

View file

@ -202,7 +202,7 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches(
void AtomBrowserClient::DidCreatePpapiPlugin(
content::BrowserPpapiHost* host) {
host->GetPpapiHost()->AddHostFactoryFilter(
make_scoped_ptr(new chrome::ChromeBrowserPepperHostFactory(host)));
base::WrapUnique(new chrome::ChromeBrowserPepperHostFactory(host)));
}
content::QuotaPermissionContext*

View file

@ -113,29 +113,29 @@ AtomBrowserContext::CreateURLRequestJobFactory(
protocol_handlers->clear();
job_factory->SetProtocolHandler(
url::kDataScheme, make_scoped_ptr(new net::DataProtocolHandler));
url::kDataScheme, base::WrapUnique(new net::DataProtocolHandler));
job_factory->SetProtocolHandler(
url::kFileScheme, make_scoped_ptr(new asar::AsarProtocolHandler(
url::kFileScheme, base::WrapUnique(new asar::AsarProtocolHandler(
BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior(
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))));
job_factory->SetProtocolHandler(
url::kHttpScheme,
make_scoped_ptr(new HttpProtocolHandler(url::kHttpScheme)));
base::WrapUnique(new HttpProtocolHandler(url::kHttpScheme)));
job_factory->SetProtocolHandler(
url::kHttpsScheme,
make_scoped_ptr(new HttpProtocolHandler(url::kHttpsScheme)));
base::WrapUnique(new HttpProtocolHandler(url::kHttpsScheme)));
job_factory->SetProtocolHandler(
url::kWsScheme,
make_scoped_ptr(new HttpProtocolHandler(url::kWsScheme)));
base::WrapUnique(new HttpProtocolHandler(url::kWsScheme)));
job_factory->SetProtocolHandler(
url::kWssScheme,
make_scoped_ptr(new HttpProtocolHandler(url::kWssScheme)));
base::WrapUnique(new HttpProtocolHandler(url::kWssScheme)));
auto host_resolver =
url_request_context_getter()->GetURLRequestContext()->host_resolver();
job_factory->SetProtocolHandler(
url::kFtpScheme,
make_scoped_ptr(new net::FtpProtocolHandler(
base::WrapUnique(new net::FtpProtocolHandler(
new net::FtpNetworkLayer(host_resolver))));
return std::move(job_factory);
@ -174,7 +174,7 @@ content::PermissionManager* AtomBrowserContext::GetPermissionManager() {
}
std::unique_ptr<net::CertVerifier> AtomBrowserContext::CreateCertVerifier() {
return make_scoped_ptr(cert_verifier_);
return base::WrapUnique(cert_verifier_);
}
net::SSLConfigService* AtomBrowserContext::CreateSSLConfigService() {

View file

@ -15,7 +15,7 @@
#include "atom/common/node_bindings.h"
#include "atom/common/node_includes.h"
#include "base/command_line.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/browser_process.h"
#include "v8/include/v8-debug.h"

View file

@ -91,8 +91,14 @@ void AtomSecurityStateModelClient::GetVisibleSecurityState(
state->connection_status = ssl.connection_status;
state->security_bits = ssl.security_bits;
state->sct_verify_statuses.clear();
for (const auto& sct : ssl.signed_certificate_timestamp_ids)
state->sct_verify_statuses.push_back(sct.status);
state->sct_verify_statuses.insert(state->sct_verify_statuses.end(),
ssl.num_unknown_scts,
net::ct::SCT_STATUS_LOG_UNKNOWN);
state->sct_verify_statuses.insert(state->sct_verify_statuses.end(),
ssl.num_invalid_scts,
net::ct::SCT_STATUS_INVALID);
state->sct_verify_statuses.insert(state->sct_verify_statuses.end(),
ssl.num_valid_scts, net::ct::SCT_STATUS_OK);
state->displayed_mixed_content =
(ssl.content_status & content::SSLStatus::DISPLAYED_INSECURE_CONTENT)
? true

View file

@ -50,11 +50,6 @@ void AtomSpeechRecognitionManagerDelegate::OnAudioLevelsChange(
int session_id, float volume, float noise_volume) {
}
void AtomSpeechRecognitionManagerDelegate::GetDiagnosticInformation(
bool* can_report_metrics, std::string* hardware_info) {
*can_report_metrics = false;
}
void AtomSpeechRecognitionManagerDelegate::CheckRecognitionIsAllowed(
int session_id,
base::Callback<void(bool ask_user, bool is_allowed)> callback) {

View file

@ -36,8 +36,6 @@ class AtomSpeechRecognitionManagerDelegate
float noise_volume) override;
// content::SpeechRecognitionManagerDelegate:
void GetDiagnosticInformation(bool* can_report_metrics,
std::string* hardware_info) override;
void CheckRecognitionIsAllowed(
int session_id,
base::Callback<void(bool ask_user, bool is_allowed)> callback) override;

View file

@ -13,7 +13,6 @@
#include "base/base_paths.h"
#include "base/file_version_info.h"
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"

View file

@ -5,9 +5,9 @@
#ifndef ATOM_BROWSER_MAC_DICT_UTIL_H_
#define ATOM_BROWSER_MAC_DICT_UTIL_H_
#import <Foundation/Foundation.h>
#include <memory>
#include "base/memory/scoped_ptr.h"
#import <Foundation/Foundation.h>
namespace base {
class ListValue;

View file

@ -37,7 +37,7 @@
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/geometry/size_conversions.h"
#include "ui/gfx/screen.h"
#include "ui/display/screen.h"
#include "ui/gl/gpu_switching_manager.h"
DEFINE_WEB_CONTENTS_USER_DATA_KEY(atom::NativeWindowRelay);
@ -334,7 +334,7 @@ void NativeWindow::CapturePage(const gfx::Rect& rect,
gfx::Size bitmap_size = view_size;
const gfx::NativeView native_view = view->GetNativeView();
const float scale =
gfx::Screen::GetScreen()->GetDisplayNearestWindow(native_view)
display::Screen::GetScreen()->GetDisplayNearestWindow(native_view)
.device_scale_factor();
if (scale > 1.0f)
bitmap_size = gfx::ScaleToCeiledSize(view_size, scale);
@ -394,7 +394,7 @@ void NativeWindow::RequestToClosePage() {
ScheduleUnresponsiveEvent(5000);
if (web_contents()->NeedToFireBeforeUnload())
web_contents()->DispatchBeforeUnload(false);
web_contents()->DispatchBeforeUnload();
else
web_contents()->Close();
}

View file

@ -6,13 +6,13 @@
#define ATOM_BROWSER_NATIVE_WINDOW_H_
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "atom/browser/native_window_observer.h"
#include "atom/browser/ui/accelerator_util.h"
#include "base/cancelable_callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "base/supports_user_data.h"

View file

@ -724,11 +724,6 @@ void NativeWindowMac::SetFullScreen(bool fullscreen) {
if (fullscreen == IsFullscreen())
return;
if (!base::mac::IsOSLionOrLater()) {
LOG(ERROR) << "Fullscreen mode is only supported above Lion";
return;
}
[window_ toggleFullScreen:nil];
}

View file

@ -180,10 +180,10 @@ bool URLRequestAsarJob::IsRedirectResponse(GURL* location,
#endif
}
net::Filter* URLRequestAsarJob::SetupFilter() const {
std::unique_ptr<net::Filter> URLRequestAsarJob::SetupFilter() const {
// Bug 9936 - .svgz files needs to be decompressed.
return base::LowerCaseEqualsASCII(file_path_.Extension(), ".svgz")
? net::Filter::GZipFactory() : NULL;
? net::Filter::GZipFactory() : nullptr;
}
bool URLRequestAsarJob::GetMimeType(std::string* mime_type) const {

View file

@ -56,7 +56,7 @@ class URLRequestAsarJob : public net::URLRequestJob {
void Kill() override;
int ReadRawData(net::IOBuffer* buf, int buf_size) override;
bool IsRedirectResponse(GURL* location, int* http_status_code) override;
net::Filter* SetupFilter() const override;
std::unique_ptr<net::Filter> SetupFilter() const override;
bool GetMimeType(std::string* mime_type) const override;
void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override;
int GetResponseCode() const override;

View file

@ -7,6 +7,7 @@
#include <algorithm>
#include <string>
#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "native_mate/dictionary.h"
#include "net/base/io_buffer.h"
@ -132,7 +133,7 @@ void URLRequestFetchJob::StartAsync(std::unique_ptr<base::Value> options) {
request_type = GetRequestType(method);
fetcher_ = net::URLFetcher::Create(formated_url, request_type, this);
fetcher_->SaveResponseWithWriter(make_scoped_ptr(new ResponsePiper(this)));
fetcher_->SaveResponseWithWriter(base::WrapUnique(new ResponsePiper(this)));
// A request context getter is passed by the user.
if (url_request_context_getter_)

View file

@ -5,9 +5,9 @@
#ifndef ATOM_BROWSER_NODE_DEBUGGER_H_
#define ATOM_BROWSER_NODE_DEBUGGER_H_
#include <memory>
#include <string>
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread.h"
#include "net/test/embedded_test_server/stream_listen_socket.h"

View file

@ -10,7 +10,7 @@
#include "ui/base/dragdrop/file_info.h"
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/screen.h"
#include "ui/display/screen.h"
#include "ui/views/widget/widget.h"
#include "ui/wm/public/drag_drop_client.h"
@ -34,7 +34,7 @@ void DragFileItems(const std::vector<base::FilePath>& files,
if (!root_window || !aura::client::GetDragDropClient(root_window))
return;
gfx::Point location = gfx::Screen::GetScreen()->GetCursorScreenPoint();
gfx::Point location = display::Screen::GetScreen()->GetCursorScreenPoint();
// TODO(varunjain): Properly determine and send DRAG_EVENT_SOURCE below.
aura::client::GetDragDropClient(root_window)->StartDragAndDrop(
data,

View file

@ -9,7 +9,7 @@
#include "ui/events/cocoa/cocoa_event_utils.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/mac/coordinate_conversion.h"
#include "ui/gfx/screen.h"
#include "ui/display/screen.h"
namespace {

View file

@ -5,7 +5,8 @@
#ifndef ATOM_BROWSER_UI_VIEWS_MENU_DELEGATE_H_
#define ATOM_BROWSER_UI_VIEWS_MENU_DELEGATE_H_
#include "base/memory/scoped_ptr.h"
#include <memory>
#include "ui/views/controls/menu/menu_delegate.h"
namespace views {

View file

@ -12,7 +12,7 @@
#include "ui/gfx/image/image.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/screen.h"
#include "ui/display/screen.h"
#include "ui/gfx/win/dpi.h"
#include "ui/views/controls/menu/menu_runner.h"
@ -145,7 +145,7 @@ void NotifyIcon::PopUpContextMenu(const gfx::Point& pos,
// Show menu at mouse's position by default.
gfx::Rect rect(pos, gfx::Size());
if (pos.IsOrigin())
rect.set_origin(gfx::Screen::GetScreen()->GetCursorScreenPoint());
rect.set_origin(display::Screen::GetScreen()->GetCursorScreenPoint());
views::MenuRunner menu_runner(
menu_model != nullptr ? menu_model : menu_model_,

View file

@ -13,7 +13,6 @@
#include "atom/browser/ui/tray_icon.h"
#include "base/macros.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/win/scoped_gdi_object.h"
namespace gfx {

View file

@ -81,7 +81,7 @@ bool AddImageSkiaRep(gfx::ImageSkia* image,
// Try PNG first.
if (!gfx::PNGCodec::Decode(data, size, decoded.get()))
// Try JPEG.
decoded.reset(gfx::JPEGCodec::Decode(data, size));
decoded = gfx::JPEGCodec::Decode(data, size);
if (!decoded)
return false;

View file

@ -6,7 +6,6 @@
#include "atom/common/api/locker.h"
#include "atom/common/node_includes.h"
#include "base/memory/scoped_ptr.h"
namespace mate {

View file

@ -5,12 +5,12 @@
#ifndef ATOM_COMMON_ASAR_ARCHIVE_H_
#define ATOM_COMMON_ASAR_ARCHIVE_H_
#include <memory>
#include <vector>
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
namespace base {
class DictionaryValue;

View file

@ -5,12 +5,12 @@
#ifndef ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_LINUX_H_
#define ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_LINUX_H_
#include <memory>
#include <string>
#include "atom/common/crash_reporter/crash_reporter.h"
#include "atom/common/crash_reporter/linux/crash_dump_handler.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
namespace base {
template <typename T> struct DefaultSingletonTraits;

View file

@ -10,7 +10,6 @@
#include "atom/common/crash_reporter/crash_reporter.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_piece.h"
#include "vendor/crashpad/client/simple_string_dictionary.h"

View file

@ -10,7 +10,6 @@
#include "atom/common/crash_reporter/crash_reporter.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "vendor/breakpad/src/client/windows/handler/exception_handler.h"
namespace base {

View file

@ -7,8 +7,9 @@
#include "native_mate/dictionary.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/geometry/size.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
namespace mate {
@ -82,13 +83,13 @@ bool Converter<gfx::Rect>::FromV8(v8::Isolate* isolate,
}
template<>
struct Converter<gfx::Display::TouchSupport> {
struct Converter<display::Display::TouchSupport> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const gfx::Display::TouchSupport& val) {
const display::Display::TouchSupport& val) {
switch (val) {
case gfx::Display::TOUCH_SUPPORT_AVAILABLE:
case display::Display::TOUCH_SUPPORT_AVAILABLE:
return StringToV8(isolate, "available");
case gfx::Display::TOUCH_SUPPORT_UNAVAILABLE:
case display::Display::TOUCH_SUPPORT_UNAVAILABLE:
return StringToV8(isolate, "unavailable");
default:
return StringToV8(isolate, "unknown");
@ -96,8 +97,8 @@ struct Converter<gfx::Display::TouchSupport> {
}
};
v8::Local<v8::Value> Converter<gfx::Display>::ToV8(v8::Isolate* isolate,
const gfx::Display& val) {
v8::Local<v8::Value> Converter<display::Display>::ToV8(v8::Isolate* isolate,
const display::Display& val) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate);
dict.SetHidden("simple", true);
dict.Set("id", val.id());

View file

@ -7,11 +7,14 @@
#include "native_mate/converter.h"
namespace display {
class Display;
}
namespace gfx {
class Point;
class Size;
class Rect;
class Display;
}
namespace mate {
@ -44,12 +47,12 @@ struct Converter<gfx::Rect> {
};
template<>
struct Converter<gfx::Display> {
struct Converter<display::Display> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const gfx::Display& val);
const display::Display& val);
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
gfx::Display* out);
display::Display* out);
};
} // namespace mate

View file

@ -5,11 +5,11 @@
#include "atom/common/native_mate_converters/v8_value_converter.h"
#include <map>
#include <memory>
#include <string>
#include <utility>
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "native_mate/dictionary.h"
#include "vendor/node/src/node_buffer.h"

View file

@ -5,10 +5,10 @@
#ifndef ATOM_RENDERER_API_ATOM_API_WEB_FRAME_H_
#define ATOM_RENDERER_API_ATOM_API_WEB_FRAME_H_
#include <memory>
#include <string>
#include "atom/renderer/guest_view_container.h"
#include "base/memory/scoped_ptr.h"
#include "native_mate/handle.h"
#include "native_mate/wrappable.h"
#include "third_party/WebKit/public/web/WebCache.h"

View file

@ -317,11 +317,6 @@ content::BrowserPluginDelegate* AtomRendererClient::CreateBrowserPluginDelegate(
}
}
void AtomRendererClient::AddKeySystems(
std::vector<media::KeySystemInfo>* key_systems) {
AddChromeKeySystems(key_systems);
}
void AtomRendererClient::GetNavigationErrorStrings(
content::RenderFrame* render_frame,
const blink::WebURLRequest& failed_request,
@ -334,4 +329,9 @@ void AtomRendererClient::GetNavigationErrorStrings(
*error_description = base::UTF8ToUTF16(net::ErrorToShortString(error.reason));
}
void AtomRendererClient::AddSupportedKeySystems(
std::vector<std::unique_ptr<::media::KeySystemProperties>>* key_systems) {
AddChromeKeySystems(key_systems);
}
} // namespace atom

View file

@ -57,12 +57,14 @@ class AtomRendererClient : public content::ContentRendererClient {
content::RenderFrame* render_frame,
const std::string& mime_type,
const GURL& original_url) override;
void AddKeySystems(std::vector<media::KeySystemInfo>* key_systems) override;
void GetNavigationErrorStrings(content::RenderFrame* render_frame,
const blink::WebURLRequest& failed_request,
const blink::WebURLError& error,
std::string* error_html,
base::string16* error_description) override;
void AddSupportedKeySystems(
std::vector<std::unique_ptr<::media::KeySystemProperties>>* key_systems)
override;
std::unique_ptr<NodeBindings> node_bindings_;
std::unique_ptr<AtomBindings> atom_bindings_;

View file

@ -8,11 +8,11 @@
#include <memory>
#include "base/values.h"
#include "content/public/renderer/render_process_observer.h"
#include "content/public/renderer/render_thread_observer.h"
namespace atom {
class PreferencesManager : public content::RenderProcessObserver {
class PreferencesManager : public content::RenderThreadObserver {
public:
PreferencesManager();
~PreferencesManager() override;

View file

@ -10,10 +10,10 @@
#ifndef CHROME_BROWSER_BROWSER_PROCESS_H_
#define CHROME_BROWSER_BROWSER_PROCESS_H_
#include <memory>
#include <string>
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
namespace printing {
class PrintJobManager;

View file

@ -6,12 +6,12 @@
#define CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_
#include <map>
#include <memory>
#include <string>
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "net/cert/nss_cert_database.h"

View file

@ -5,9 +5,10 @@
#ifndef CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_WIN_H_
#define CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_WIN_H_
#include <memory>
#include <windows.h>
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/extensions/global_shortcut_listener.h"
#include "ui/gfx/win/singleton_hwnd.h"
#include "ui/gfx/win/singleton_hwnd_observer.h"

View file

@ -97,7 +97,6 @@ class NativeDesktopMediaList::Worker
typedef std::map<DesktopMediaID, uint32> ImageHashesMap;
// webrtc::DesktopCapturer::Callback interface.
webrtc::SharedMemory* CreateSharedMemory(size_t size) override;
void OnCaptureCompleted(webrtc::DesktopFrame* frame) override;
base::WeakPtr<NativeDesktopMediaList> media_list_;
@ -218,11 +217,6 @@ void NativeDesktopMediaList::Worker::Refresh(
base::Bind(&NativeDesktopMediaList::OnRefreshFinished, media_list_));
}
webrtc::SharedMemory* NativeDesktopMediaList::Worker::CreateSharedMemory(
size_t size) {
return NULL;
}
void NativeDesktopMediaList::Worker::OnCaptureCompleted(
webrtc::DesktopFrame* frame) {
current_frame_.reset(frame);

View file

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

View file

@ -5,9 +5,10 @@
#ifndef CHROME_BROWSER_PRINTING_PDF_TO_EMF_CONVERTER_H_
#define CHROME_BROWSER_PRINTING_PDF_TO_EMF_CONVERTER_H_
#include <memory>
#include "base/callback.h"
#include "base/memory/ref_counted_memory.h"
#include "base/memory/scoped_ptr.h"
namespace base {
class FilePath;

View file

@ -5,7 +5,8 @@
#ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_H_
#define CHROME_BROWSER_PRINTING_PRINT_JOB_H_
#include "base/memory/scoped_ptr.h"
#include <memory>
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
#include "chrome/browser/printing/print_job_worker_owner.h"

View file

@ -5,12 +5,12 @@
#ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_
#define CHROME_BROWSER_PRINTING_PRINT_JOB_MANAGER_H_
#include <memory>
#include <set>
#include <vector>
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
#include "base/threading/non_thread_safe.h"
#include "content/public/browser/notification_observer.h"

View file

@ -5,8 +5,9 @@
#ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_
#define CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_
#include <memory>
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread.h"
#include "content/public/browser/browser_thread.h"

View file

@ -4,8 +4,9 @@
#include "chrome/browser/printing/print_view_manager_base.h"
#include <memory>
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
#include "components/prefs/pref_service.h"
#include "base/strings/utf_string_conversions.h"
#include "base/timer/timer.h"

View file

@ -5,9 +5,10 @@
#ifndef CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_
#define CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_
#include <memory>
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/printing/print_job_worker_owner.h"
#include "printing/print_job_constants.h"

View file

@ -74,8 +74,8 @@
#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/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "content/public/browser/browser_thread.h"

View file

@ -5,12 +5,12 @@
#ifndef CHROME_BROWSER_SPEECH_TTS_CONTROLLER_H_
#define CHROME_BROWSER_SPEECH_TTS_CONTROLLER_H_
#include <memory>
#include <queue>
#include <set>
#include <string>
#include <vector>
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/memory/weak_ptr.h"
#include "url/gurl.h"
@ -340,4 +340,4 @@ class TtsController {
virtual ~TtsController() {}
};
#endif // CHROME_BROWSER_SPEECH_TTS_CONTROLLER_H_
#endif // CHROME_BROWSER_SPEECH_TTS_CONTROLLER_H_

View file

@ -5,12 +5,12 @@
#ifndef CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_
#define CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_
#include <memory>
#include <queue>
#include <set>
#include <string>
#include <vector>
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/speech/tts_controller.h"

View file

@ -5,10 +5,10 @@
#include <math.h>
#include <map>
#include <memory>
#include "base/command_line.h"
#include "base/debug/leak_annotations.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/synchronization/lock.h"
#include "chrome/browser/speech/tts_platform.h"

View file

@ -4,10 +4,11 @@
#include "chrome/common/chrome_paths_internal.h"
#include <memory>
#include "base/base_paths.h"
#include "base/environment.h"
#include "base/files/file_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/nix/xdg_util.h"
#include "base/path_service.h"
#include "chrome/common/chrome_paths.h"

View file

@ -4,6 +4,8 @@
#include "chrome/renderer/media/chrome_key_systems.h"
#include <stddef.h>
#include <string>
#include <vector>
@ -12,13 +14,10 @@
#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/common/widevine_cdm_messages.h"
#include "components/cdm/renderer/widevine_key_systems.h"
#include "components/cdm/renderer/widevine_key_system_properties.h"
#include "content/public/renderer/render_thread.h"
#include "media/base/eme_constants.h"
#if defined(OS_ANDROID)
#include "components/cdm/renderer/android_key_systems.h"
#endif
#include "media/base/key_system_properties.h"
// #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
#include "third_party/widevine/cdm/stub/widevine_cdm_version.h"
@ -30,10 +29,13 @@
#include "base/version.h"
#endif
using media::KeySystemInfo;
using media::KeySystemProperties;
using media::SupportedCodecs;
#if defined(ENABLE_PEPPER_CDMS)
static const char kExternalClearKeyPepperType[] =
"application/x-ppapi-clearkey-cdm";
static bool IsPepperCdmAvailable(
const std::string& pepper_type,
std::vector<base::string16>* additional_param_names,
@ -49,6 +51,120 @@ static bool IsPepperCdmAvailable(
return is_available;
}
// KeySystemProperties implementation for external Clear Key systems.
class ExternalClearKeyProperties : public KeySystemProperties {
public:
explicit ExternalClearKeyProperties(const std::string& key_system_name)
: key_system_name_(key_system_name) {}
std::string GetKeySystemName() const override { return key_system_name_; }
bool IsSupportedInitDataType(
media::EmeInitDataType init_data_type) const override {
switch (init_data_type) {
case media::EmeInitDataType::WEBM:
case media::EmeInitDataType::KEYIDS:
return true;
case media::EmeInitDataType::CENC:
#if defined(USE_PROPRIETARY_CODECS)
return true;
#else
return false;
#endif // defined(USE_PROPRIETARY_CODECS)
case media::EmeInitDataType::UNKNOWN:
return false;
}
NOTREACHED();
return false;
}
SupportedCodecs GetSupportedCodecs() const override {
#if defined(USE_PROPRIETARY_CODECS)
return media::EME_CODEC_MP4_ALL | media::EME_CODEC_WEBM_ALL;
#else
return media::EME_CODEC_WEBM_ALL;
#endif
}
media::EmeConfigRule GetRobustnessConfigRule(
media::EmeMediaType media_type,
const std::string& requested_robustness) const override {
return requested_robustness.empty() ? media::EmeConfigRule::SUPPORTED
: media::EmeConfigRule::NOT_SUPPORTED;
}
// Persistent license sessions are faked.
media::EmeSessionTypeSupport GetPersistentLicenseSessionSupport()
const override {
return media::EmeSessionTypeSupport::SUPPORTED;
}
media::EmeSessionTypeSupport GetPersistentReleaseMessageSessionSupport()
const override {
return media::EmeSessionTypeSupport::NOT_SUPPORTED;
}
media::EmeFeatureSupport GetPersistentStateSupport() const override {
return media::EmeFeatureSupport::REQUESTABLE;
}
media::EmeFeatureSupport GetDistinctiveIdentifierSupport() const override {
return media::EmeFeatureSupport::NOT_SUPPORTED;
}
std::string GetPepperType() const override {
return kExternalClearKeyPepperType;
}
private:
const std::string key_system_name_;
};
// External Clear Key (used for testing).
static void AddExternalClearKey(
std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) {
static const char kExternalClearKeyKeySystem[] =
"org.chromium.externalclearkey";
static const char kExternalClearKeyDecryptOnlyKeySystem[] =
"org.chromium.externalclearkey.decryptonly";
static const char kExternalClearKeyFileIOTestKeySystem[] =
"org.chromium.externalclearkey.fileiotest";
static const char kExternalClearKeyInitializeFailKeySystem[] =
"org.chromium.externalclearkey.initializefail";
static const char kExternalClearKeyCrashKeySystem[] =
"org.chromium.externalclearkey.crash";
std::vector<base::string16> additional_param_names;
std::vector<base::string16> additional_param_values;
if (!IsPepperCdmAvailable(kExternalClearKeyPepperType,
&additional_param_names,
&additional_param_values)) {
return;
}
concrete_key_systems->emplace_back(
new ExternalClearKeyProperties(kExternalClearKeyKeySystem));
// Add support of decrypt-only mode in ClearKeyCdm.
concrete_key_systems->emplace_back(
new ExternalClearKeyProperties(kExternalClearKeyDecryptOnlyKeySystem));
// A key system that triggers FileIO test in ClearKeyCdm.
concrete_key_systems->emplace_back(
new ExternalClearKeyProperties(kExternalClearKeyFileIOTestKeySystem));
// A key system that Chrome thinks is supported by ClearKeyCdm, but actually
// will be refused by ClearKeyCdm. This is to test the CDM initialization
// failure case.
concrete_key_systems->emplace_back(
new ExternalClearKeyProperties(kExternalClearKeyInitializeFailKeySystem));
// A key system that triggers a crash in ClearKeyCdm.
concrete_key_systems->emplace_back(
new ExternalClearKeyProperties(kExternalClearKeyCrashKeySystem));
}
#if defined(WIDEVINE_CDM_AVAILABLE)
// This function finds "codecs" and parses the value into the vector |codecs|.
// Converts the codec strings to UTF-8 since we only expect ASCII strings and
@ -79,11 +195,11 @@ void GetSupportedCodecsForPepperCdm(
}
static void AddPepperBasedWidevine(
std::vector<KeySystemInfo>* concrete_key_systems) {
std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) {
#if defined(WIDEVINE_CDM_MIN_GLIBC_VERSION)
Version glibc_version(gnu_get_libc_version());
DCHECK(glibc_version.IsValid());
if (glibc_version.IsOlderThan(WIDEVINE_CDM_MIN_GLIBC_VERSION))
if (glibc_version < base::Version(WIDEVINE_CDM_MIN_GLIBC_VERSION))
return;
#endif // defined(WIDEVINE_CDM_MIN_GLIBC_VERSION)
@ -120,10 +236,12 @@ static void AddPepperBasedWidevine(
#if defined(USE_PROPRIETARY_CODECS)
if (codecs[i] == kCdmSupportedCodecAvc1)
supported_codecs |= media::EME_CODEC_MP4_AVC1;
if (codecs[i] == kCdmSupportedCodecVp9)
supported_codecs |= media::EME_CODEC_MP4_VP9;
#endif // defined(USE_PROPRIETARY_CODECS)
}
cdm::AddWidevineWithCodecs(
concrete_key_systems->emplace_back(new cdm::WidevineKeySystemProperties(
supported_codecs,
#if defined(OS_CHROMEOS)
media::EmeRobustness::HW_SECURE_ALL, // Maximum audio robustness.
@ -131,27 +249,29 @@ static void AddPepperBasedWidevine(
media::EmeSessionTypeSupport::
SUPPORTED_WITH_IDENTIFIER, // Persistent-license.
media::EmeSessionTypeSupport::
NOT_SUPPORTED, // Persistent-release-message.
media::EmeFeatureSupport::REQUESTABLE, // Persistent state.
media::EmeFeatureSupport::REQUESTABLE, // Distinctive identifier.
NOT_SUPPORTED, // Persistent-release-message.
media::EmeFeatureSupport::REQUESTABLE, // Persistent state.
media::EmeFeatureSupport::REQUESTABLE)); // Distinctive identifier.
#else // (Desktop)
media::EmeRobustness::SW_SECURE_CRYPTO, // Maximum audio robustness.
media::EmeRobustness::SW_SECURE_DECODE, // Maximum video robustness.
media::EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-license.
media::EmeSessionTypeSupport::
NOT_SUPPORTED, // persistent-release-message.
media::EmeFeatureSupport::REQUESTABLE, // Persistent state.
media::EmeFeatureSupport::NOT_SUPPORTED, // Distinctive identifier.
NOT_SUPPORTED, // persistent-release-message.
media::EmeFeatureSupport::REQUESTABLE, // Persistent state.
media::EmeFeatureSupport::NOT_SUPPORTED)); // Distinctive identifier.
#endif // defined(OS_CHROMEOS)
concrete_key_systems);
}
#endif // defined(WIDEVINE_CDM_AVAILABLE)
#endif // defined(ENABLE_PEPPER_CDMS)
void AddChromeKeySystems(std::vector<KeySystemInfo>* key_systems_info) {
void AddChromeKeySystems(
std::vector<std::unique_ptr<KeySystemProperties>>* key_systems_properties) {
#if defined(ENABLE_PEPPER_CDMS)
AddExternalClearKey(key_systems_properties);
#if defined(WIDEVINE_CDM_AVAILABLE)
AddPepperBasedWidevine(key_systems_info);
AddPepperBasedWidevine(key_systems_properties);
#endif // defined(WIDEVINE_CDM_AVAILABLE)
#endif // defined(ENABLE_PEPPER_CDMS)
}

View file

@ -5,10 +5,16 @@
#ifndef CHROME_RENDERER_MEDIA_CHROME_KEY_SYSTEMS_H_
#define CHROME_RENDERER_MEDIA_CHROME_KEY_SYSTEMS_H_
#include <memory>
#include <vector>
#include "media/base/key_system_info.h"
namespace media {
class KeySystemProperties;
}
void AddChromeKeySystems(std::vector<media::KeySystemInfo>* key_systems_info);
// Register the key systems supported by populating |key_systems_properties|.
void AddChromeKeySystems(
std::vector<std::unique_ptr<media::KeySystemProperties>>*
key_systems_properties);
#endif // CHROME_RENDERER_MEDIA_CHROME_KEY_SYSTEMS_H_

View file

@ -4,7 +4,8 @@
#include "chrome/renderer/pepper/pepper_shared_memory_message_filter.h"
#include "base/memory/scoped_ptr.h"
#include <memory>
#include "base/memory/shared_memory.h"
#include "base/process/process_handle.h"
#include "content/public/common/content_client.h"

View file

@ -5,11 +5,11 @@
#ifndef CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_
#define CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_
#include <memory>
#include <vector>
#include "base/callback.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/shared_memory.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"

View file

@ -4,8 +4,9 @@
#include "chrome/renderer/printing/print_web_view_helper.h"
#include <memory>
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/common/print_messages.h"
#include "content/public/renderer/render_thread.h"
#include "printing/metafile_skia_wrapper.h"

View file

@ -4,8 +4,9 @@
#include "chrome/renderer/printing/print_web_view_helper.h"
#include <memory>
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/process/process_handle.h"
#include "chrome/common/print_messages.h"
#include "content/public/renderer/render_thread.h"

View file

@ -9,10 +9,10 @@
#ifndef CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_WORDITERATOR_H_
#define CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_WORDITERATOR_H_
#include <memory>
#include <string>
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "third_party/icu/source/common/unicode/uscript.h"

View file

@ -8,7 +8,7 @@
#include <vector>
#include "base/containers/hash_tables.h"
#include "content/public/renderer/render_process_observer.h"
#include "content/public/renderer/render_thread_observer.h"
#include "third_party/WebKit/public/platform/WebSpeechSynthesizer.h"
#include "third_party/WebKit/public/platform/WebSpeechSynthesizerClient.h"
@ -27,7 +27,7 @@ struct TtsVoice;
// the utterance id (which is globally unique) matches.
class TtsDispatcher
: public blink::WebSpeechSynthesizer,
public content::RenderProcessObserver {
public content::RenderThreadObserver {
public:
explicit TtsDispatcher(blink::WebSpeechSynthesizerClient* client);

View file

@ -4,6 +4,8 @@
#include "net/test/embedded_test_server/stream_listen_socket.h"
#include <memory>
#if defined(OS_WIN)
// winsock2.h must be included first in order to ensure it is included before
// windows.h.
@ -20,7 +22,6 @@
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/posix/eintr_wrapper.h"
#include "base/sys_byteorder.h"
#include "base/threading/platform_thread.h"

View file

@ -16,6 +16,8 @@
#ifndef NET_TEST_EMBEDDED_TEST_SERVER_STREAM_LISTEN_SOCKET_H_
#define NET_TEST_EMBEDDED_TEST_SERVER_STREAM_LISTEN_SOCKET_H_
#include <memory>
#include "build/build_config.h"
#if defined(OS_WIN)
@ -30,7 +32,6 @@
#include "base/macros.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "net/base/net_export.h"
#include "net/socket/socket_descriptor.h"

2
vendor/native_mate vendored

@ -1 +1 @@
Subproject commit a1efa285204cb2fbbed450c317fb535a38ea8480
Subproject commit 8a31e2d9c07fef117f2a5ad85dc67acb382b4d64