commit
99ec841a8e
86 changed files with 350 additions and 350 deletions
|
@ -19,7 +19,6 @@
|
|||
#include "base/win/windows_version.h"
|
||||
#include "content/public/app/sandbox_helper_win.h"
|
||||
#include "sandbox/win/src/sandbox_types.h"
|
||||
#include "ui/gfx/win/dpi.h"
|
||||
#elif defined(OS_LINUX) // defined(OS_WIN)
|
||||
#include "atom/app/atom_main_delegate.h" // NOLINT
|
||||
#include "content/public/app/content_main.h"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "atom/browser/node_debugger.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"
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "atom/browser/native_window_views.h"
|
||||
#include "atom/browser/unresponsive_suppressor.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 {
|
||||
|
@ -31,7 +31,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);
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -40,8 +40,7 @@ void ClearJobFactoryInIO(
|
|||
} // namespace
|
||||
|
||||
Protocol::Protocol(v8::Isolate* isolate, AtomBrowserContext* browser_context)
|
||||
: request_context_getter_(static_cast<brightray::URLRequestContextGetter*>(
|
||||
browser_context->GetRequestContext())),
|
||||
: request_context_getter_(browser_context->GetRequestContext()),
|
||||
weak_factory_(this) {
|
||||
Init(isolate);
|
||||
}
|
||||
|
|
|
@ -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")));
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
|
|
@ -28,7 +28,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"
|
||||
|
@ -179,7 +179,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,
|
||||
|
@ -282,7 +282,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();
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
#include "net/url_request/url_request_context.h"
|
||||
#include "third_party/WebKit/public/web/WebInputEvent.h"
|
||||
#include "third_party/WebKit/public/web/WebFindOptions.h"
|
||||
#include "ui/gfx/screen.h"
|
||||
#include "ui/display/screen.h"
|
||||
|
||||
#include "atom/common/node_includes.h"
|
||||
|
||||
|
@ -1274,7 +1274,7 @@ void WebContents::CapturePage(mate::Arguments* args) {
|
|||
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);
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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*
|
||||
|
|
|
@ -117,29 +117,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);
|
||||
|
@ -178,7 +178,7 @@ content::PermissionManager* AtomBrowserContext::GetPermissionManager() {
|
|||
}
|
||||
|
||||
std::unique_ptr<net::CertVerifier> AtomBrowserContext::CreateCertVerifier() {
|
||||
return std::unique_ptr<net::CertVerifier>(new AtomCertVerifier);
|
||||
return base::WrapUnique(new AtomCertVerifier);
|
||||
}
|
||||
|
||||
net::SSLConfigService* AtomBrowserContext::CreateSSLConfigService() {
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -356,7 +356,7 @@ void NativeWindow::RequestToClosePage() {
|
|||
ScheduleUnresponsiveEvent(5000);
|
||||
|
||||
if (web_contents()->NeedToFireBeforeUnload())
|
||||
web_contents()->DispatchBeforeUnload(false);
|
||||
web_contents()->DispatchBeforeUnload();
|
||||
else
|
||||
web_contents()->Close();
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#define ATOM_BROWSER_NATIVE_WINDOW_H_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -13,7 +14,6 @@
|
|||
#include "atom/browser/ui/accelerator_util.h"
|
||||
#include "atom/browser/ui/atom_menu_model.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"
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "ui/aura/window_tree_host.h"
|
||||
#include "ui/base/hit_test.h"
|
||||
#include "ui/gfx/image/image.h"
|
||||
#include "ui/gfx/screen.h"
|
||||
#include "ui/views/background.h"
|
||||
#include "ui/views/controls/webview/unhandled_keyboard_event_handler.h"
|
||||
#include "ui/views/controls/webview/webview.h"
|
||||
|
@ -52,7 +51,9 @@
|
|||
#include "atom/browser/ui/win/atom_desktop_window_tree_host_win.h"
|
||||
#include "skia/ext/skia_utils_win.h"
|
||||
#include "ui/base/win/shell.h"
|
||||
#include "ui/gfx/win/dpi.h"
|
||||
#include "ui/display/win/screen_win.h"
|
||||
#include "ui/display/display.h"
|
||||
#include "ui/display/screen.h"
|
||||
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
|
||||
#endif
|
||||
|
||||
|
@ -348,6 +349,10 @@ void NativeWindowViews::CloseImmediately() {
|
|||
}
|
||||
|
||||
void NativeWindowViews::Focus(bool focus) {
|
||||
// For hidden window focus() should do nothing.
|
||||
if (!IsVisible())
|
||||
return;
|
||||
|
||||
if (focus) {
|
||||
#if defined(OS_WIN)
|
||||
window_->Activate();
|
||||
|
@ -424,7 +429,7 @@ void NativeWindowViews::Maximize() {
|
|||
if (!thick_frame_) {
|
||||
restore_bounds_ = GetBounds();
|
||||
auto display =
|
||||
gfx::Screen::GetScreen()->GetDisplayNearestPoint(GetPosition());
|
||||
display::Screen::GetScreen()->GetDisplayNearestPoint(GetPosition());
|
||||
SetBounds(display.work_area(), false);
|
||||
return;
|
||||
}
|
||||
|
@ -487,7 +492,7 @@ void NativeWindowViews::SetFullScreen(bool fullscreen) {
|
|||
if (fullscreen) {
|
||||
restore_bounds_ = GetBounds();
|
||||
auto display =
|
||||
gfx::Screen::GetScreen()->GetDisplayNearestPoint(GetPosition());
|
||||
display::Screen::GetScreen()->GetDisplayNearestPoint(GetPosition());
|
||||
SetBounds(display.bounds(), false);
|
||||
} else {
|
||||
SetBounds(restore_bounds_, false);
|
||||
|
@ -1147,9 +1152,11 @@ gfx::Size NativeWindowViews::ContentSizeToWindowSize(const gfx::Size& size) {
|
|||
|
||||
gfx::Size window_size(size);
|
||||
#if defined(OS_WIN)
|
||||
gfx::Rect dpi_bounds =
|
||||
gfx::Rect(gfx::Point(), gfx::win::DIPToScreenSize(size));
|
||||
gfx::Rect window_bounds = gfx::win::ScreenToDIPRect(
|
||||
HWND hwnd = GetAcceleratedWidget();
|
||||
gfx::Rect dpi_bounds = gfx::Rect(
|
||||
gfx::Point(), display::win::ScreenWin::DIPToScreenSize(hwnd, size));
|
||||
gfx::Rect window_bounds = display::win::ScreenWin::ScreenToDIPRect(
|
||||
hwnd,
|
||||
window_->non_client_view()->GetWindowBoundsForClientBounds(dpi_bounds));
|
||||
window_size = window_bounds.size();
|
||||
#endif
|
||||
|
@ -1165,16 +1172,16 @@ gfx::Size NativeWindowViews::WindowSizeToContentSize(const gfx::Size& size) {
|
|||
|
||||
gfx::Size content_size(size);
|
||||
#if defined(OS_WIN)
|
||||
content_size = gfx::win::DIPToScreenSize(content_size);
|
||||
HWND hwnd = GetAcceleratedWidget();
|
||||
content_size = display::win::ScreenWin::DIPToScreenSize(hwnd, content_size);
|
||||
RECT rect;
|
||||
SetRectEmpty(&rect);
|
||||
HWND hwnd = GetAcceleratedWidget();
|
||||
DWORD style = ::GetWindowLong(hwnd, GWL_STYLE);
|
||||
DWORD ex_style = ::GetWindowLong(hwnd, GWL_EXSTYLE);
|
||||
AdjustWindowRectEx(&rect, style, FALSE, ex_style);
|
||||
content_size.set_width(content_size.width() - (rect.right - rect.left));
|
||||
content_size.set_height(content_size.height() - (rect.bottom - rect.top));
|
||||
content_size = gfx::win::ScreenToDIPSize(content_size);
|
||||
content_size = display::win::ScreenWin::ScreenToDIPSize(hwnd, content_size);
|
||||
#endif
|
||||
|
||||
if (menu_bar_ && menu_bar_visible_)
|
||||
|
|
|
@ -180,7 +180,7 @@ 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() : nullptr;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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_)
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
#ifndef ATOM_BROWSER_UI_VIEWS_MENU_DELEGATE_H_
|
||||
#define ATOM_BROWSER_UI_VIEWS_MENU_DELEGATE_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "atom/browser/ui/atom_menu_model.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "ui/views/controls/menu/menu_delegate.h"
|
||||
|
||||
namespace views {
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
#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/gfx/win/dpi.h"
|
||||
#include "ui/display/screen.h"
|
||||
#include "ui/display/win/screen_win.h"
|
||||
#include "ui/views/controls/menu/menu_runner.h"
|
||||
|
||||
namespace atom {
|
||||
|
@ -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_,
|
||||
|
@ -167,7 +167,7 @@ gfx::Rect NotifyIcon::GetBounds() {
|
|||
|
||||
RECT rect = { 0 };
|
||||
Shell_NotifyIconGetRect(&icon_id, &rect);
|
||||
return gfx::win::ScreenToDIPRect(gfx::Rect(rect));
|
||||
return display::win::ScreenWin::ScreenToDIPRect(window_, gfx::Rect(rect));
|
||||
}
|
||||
|
||||
void NotifyIcon::InitIconData(NOTIFYICONDATA* icon_data) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -79,12 +79,6 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches(
|
|||
base::DictionaryValue& web_preferences = self->web_preferences_;
|
||||
|
||||
bool b;
|
||||
#if defined(OS_WIN)
|
||||
// Check if DirectWrite is disabled.
|
||||
if (web_preferences.GetBoolean(options::kDirectWrite, &b) && !b)
|
||||
command_line->AppendSwitch(::switches::kDisableDirectWrite);
|
||||
#endif
|
||||
|
||||
// Check if plugins are enabled.
|
||||
if (web_preferences.GetBoolean("plugins", &b) && b)
|
||||
command_line->AppendSwitch(switches::kEnablePlugins);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include "atom/common/api/locker.h"
|
||||
#include "atom/common/node_includes.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
|
||||
namespace mate {
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#ifndef ATOM_COMMON_CHROME_VERSION_H_
|
||||
#define ATOM_COMMON_CHROME_VERSION_H_
|
||||
|
||||
#define CHROME_VERSION_STRING "51.0.2704.106"
|
||||
#define CHROME_VERSION_STRING "52.0.2743.82"
|
||||
#define CHROME_VERSION "v" CHROME_VERSION_STRING
|
||||
|
||||
#endif // ATOM_COMMON_CHROME_VERSION_H_
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
#ifndef ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_WIN_H_
|
||||
#define ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_WIN_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#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 {
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
@ -35,7 +36,7 @@ bool Converter<gfx::Point>::FromV8(v8::Isolate* isolate,
|
|||
}
|
||||
|
||||
v8::Local<v8::Value> Converter<gfx::Size>::ToV8(v8::Isolate* isolate,
|
||||
const gfx::Size& val) {
|
||||
const gfx::Size& val) {
|
||||
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate);
|
||||
dict.SetHidden("simple", true);
|
||||
dict.Set("width", val.width());
|
||||
|
@ -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());
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -96,9 +96,6 @@ const char kNodeIntegration[] = "nodeIntegration";
|
|||
// Instancd ID of guest WebContents.
|
||||
const char kGuestInstanceID[] = "guestInstanceId";
|
||||
|
||||
// Enable DirectWrite on Windows.
|
||||
const char kDirectWrite[] = "directWrite";
|
||||
|
||||
// Web runtime features.
|
||||
const char kExperimentalFeatures[] = "experimentalFeatures";
|
||||
const char kExperimentalCanvasFeatures[] = "experimentalCanvasFeatures";
|
||||
|
|
|
@ -48,7 +48,6 @@ extern const char kFocusable[];
|
|||
extern const char kWebPreferences[];
|
||||
|
||||
// WebPreferences.
|
||||
extern const char kDirectWrite[];
|
||||
extern const char kZoomFactor[];
|
||||
extern const char kPreloadScript[];
|
||||
extern const char kPreloadURL[];
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -315,8 +315,8 @@ content::BrowserPluginDelegate* AtomRendererClient::CreateBrowserPluginDelegate(
|
|||
}
|
||||
}
|
||||
|
||||
void AtomRendererClient::AddKeySystems(
|
||||
std::vector<media::KeySystemInfo>* key_systems) {
|
||||
void AtomRendererClient::AddSupportedKeySystems(
|
||||
std::vector<std::unique_ptr<::media::KeySystemProperties>>* key_systems) {
|
||||
AddChromeKeySystems(key_systems);
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,9 @@ 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 AddSupportedKeySystems(
|
||||
std::vector<std::unique_ptr<::media::KeySystemProperties>>* key_systems)
|
||||
override;
|
||||
|
||||
std::unique_ptr<NodeBindings> node_bindings_;
|
||||
std::unique_ptr<AtomBindings> atom_bindings_;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,158 +0,0 @@
|
|||
|
||||
/*
|
||||
* Copyright 2006 The Android Open Source Project
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license that can be
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef SkUserConfig_DEFINED
|
||||
#define SkUserConfig_DEFINED
|
||||
|
||||
/* SkTypes.h, the root of the public header files, does the following trick:
|
||||
|
||||
#include "SkPreConfig.h"
|
||||
#include "SkUserConfig.h"
|
||||
#include "SkPostConfig.h"
|
||||
|
||||
SkPreConfig.h runs first, and it is responsible for initializing certain
|
||||
skia defines.
|
||||
|
||||
SkPostConfig.h runs last, and its job is to just check that the final
|
||||
defines are consistent (i.e. that we don't have mutually conflicting
|
||||
defines).
|
||||
|
||||
SkUserConfig.h (this file) runs in the middle. It gets to change or augment
|
||||
the list of flags initially set in preconfig, and then postconfig checks
|
||||
that everything still makes sense.
|
||||
|
||||
Below are optional defines that add, subtract, or change default behavior
|
||||
in Skia. Your port can locally edit this file to enable/disable flags as
|
||||
you choose, or these can be delared on your command line (i.e. -Dfoo).
|
||||
|
||||
By default, this include file will always default to having all of the flags
|
||||
commented out, so including it will have no effect.
|
||||
*/
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* Skia has lots of debug-only code. Often this is just null checks or other
|
||||
parameter checking, but sometimes it can be quite intrusive (e.g. check that
|
||||
each 32bit pixel is in premultiplied form). This code can be very useful
|
||||
during development, but will slow things down in a shipping product.
|
||||
|
||||
By default, these mutually exclusive flags are defined in SkPreConfig.h,
|
||||
based on the presence or absence of NDEBUG, but that decision can be changed
|
||||
here.
|
||||
*/
|
||||
//#define SK_DEBUG
|
||||
//#define SK_RELEASE
|
||||
|
||||
/* Skia has certain debug-only code that is extremely intensive even for debug
|
||||
builds. This code is useful for diagnosing specific issues, but is not
|
||||
generally applicable, therefore it must be explicitly enabled to avoid
|
||||
the performance impact. By default these flags are undefined, but can be
|
||||
enabled by uncommenting them below.
|
||||
*/
|
||||
//#define SK_DEBUG_GLYPH_CACHE
|
||||
//#define SK_DEBUG_PATH
|
||||
|
||||
/* If, in debugging mode, Skia needs to stop (presumably to invoke a debugger)
|
||||
it will call SK_CRASH(). If this is not defined it, it is defined in
|
||||
SkPostConfig.h to write to an illegal address
|
||||
*/
|
||||
//#define SK_CRASH() *(int *)(uintptr_t)0 = 0
|
||||
|
||||
|
||||
/* preconfig will have attempted to determine the endianness of the system,
|
||||
but you can change these mutually exclusive flags here.
|
||||
*/
|
||||
//#define SK_CPU_BENDIAN
|
||||
//#define SK_CPU_LENDIAN
|
||||
|
||||
/* Most compilers use the same bit endianness for bit flags in a byte as the
|
||||
system byte endianness, and this is the default. If for some reason this
|
||||
needs to be overridden, specify which of the mutually exclusive flags to
|
||||
use. For example, some atom processors in certain configurations have big
|
||||
endian byte order but little endian bit orders.
|
||||
*/
|
||||
//#define SK_UINT8_BITFIELD_BENDIAN
|
||||
//#define SK_UINT8_BITFIELD_LENDIAN
|
||||
|
||||
|
||||
/* To write debug messages to a console, skia will call SkDebugf(...) following
|
||||
printf conventions (e.g. const char* format, ...). If you want to redirect
|
||||
this to something other than printf, define yours here
|
||||
*/
|
||||
// Log the file and line number for assertions.
|
||||
#define SkDebugf(...)
|
||||
|
||||
/*
|
||||
* To specify a different default font cache limit, define this. If this is
|
||||
* undefined, skia will use a built-in value.
|
||||
*/
|
||||
//#define SK_DEFAULT_FONT_CACHE_LIMIT (1024 * 1024)
|
||||
|
||||
/*
|
||||
* To specify the default size of the image cache, undefine this and set it to
|
||||
* the desired value (in bytes). SkGraphics.h as a runtime API to set this
|
||||
* value as well. If this is undefined, a built-in value will be used.
|
||||
*/
|
||||
//#define SK_DEFAULT_IMAGE_CACHE_LIMIT (1024 * 1024)
|
||||
|
||||
/* Define this to allow PDF scalars above 32k. The PDF/A spec doesn't allow
|
||||
them, but modern PDF interpreters should handle them just fine.
|
||||
*/
|
||||
//#define SK_ALLOW_LARGE_PDF_SCALARS
|
||||
|
||||
/* Define this to provide font subsetter in PDF generation.
|
||||
*/
|
||||
//#define SK_SFNTLY_SUBSETTER "sfntly/subsetter/font_subsetter.h"
|
||||
|
||||
/* Define this to set the upper limit for text to support LCD. Values that
|
||||
are very large increase the cost in the font cache and draw slower, without
|
||||
improving readability. If this is undefined, Skia will use its default
|
||||
value (e.g. 48)
|
||||
*/
|
||||
//#define SK_MAX_SIZE_FOR_LCDTEXT 48
|
||||
|
||||
/* If SK_DEBUG is defined, then you can optionally define SK_SUPPORT_UNITTEST
|
||||
which will run additional self-tests at startup. These can take a long time,
|
||||
so this flag is optional.
|
||||
*/
|
||||
#ifdef SK_DEBUG
|
||||
//#define SK_SUPPORT_UNITTEST
|
||||
#endif
|
||||
|
||||
/* Change the ordering to work in X windows.
|
||||
*/
|
||||
#ifdef SK_SAMPLES_FOR_X
|
||||
#define SK_R32_SHIFT 16
|
||||
#define SK_G32_SHIFT 8
|
||||
#define SK_B32_SHIFT 0
|
||||
#define SK_A32_SHIFT 24
|
||||
#endif
|
||||
|
||||
|
||||
/* Determines whether to build code that supports the GPU backend. Some classes
|
||||
that are not GPU-specific, such as SkShader subclasses, have optional code
|
||||
that is used allows them to interact with the GPU backend. If you'd like to
|
||||
omit this code set SK_SUPPORT_GPU to 0. This also allows you to omit the gpu
|
||||
directories from your include search path when you're not building the GPU
|
||||
backend. Defaults to 1 (build the GPU code).
|
||||
*/
|
||||
//#define SK_SUPPORT_GPU 1
|
||||
|
||||
|
||||
/* The PDF generation code uses Path Ops to handle complex clipping paths,
|
||||
* but at this time, Path Ops is not release ready yet. So, the code is
|
||||
* hidden behind this #define guard. If you are feeling adventurous and
|
||||
* want the latest and greatest PDF generation code, uncomment the #define.
|
||||
* When Path Ops is release ready, the define guards and this user config
|
||||
* define should be removed entirely.
|
||||
*/
|
||||
//#define SK_PDF_USE_PATHOPS_CLIPPING
|
||||
|
||||
#endif
|
||||
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -104,7 +104,7 @@ class PdfToEmfUtilityProcessHostClient
|
|||
|
||||
// UtilityProcessHostClient implementation.
|
||||
virtual void OnProcessCrashed(int exit_code) override;
|
||||
virtual void OnProcessLaunchFailed() override;
|
||||
virtual void OnProcessLaunchFailed(int exit_code) override;
|
||||
virtual bool OnMessageReceived(const IPC::Message& message) override;
|
||||
|
||||
private:
|
||||
|
@ -423,7 +423,7 @@ void PdfToEmfUtilityProcessHostClient::OnProcessCrashed(int exit_code) {
|
|||
OnFailed();
|
||||
}
|
||||
|
||||
void PdfToEmfUtilityProcessHostClient::OnProcessLaunchFailed() {
|
||||
void PdfToEmfUtilityProcessHostClient::OnProcessLaunchFailed(int exit_code) {
|
||||
OnFailed();
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -163,6 +163,7 @@
|
|||
'_uspoof_open_56',
|
||||
'_usearch_setPattern_56',
|
||||
'?createInstance@Transliterator@icu_56@@SAPAV12@ABVUnicodeString@2@W4UTransDirection@@AAW4UErrorCode@@@Z',
|
||||
'??0MeasureFormat@icu_56@@QAE@ABVLocale@1@W4UMeasureFormatWidth@@AAW4UErrorCode@@@Z',
|
||||
],
|
||||
}, {
|
||||
'reference_symbols': [
|
||||
|
@ -176,6 +177,7 @@
|
|||
'uspoof_open_56',
|
||||
'usearch_setPattern_56',
|
||||
'?createInstance@Transliterator@icu_56@@SAPEAV12@AEBVUnicodeString@2@W4UTransDirection@@AEAW4UErrorCode@@@Z',
|
||||
'??0MeasureFormat@icu_56@@QEAA@AEBVLocale@1@W4UMeasureFormatWidth@@AEAW4UErrorCode@@@Z',
|
||||
],
|
||||
}],
|
||||
],
|
||||
|
|
|
@ -253,8 +253,6 @@ The `webPreferences` option is an object that can have the following properties:
|
|||
Default is `false`.
|
||||
* `experimentalCanvasFeatures` Boolean - Enables Chromium's experimental
|
||||
canvas features. Default is `false`.
|
||||
* `directWrite` Boolean - Enables DirectWrite font rendering system on
|
||||
Windows. Default is `true`.
|
||||
* `scrollBounce` Boolean - Enables scroll bounce (rubber banding) effect on
|
||||
macOS. Default is `false`.
|
||||
* `blinkFeatures` String - A list of feature strings separated by `,`, like
|
||||
|
|
|
@ -8,7 +8,7 @@ import sys
|
|||
|
||||
BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \
|
||||
'https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent'
|
||||
LIBCHROMIUMCONTENT_COMMIT = '31144d583c19b70d8d9de7d4ef15f0f720779860'
|
||||
LIBCHROMIUMCONTENT_COMMIT = '0b5aa7b6ca450681c58087e14f72238aab5ab823'
|
||||
|
||||
PLATFORM = {
|
||||
'cygwin': 'win32',
|
||||
|
|
|
@ -51,6 +51,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
assert.equal(data, text)
|
||||
done()
|
||||
|
@ -69,6 +70,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function () {
|
||||
return done('request succeeded but it should not')
|
||||
},
|
||||
|
@ -92,6 +94,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
assert.equal(data, text)
|
||||
done()
|
||||
|
@ -124,6 +127,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
assert.equal(data, text)
|
||||
done()
|
||||
|
@ -145,6 +149,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function (data, status, request) {
|
||||
assert.equal(data, text)
|
||||
assert.equal(request.getResponseHeader('Access-Control-Allow-Origin'), '*')
|
||||
|
@ -170,6 +175,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
assert.equal(data, text)
|
||||
done()
|
||||
|
@ -191,6 +197,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function () {
|
||||
done('request succeeded but it should not')
|
||||
},
|
||||
|
@ -216,6 +223,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
assert.equal(data, text)
|
||||
done()
|
||||
|
@ -238,6 +246,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function (data, status, request) {
|
||||
assert.equal(data, text)
|
||||
assert.equal(request.getResponseHeader('Access-Control-Allow-Origin'), '*')
|
||||
|
@ -263,6 +272,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
assert.equal(data, text)
|
||||
done()
|
||||
|
@ -284,6 +294,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function () {
|
||||
done('request succeeded but it should not')
|
||||
},
|
||||
|
@ -312,6 +323,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
assert.equal(data, String(fileContent))
|
||||
return done()
|
||||
|
@ -333,6 +345,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function (data, status, request) {
|
||||
assert.equal(data, String(fileContent))
|
||||
assert.equal(request.getResponseHeader('Access-Control-Allow-Origin'), '*')
|
||||
|
@ -357,6 +370,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
assert.equal(data, String(fileContent))
|
||||
done()
|
||||
|
@ -379,6 +393,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
assert.equal(data, String(normalContent))
|
||||
done()
|
||||
|
@ -401,6 +416,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function () {
|
||||
done('request succeeded but it should not')
|
||||
},
|
||||
|
@ -422,6 +438,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function () {
|
||||
done('request succeeded but it should not')
|
||||
},
|
||||
|
@ -455,6 +472,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
assert.equal(data, text)
|
||||
done()
|
||||
|
@ -479,6 +497,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function () {
|
||||
done('request succeeded but it should not')
|
||||
},
|
||||
|
@ -500,6 +519,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: protocolName + '://fake-host',
|
||||
cache: false,
|
||||
success: function () {
|
||||
done('request succeeded but it should not')
|
||||
},
|
||||
|
@ -634,6 +654,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: 'http://fake-host',
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
assert.equal(data, text)
|
||||
done()
|
||||
|
@ -655,6 +676,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: 'http://fake-host',
|
||||
cache: false,
|
||||
success: function () {
|
||||
done('request succeeded but it should not')
|
||||
},
|
||||
|
@ -678,6 +700,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: 'http://fake-host',
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
assert.equal(data, text)
|
||||
done()
|
||||
|
@ -702,6 +725,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: 'http://fake-host',
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
assert.equal(typeof data, 'object')
|
||||
assert.equal(data.value, 1)
|
||||
|
@ -727,6 +751,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: 'http://fake-host',
|
||||
cache: false,
|
||||
type: 'POST',
|
||||
data: postData,
|
||||
success: function (data) {
|
||||
|
@ -752,6 +777,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: 'http://fake-host',
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
assert.equal(data, text)
|
||||
done()
|
||||
|
@ -774,6 +800,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: 'http://fake-host',
|
||||
cache: false,
|
||||
type: 'POST',
|
||||
data: postData,
|
||||
success: function (data) {
|
||||
|
@ -821,6 +848,7 @@ describe('protocol module', function () {
|
|||
}
|
||||
$.ajax({
|
||||
url: 'http://fake-host',
|
||||
cache: false,
|
||||
type: 'POST',
|
||||
data: postData,
|
||||
success: function (data) {
|
||||
|
|
2
vendor/brightray
vendored
2
vendor/brightray
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 91abdb01a1825c12522fd5fc2349a7ba9a091a48
|
||||
Subproject commit 61206fc771c936aefd2c871120b5b1dd4e1e6069
|
2
vendor/node
vendored
2
vendor/node
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 69c579f33a9b0835c5ec0bb56c0ba4d3f5397d35
|
||||
Subproject commit 17c9933b022ba9704c79caee382e9c7b4d7bcd51
|
Loading…
Add table
Reference in a new issue