Merge origin/master into enable-webview

This commit is contained in:
Kevin Sawicki 2017-05-19 10:17:34 -07:00
commit 74b7afbec7
155 changed files with 796 additions and 644 deletions

View file

@ -44,6 +44,7 @@
#include "base/process/process_handle.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/values.h"
#include "brightray/browser/inspectable_web_contents.h"
#include "brightray/browser/inspectable_web_contents_view.h"
#include "chrome/browser/printing/print_preview_message_handler.h"
@ -74,6 +75,7 @@
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/context_menu_params.h"
#include "native_mate/converter.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
#include "net/url_request/url_request_context.h"
@ -93,6 +95,7 @@ namespace {
struct PrintSettings {
bool silent;
bool print_background;
base::string16 device_name;
};
} // namespace
@ -130,10 +133,25 @@ struct Converter<PrintSettings> {
return false;
dict.Get("silent", &(out->silent));
dict.Get("printBackground", &(out->print_background));
dict.Get("deviceName", &(out->device_name));
return true;
}
};
template<>
struct Converter<printing::PrinterBasicInfo> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const printing::PrinterBasicInfo& val) {
mate::Dictionary dict(isolate, v8::Object::New(isolate));
dict.Set("name", val.printer_name);
dict.Set("description", val.printer_description);
dict.Set("status", val.printer_status);
dict.Set("isDefault", val.is_default ? true : false);
dict.Set("options", val.options);
return dict.GetHandle();
}
};
template<>
struct Converter<WindowOpenDisposition> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
@ -1291,7 +1309,7 @@ bool WebContents::IsAudioMuted() {
}
void WebContents::Print(mate::Arguments* args) {
PrintSettings settings = { false, false };
PrintSettings settings = { false, false, base::string16() };
if (args->Length() == 1 && !args->GetNext(&settings)) {
args->ThrowError();
return;
@ -1300,7 +1318,15 @@ void WebContents::Print(mate::Arguments* args) {
printing::PrintViewManagerBasic::FromWebContents(web_contents())->
PrintNow(web_contents()->GetMainFrame(),
settings.silent,
settings.print_background);
settings.print_background,
settings.device_name);
}
std::vector<printing::PrinterBasicInfo> WebContents::GetPrinterList() {
std::vector<printing::PrinterBasicInfo> printers;
auto print_backend = printing::PrintBackend::CreateInstance(nullptr);
print_backend->EnumeratePrinters(&printers);
return printers;
}
void WebContents::PrintToPDF(const base::DictionaryValue& setting,
@ -1844,6 +1870,7 @@ void WebContents::BuildPrototype(v8::Isolate* isolate,
&WebContents::UnregisterServiceWorker)
.SetMethod("inspectServiceWorker", &WebContents::InspectServiceWorker)
.SetMethod("print", &WebContents::Print)
.SetMethod("getPrinters", &WebContents::GetPrinterList)
.SetMethod("_printToPDF", &WebContents::PrintToPDF)
.SetMethod("addWorkSpace", &WebContents::AddWorkSpace)
.SetMethod("removeWorkSpace", &WebContents::RemoveWorkSpace)

View file

@ -18,6 +18,7 @@
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/favicon_url.h"
#include "native_mate/handle.h"
#include "printing/backend/print_backend.h"
#include "ui/gfx/image/image.h"
namespace blink {
@ -121,6 +122,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
void SetAudioMuted(bool muted);
bool IsAudioMuted();
void Print(mate::Arguments* args);
std::vector<printing::PrinterBasicInfo> GetPrinterList();
void SetEmbedder(const WebContents* embedder);
// Print current page as PDF.

View file

@ -10,40 +10,13 @@
#include "base/message_loop/message_loop.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/public/common/content_switches.h"
#include "gin/array_buffer.h"
#include "gin/v8_initializer.h"
#if defined(OS_WIN)
#include "atom/node/osfhandle.h"
#endif
#include "atom/common/node_includes.h"
namespace atom {
void* ArrayBufferAllocator::Allocate(size_t length) {
#if defined(OS_WIN)
return node::ArrayBufferCalloc(length);
#else
return calloc(1, length);
#endif
}
void* ArrayBufferAllocator::AllocateUninitialized(size_t length) {
#if defined(OS_WIN)
return node::ArrayBufferMalloc(length);
#else
return malloc(length);
#endif
}
void ArrayBufferAllocator::Free(void* data, size_t length) {
#if defined(OS_WIN)
node::ArrayBufferFree(data, length);
#else
free(data);
#endif
}
JavascriptEnvironment::JavascriptEnvironment()
: initialized_(Initialize()),
isolate_holder_(base::ThreadTaskRunnerHandle::Get()),
@ -73,7 +46,7 @@ bool JavascriptEnvironment::Initialize() {
gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode,
gin::IsolateHolder::kStableV8Extras,
&allocator_);
gin::ArrayBufferAllocator::SharedInstance());
return true;
}

View file

@ -14,14 +14,6 @@ class Environment;
namespace atom {
// ArrayBuffer's allocator, used on Chromium's side.
class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
public:
void* Allocate(size_t length) override;
void* AllocateUninitialized(size_t length) override;
void Free(void* data, size_t length) override;
};
// Manage the V8 isolate and context automatically.
class JavascriptEnvironment {
public:
@ -39,7 +31,6 @@ class JavascriptEnvironment {
bool Initialize();
bool initialized_;
ArrayBufferAllocator allocator_;
gin::IsolateHolder isolate_holder_;
v8::Isolate* isolate_;
v8::Isolate::Scope isolate_scope_;

View file

@ -9,14 +9,18 @@
#include "atom/browser/api/atom_api_session.h"
#include "atom/browser/atom_browser_context.h"
#include "base/guid.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "brightray/browser/url_request_context_getter.h"
#include "content/browser/streams/stream_context.h"
#include "native_mate/dictionary.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_fetcher_response_writer.h"
#include "url/url_constants.h"
using content::BrowserThread;
@ -62,7 +66,8 @@ class ResponsePiper : public net::URLFetcherResponseWriter {
job_->HeadersCompleted();
first_write_ = false;
}
return job_->DataAvailable(buffer, num_bytes, callback);
job_->stream()->AddData(buffer->data(), num_bytes);
return num_bytes;
}
int Finish(int net_error, const net::CompletionCallback& callback) override {
return net::OK;
@ -77,12 +82,11 @@ class ResponsePiper : public net::URLFetcherResponseWriter {
} // namespace
URLRequestFetchJob::URLRequestFetchJob(
net::URLRequest* request, net::NetworkDelegate* network_delegate)
URLRequestFetchJob::URLRequestFetchJob(net::URLRequest* request,
net::NetworkDelegate* network_delegate)
: JsAsker<net::URLRequestJob>(request, network_delegate),
pending_buffer_size_(0),
write_num_bytes_(0) {
}
total_bytes_read_(0) {}
void URLRequestFetchJob::BeforeStartInUI(
v8::Isolate* isolate, v8::Local<v8::Value> value) {
@ -169,7 +173,22 @@ void URLRequestFetchJob::StartAsync(std::unique_ptr<base::Value> options) {
fetcher_->SetExtraRequestHeaders(
request()->extra_request_headers().ToString());
fetcher_->Start();
// Create readable stream for URLFetcher response.
content::StreamContext* stream_context =
static_cast<brightray::URLRequestContextGetter*>(request_context_getter())
->stream_context();
if (stream_context) {
GURL stream_url(std::string(url::kBlobScheme) + ":" +
formated_url.GetOrigin().spec() + base::GenerateGUID());
stream_ =
new content::Stream(stream_context->registry(), nullptr, stream_url);
stream_->SetReadObserver(this);
fetcher_->Start();
} else {
NotifyStartError(net::URLRequestStatus(net::URLRequestStatus::CANCELED,
net::ERR_ABORTED));
}
}
void URLRequestFetchJob::HeadersCompleted() {
@ -178,53 +197,55 @@ void URLRequestFetchJob::HeadersCompleted() {
NotifyHeadersComplete();
}
int URLRequestFetchJob::DataAvailable(net::IOBuffer* buffer,
int num_bytes,
const net::CompletionCallback& callback) {
// When pending_buffer_ is empty, there's no ReadRawData() operation waiting
// for IO completion, we have to save the parameters until the request is
// ready to read data.
if (!pending_buffer_.get()) {
write_buffer_ = buffer;
write_num_bytes_ = num_bytes;
write_callback_ = callback;
return net::ERR_IO_PENDING;
}
// Write data to the pending buffer and clear them after the writing.
int bytes_read = BufferCopy(buffer, num_bytes,
pending_buffer_.get(), pending_buffer_size_);
ClearPendingBuffer();
ReadRawDataComplete(bytes_read);
return bytes_read;
}
void URLRequestFetchJob::Kill() {
JsAsker<URLRequestJob>::Kill();
ClearStream();
fetcher_.reset();
}
void URLRequestFetchJob::OnDataAvailable(content::Stream* stream) {
if (!pending_buffer_.get())
return;
int result = 0;
auto state = stream_->ReadRawData(pending_buffer_.get(), pending_buffer_size_,
&result);
if (state == content::Stream::STREAM_ABORTED)
result = net::ERR_CONNECTION_RESET;
// Clear the buffers before notifying the read is complete, so that it is
// safe for the observer to read.
pending_buffer_ = nullptr;
pending_buffer_size_ = 0;
if (result > 0)
total_bytes_read_ += result;
ReadRawDataComplete(result);
}
int URLRequestFetchJob::ReadRawData(net::IOBuffer* dest, int dest_size) {
if (GetResponseCode() == 204) {
request()->set_received_response_content_length(prefilter_bytes_read());
return net::OK;
}
// When write_buffer_ is empty, there is no data valable yet, we have to save
// the dest buffer util DataAvailable.
if (!write_buffer_.get()) {
pending_buffer_ = dest;
pending_buffer_size_ = dest_size;
return net::ERR_IO_PENDING;
int bytes_read = 0;
switch (stream_->ReadRawData(dest, dest_size, &bytes_read)) {
case content::Stream::STREAM_HAS_DATA:
total_bytes_read_ += bytes_read;
return bytes_read;
case content::Stream::STREAM_COMPLETE:
return stream_->GetStatus();
case content::Stream::STREAM_EMPTY:
pending_buffer_ = dest;
pending_buffer_size_ = dest_size;
return net::ERR_IO_PENDING;
case content::Stream::STREAM_ABORTED:
// Handle this as connection reset.
return net::ERR_CONNECTION_RESET;
}
// Read from the write buffer and clear them after reading.
int bytes_read = BufferCopy(write_buffer_.get(), write_num_bytes_,
dest, dest_size);
net::CompletionCallback write_callback = write_callback_;
ClearWriteBuffer();
write_callback.Run(bytes_read);
return bytes_read;
NOTREACHED();
return net::ERR_FAILED;
}
bool URLRequestFetchJob::GetMimeType(std::string* mime_type) const {
@ -246,11 +267,18 @@ int URLRequestFetchJob::GetResponseCode() const {
return response_info_->headers->response_code();
}
void URLRequestFetchJob::OnURLFetchComplete(const net::URLFetcher* source) {
ClearPendingBuffer();
ClearWriteBuffer();
int64_t URLRequestFetchJob::GetTotalReceivedBytes() const {
int64_t total_received_bytes = 0;
if (response_info_)
total_received_bytes = response_info_->headers->raw_headers().size();
if (stream_.get())
total_received_bytes += total_bytes_read_;
return total_received_bytes;
}
if (fetcher_->GetStatus().is_success()) {
void URLRequestFetchJob::OnURLFetchComplete(const net::URLFetcher* source) {
auto status = fetcher_->GetStatus();
if (status.is_success()) {
if (!response_info_) {
// Since we notify header completion only after first write there will be
// no response object constructed for http respones with no content 204.
@ -258,28 +286,16 @@ void URLRequestFetchJob::OnURLFetchComplete(const net::URLFetcher* source) {
HeadersCompleted();
return;
}
ReadRawDataComplete(0);
stream_->Finalize(0);
} else {
NotifyStartError(fetcher_->GetStatus());
stream_->Finalize(status.error());
NotifyStartError(status);
}
}
int URLRequestFetchJob::BufferCopy(net::IOBuffer* source, int num_bytes,
net::IOBuffer* target, int target_size) {
int bytes_written = std::min(num_bytes, target_size);
memcpy(target->data(), source->data(), bytes_written);
return bytes_written;
}
void URLRequestFetchJob::ClearPendingBuffer() {
pending_buffer_ = nullptr;
pending_buffer_size_ = 0;
}
void URLRequestFetchJob::ClearWriteBuffer() {
write_buffer_ = nullptr;
write_num_bytes_ = 0;
write_callback_.Reset();
void URLRequestFetchJob::ClearStream() {
stream_->RemoveReadObserver(this);
stream_ = nullptr;
}
} // namespace atom

View file

@ -8,22 +8,24 @@
#include <string>
#include "atom/browser/net/js_asker.h"
#include "browser/url_request_context_getter.h"
#include "brightray/browser/url_request_context_getter.h"
#include "content/browser/streams/stream.h"
#include "content/browser/streams/stream_read_observer.h"
#include "net/url_request/url_fetcher_delegate.h"
namespace atom {
class URLRequestFetchJob : public JsAsker<net::URLRequestJob>,
public net::URLFetcherDelegate,
public brightray::URLRequestContextGetter::Delegate {
public brightray::URLRequestContextGetter::Delegate,
public content::StreamReadObserver {
public:
URLRequestFetchJob(net::URLRequest*, net::NetworkDelegate*);
// Called by response writer.
void HeadersCompleted();
int DataAvailable(net::IOBuffer* buffer,
int num_bytes,
const net::CompletionCallback& callback);
content::Stream* stream() const { return stream_.get(); }
protected:
// JsAsker:
@ -36,28 +38,26 @@ class URLRequestFetchJob : public JsAsker<net::URLRequestJob>,
bool GetMimeType(std::string* mime_type) const override;
void GetResponseInfo(net::HttpResponseInfo* info) override;
int GetResponseCode() const override;
int64_t GetTotalReceivedBytes() const override;
// net::URLFetcherDelegate:
void OnURLFetchComplete(const net::URLFetcher* source) override;
// content::StreamReadObserver:
void OnDataAvailable(content::Stream* stream) override;
private:
int BufferCopy(net::IOBuffer* source, int num_bytes,
net::IOBuffer* target, int target_size);
void ClearPendingBuffer();
void ClearWriteBuffer();
void ClearStream();
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
std::unique_ptr<net::URLFetcher> fetcher_;
std::unique_ptr<net::HttpResponseInfo> response_info_;
scoped_refptr<content::Stream> stream_;
// Saved arguments passed to ReadRawData.
scoped_refptr<net::IOBuffer> pending_buffer_;
int pending_buffer_size_;
// Saved arguments passed to DataAvailable.
scoped_refptr<net::IOBuffer> write_buffer_;
int write_num_bytes_;
net::CompletionCallback write_callback_;
int total_bytes_read_;
DISALLOW_COPY_AND_ASSIGN(URLRequestFetchJob);
};

View file

@ -126,6 +126,10 @@ bool MoveItemToTrash(const base::FilePath& full_path) {
} else if (trash.compare("trash-cli") == 0) {
argv.push_back("trash-put");
argv.push_back(full_path.value());
} else if (trash.compare("gio") == 0) {
argv.push_back("gio");
argv.push_back("trash");
argv.push_back(full_path.value());
} else {
argv.push_back(ELECTRON_DEFAULT_TRASH);
argv.push_back(full_path.value());

View file

@ -27,7 +27,6 @@
#include "third_party/icu/source/i18n/unicode/uregex.h"
#include "third_party/icu/source/i18n/unicode/uspoof.h"
#include "third_party/icu/source/i18n/unicode/usearch.h"
#include "util-inl.h"
#include "v8-profiler.h"
#include "v8-inspector.h"
@ -41,18 +40,6 @@ int close(int fd) {
return _close(fd);
}
void* ArrayBufferCalloc(size_t length) {
return UncheckedCalloc(length);
}
void* ArrayBufferMalloc(size_t length) {
return UncheckedMalloc(length);
}
void ArrayBufferFree(void* data, size_t length) {
return ::free(data);
}
void ReferenceSymbols() {
// Following symbols are used by electron.exe but got stripped by compiler,
// by using the symbols we can force compiler to keep the objects in node.dll,

View file

@ -21,12 +21,6 @@ namespace node {
__declspec(dllexport) int open_osfhandle(intptr_t osfhandle, int flags);
__declspec(dllexport) int close(int fd);
// Memory allocation functions from Node's module, used by ArrayBuffer allocator
// to make sure memories are allocated and freed with the same allocator.
__declspec(dllexport) void* ArrayBufferCalloc(size_t length);
__declspec(dllexport) void* ArrayBufferMalloc(size_t length);
__declspec(dllexport) void ArrayBufferFree(void* data, size_t length);
// A trick to force referencing symbols.
__declspec(dllexport) void ReferenceSymbols();

View file

@ -16,7 +16,6 @@
#include "atom/renderer/api/atom_api_renderer_ipc.h"
#include "atom/renderer/atom_render_frame_observer.h"
#include "atom/renderer/atom_render_view_observer.h"
#include "atom/renderer/node_array_buffer_bridge.h"
#include "atom/renderer/web_worker_observer.h"
#include "base/command_line.h"
#include "content/public/renderer/render_frame.h"
@ -51,7 +50,6 @@ AtomRendererClient::~AtomRendererClient() {
}
void AtomRendererClient::RenderThreadStarted() {
OverrideNodeArrayBuffer();
RendererClientBase::RenderThreadStarted();
}

View file

@ -1,66 +0,0 @@
// Copyright (c) 2015 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/renderer/node_array_buffer_bridge.h"
#include "atom/common/node_includes.h"
#include "base/macros.h"
#include "native_mate/converter.h"
#include "third_party/WebKit/public/web/WebArrayBuffer.h"
#include "third_party/WebKit/public/web/WebArrayBufferConverter.h"
namespace atom {
namespace {
// global.Uint8Array;
v8::Local<v8::Function> GetUint8ArrayConstructor(
v8::Isolate* isolate, v8::Local<v8::Context> context) {
v8::Local<v8::Value> constructor = context->Global()->Get(
mate::StringToV8(isolate, "Uint8Array"));
return v8::Local<v8::Function>::Cast(constructor);
}
// new ArrayBuffer(size);
v8::Local<v8::ArrayBuffer> BlinkArrayBufferNew(
v8::Isolate* isolate, size_t size) {
blink::WebArrayBuffer buffer = blink::WebArrayBuffer::create(size, 1);
return v8::Local<v8::ArrayBuffer>::Cast(
blink::WebArrayBufferConverter::toV8Value(
&buffer, isolate->GetCurrentContext()->Global(), isolate));
}
// new ArrayBuffer(data, size);
v8::Local<v8::ArrayBuffer> BlinkArrayBufferNewWith(
v8::Isolate* isolate, void* data, size_t size) {
blink::WebArrayBuffer buffer = blink::WebArrayBuffer::createExternal(
data, size);
return v8::Local<v8::ArrayBuffer>::Cast(
blink::WebArrayBufferConverter::toV8Value(
&buffer, isolate->GetCurrentContext()->Global(), isolate));
}
// new Uint8Array(array_buffer, offset, size);
v8::Local<v8::Uint8Array> BlinkUint8ArrayNew(
v8::Local<v8::ArrayBuffer> ab, size_t offset, size_t size) {
// Use the DOM's Uint8Array constructor to create Uint8Array.
v8::Local<v8::Context> context = ab->CreationContext();
v8::Isolate* isolate = context->GetIsolate();
v8::Local<v8::Function> constructor =
GetUint8ArrayConstructor(isolate, context);
v8::Local<v8::Value> args[] = {
ab, mate::ConvertToV8(isolate, offset), mate::ConvertToV8(isolate, size)
};
return v8::Local<v8::Uint8Array>::Cast(constructor->NewInstance(
context, node::arraysize(args), args).ToLocalChecked());
}
} // namespace
void OverrideNodeArrayBuffer() {
node::Buffer::SetArrayBufferCreator(
BlinkArrayBufferNew, BlinkArrayBufferNewWith, BlinkUint8ArrayNew);
}
} // namespace atom

View file

@ -1,15 +0,0 @@
// Copyright (c) 2015 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_RENDERER_NODE_ARRAY_BUFFER_BRIDGE_H_
#define ATOM_RENDERER_NODE_ARRAY_BUFFER_BRIDGE_H_
namespace atom {
// Override Node's ArrayBuffer with DOM's ArrayBuffer.
void OverrideNodeArrayBuffer();
} // namespace atom
#endif // ATOM_RENDERER_NODE_ARRAY_BUFFER_BRIDGE_H_

View file

@ -1 +1 @@
filter=-build/header_guard,-build/include_what_you_use,-legal/copyright,-runtime/references
filter=-legal/copyright,+build/include_alpha

View file

@ -11,7 +11,7 @@
'target_name': 'brightray',
'type': 'static_library',
'include_dirs': [
'.',
'..',
'<(libchromiumcontent_src_dir)',
'<(libchromiumcontent_src_dir)/skia/config',
'<(libchromiumcontent_src_dir)/third_party/boringssl/src/include',
@ -22,7 +22,6 @@
],
'direct_dependent_settings': {
'include_dirs': [
'.',
'../vendor',
'<(libchromiumcontent_src_dir)',
'<(libchromiumcontent_src_dir)/gpu',

View file

@ -2,10 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BROWSER_BRIGHTRAY_PATHS_H_
#define BROWSER_BRIGHTRAY_PATHS_H_
#include "base/compiler_specific.h"
#ifndef BRIGHTRAY_BROWSER_BRIGHTRAY_PATHS_H_
#define BRIGHTRAY_BROWSER_BRIGHTRAY_PATHS_H_
#if defined(OS_WIN)
#include "base/base_paths_win.h"
@ -42,4 +40,4 @@ enum {
} // namespace brightray
#endif // BROWSER_BRIGHTRAY_PATHS_H_
#endif // BRIGHTRAY_BROWSER_BRIGHTRAY_PATHS_H_

View file

@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/browser_client.h"
#include "brightray/browser/browser_client.h"
#include "base/path_service.h"
#include "browser/browser_context.h"
#include "browser/browser_main_parts.h"
#include "browser/devtools_manager_delegate.h"
#include "browser/media/media_capture_devices_dispatcher.h"
#include "browser/notification_presenter.h"
#include "browser/platform_notification_service.h"
#include "brightray/browser/browser_context.h"
#include "brightray/browser/browser_main_parts.h"
#include "brightray/browser/devtools_manager_delegate.h"
#include "brightray/browser/media/media_capture_devices_dispatcher.h"
#include "brightray/browser/notification_presenter.h"
#include "brightray/browser/platform_notification_service.h"
#include "content/public/common/url_constants.h"
namespace brightray {

View file

@ -5,13 +5,14 @@
#ifndef BRIGHTRAY_BROWSER_BROWSER_CLIENT_H_
#define BRIGHTRAY_BROWSER_BROWSER_CLIENT_H_
#include "browser/net_log.h"
#include "content/public/browser/browser_context.h"
#include <string>
#include <vector>
#include "brightray/browser/net_log.h"
#include "content/public/browser/content_browser_client.h"
namespace brightray {
class BrowserContext;
class BrowserMainParts;
class NotificationPresenter;
class PlatformNotificationService;
@ -66,4 +67,4 @@ class BrowserClient : public content::ContentBrowserClient {
} // namespace brightray
#endif
#endif // BRIGHTRAY_BROWSER_BROWSER_CLIENT_H_

View file

@ -2,27 +2,24 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/browser_context.h"
#include "browser/media/media_device_id_salt.h"
#include "browser/brightray_paths.h"
#include "browser/browser_client.h"
#include "browser/inspectable_web_contents_impl.h"
#include "browser/network_delegate.h"
#include "browser/permission_manager.h"
#include "browser/special_storage_policy.h"
#include "browser/zoom_level_delegate.h"
#include "common/application_info.h"
#include "brightray/browser/browser_context.h"
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "brightray/browser/brightray_paths.h"
#include "brightray/browser/browser_client.h"
#include "brightray/browser/inspectable_web_contents_impl.h"
#include "brightray/browser/media/media_device_id_salt.h"
#include "brightray/browser/network_delegate.h"
#include "brightray/browser/special_storage_policy.h"
#include "brightray/browser/zoom_level_delegate.h"
#include "brightray/common/application_info.h"
#include "components/prefs/json_pref_store.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/pref_service_factory.h"
#include "base/strings/string_util.h"
#include "content/browser/streams/stream_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/resource_context.h"
#include "content/public/browser/storage_partition.h"
@ -165,6 +162,10 @@ MediaDeviceIDSalt* BrowserContext::GetMediaDeviceIDSalt() {
return media_device_id_salt_.get();
}
content::StreamContext* BrowserContext::GetStreamContext() {
return content::StreamContext::GetFor(this);
}
base::FilePath BrowserContext::GetPath() const {
return path_;
}

View file

@ -6,13 +6,13 @@
#define BRIGHTRAY_BROWSER_BROWSER_CONTEXT_H_
#include <map>
#include "browser/net/devtools_network_controller_handle.h"
#include "browser/permission_manager.h"
#include "browser/url_request_context_getter.h"
#include <string>
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "brightray/browser/net/devtools_network_controller_handle.h"
#include "brightray/browser/permission_manager.h"
#include "brightray/browser/url_request_context_getter.h"
#include "content/public/browser/browser_context.h"
class PrefRegistrySimple;
@ -89,6 +89,7 @@ class BrowserContext : public base::RefCounted<BrowserContext>,
// URLRequestContextGetter::Delegate:
net::NetworkDelegate* CreateNetworkDelegate() override;
MediaDeviceIDSalt* GetMediaDeviceIDSalt() override;
content::StreamContext* GetStreamContext() override;
base::FilePath GetPath() const override;
@ -139,4 +140,4 @@ class BrowserContext : public base::RefCounted<BrowserContext>,
} // namespace brightray
#endif
#endif // BRIGHTRAY_BROWSER_BROWSER_CONTEXT_H_

View file

@ -2,17 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/browser_main_parts.h"
#include "browser/browser_context.h"
#include "browser/devtools_manager_delegate.h"
#include "browser/web_ui_controller_factory.h"
#include "common/main_delegate.h"
#include "brightray/browser/browser_main_parts.h"
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "brightray/browser/browser_context.h"
#include "brightray/browser/devtools_manager_delegate.h"
#include "brightray/browser/web_ui_controller_factory.h"
#include "brightray/common/main_delegate.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
#include "media/base/localized_strings.h"
@ -28,15 +27,15 @@
#endif
#if defined(TOOLKIT_VIEWS)
#include "browser/views/views_delegate.h"
#include "brightray/browser/views/views_delegate.h"
#endif
#if defined(USE_X11)
#include "base/environment.h"
#include "base/path_service.h"
#include "base/nix/xdg_util.h"
#include "base/path_service.h"
#include "base/threading/thread_task_runner_handle.h"
#include "browser/brightray_paths.h"
#include "brightray/browser/brightray_paths.h"
#include "chrome/browser/ui/libgtkui/gtk_ui.h"
#include "ui/base/x/x11_util.h"
#include "ui/base/x/x11_util_internal.h"

View file

@ -5,8 +5,10 @@
#ifndef BRIGHTRAY_BROWSER_BROWSER_MAIN_PARTS_H_
#define BRIGHTRAY_BROWSER_BROWSER_MAIN_PARTS_H_
#include <memory>
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/macros.h"
#include "content/public/browser/browser_main_parts.h"
#if defined(TOOLKIT_VIEWS)
@ -57,4 +59,4 @@ class BrowserMainParts : public content::BrowserMainParts {
} // namespace brightray
#endif
#endif // BRIGHTRAY_BROWSER_BROWSER_MAIN_PARTS_H_

View file

@ -1,4 +1,4 @@
#import "browser_main_parts.h"
#import "brightray/browser/browser_main_parts.h"
#import "base/logging.h"
#import "base/mac/bundle_locations.h"

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "browser/devtools_contents_resizing_strategy.h"
#include "brightray/browser/devtools_contents_resizing_strategy.h"
#include <algorithm>
@ -17,7 +17,6 @@ DevToolsContentsResizingStrategy::DevToolsContentsResizingStrategy(
!bounds_.y()) {
}
void DevToolsContentsResizingStrategy::CopyFrom(
const DevToolsContentsResizingStrategy& strategy) {
bounds_ = strategy.bounds();

View file

@ -6,7 +6,6 @@
#define BRIGHTRAY_BROWSER_DEVTOOLS_CONTENTS_RESIZING_STRATEGY_H_
#include "base/macros.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/devtools_embedder_message_dispatcher.h"
#include "brightray/browser/devtools_embedder_message_dispatcher.h"
#include "base/bind.h"
#include "base/values.h"
@ -145,7 +145,6 @@ class DispatcherImpl : public DevToolsEmbedderMessageDispatcher {
base::Unretained(delegate)));
}
private:
using Handler = base::Callback<bool(const DispatchCallback&,
const base::ListValue&)>;

View file

@ -2,20 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "browser/devtools_file_system_indexer.h"
#include "brightray/browser/devtools_file_system_indexer.h"
#include <stddef.h>
#include <algorithm>
#include <iterator>
#include <set>
#include "base/bind.h"
#include "base/callback.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_util.h"
#include "base/files/file_util_proxy.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BROWSER_DEVTOOLS_FILE_SYSTEM_INDEXER_H_
#define BROWSER_DEVTOOLS_FILE_SYSTEM_INDEXER_H_
#ifndef BRIGHTRAY_BROWSER_DEVTOOLS_FILE_SYSTEM_INDEXER_H_
#define BRIGHTRAY_BROWSER_DEVTOOLS_FILE_SYSTEM_INDEXER_H_
#include <stdint.h>
@ -112,4 +112,4 @@ class DevToolsFileSystemIndexer
} // namespace brightray
#endif // BROWSER_DEVTOOLS_FILE_SYSTEM_INDEXER_H_
#endif // BRIGHTRAY_BROWSER_DEVTOOLS_FILE_SYSTEM_INDEXER_H_

View file

@ -2,19 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/devtools_manager_delegate.h"
#include "brightray/browser/devtools_manager_delegate.h"
#include <vector>
#include "browser/net/devtools_network_protocol_handler.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "common/content_client.h"
#include "brightray/browser/net/devtools_network_protocol_handler.h"
#include "brightray/common/content_client.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/devtools_frontend_host.h"
#include "content/public/browser/devtools_socket_factory.h"
@ -25,11 +24,10 @@
#include "content/public/common/user_agent.h"
#include "content/shell/grit/shell_resources.h"
#include "net/base/net_errors.h"
#include "net/socket/tcp_server_socket.h"
#include "net/socket/stream_socket.h"
#include "net/socket/tcp_server_socket.h"
#include "ui/base/resource/resource_bundle.h"
namespace brightray {
namespace {

View file

@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#ifndef BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_
#define BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_
#ifndef BRIGHTRAY_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_
#define BRIGHTRAY_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_
#include <string>
#include "base/macros.h"
#include "base/compiler_specific.h"
#include "content/browser/devtools/devtools_http_handler.h"
#include "base/macros.h"
#include "content/public/browser/devtools_manager_delegate.h"
namespace brightray {
@ -39,4 +40,4 @@ class DevToolsManagerDelegate : public content::DevToolsManagerDelegate {
} // namespace brightray
#endif // BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_
#endif // BRIGHTRAY_BROWSER_DEVTOOLS_MANAGER_DELEGATE_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/devtools_ui.h"
#include "brightray/browser/devtools_ui.h"
#include <string>

View file

@ -24,4 +24,4 @@ class DevToolsUI : public content::WebUIController {
} // namespace brightray
#endif
#endif // BRIGHTRAY_BROWSER_DEVTOOLS_UI_H_

View file

@ -1,6 +1,6 @@
#include "browser/inspectable_web_contents.h"
#include "brightray/browser/inspectable_web_contents.h"
#include "browser/inspectable_web_contents_impl.h"
#include "brightray/browser/inspectable_web_contents_impl.h"
namespace brightray {

View file

@ -1,5 +1,7 @@
#ifndef BRIGHTRAY_INSPECTABLE_WEB_CONTENTS_H_
#define BRIGHTRAY_INSPECTABLE_WEB_CONTENTS_H_
#ifndef BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_H_
#define BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_H_
#include <string>
#include "content/public/browser/web_contents.h"
@ -50,4 +52,4 @@ class InspectableWebContents {
} // namespace brightray
#endif
#endif // BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_H_

View file

@ -1,5 +1,5 @@
#ifndef BRIGHTRAY_INSPECTABLE_WEB_CONTENTS_DELEGATE_H_
#define BRIGHTRAY_INSPECTABLE_WEB_CONTENTS_DELEGATE_H_
#ifndef BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_DELEGATE_H_
#define BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_DELEGATE_H_
#include <string>
@ -31,4 +31,4 @@ class InspectableWebContentsDelegate {
} // namespace brightray
#endif // BRIGHTRAY_INSPECTABLE_WEB_CONTENTS_DELEGATE_H_
#endif // BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_DELEGATE_H_

View file

@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/inspectable_web_contents_impl.h"
#include "brightray/browser/inspectable_web_contents_impl.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
@ -12,15 +12,15 @@
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "browser/browser_client.h"
#include "browser/browser_context.h"
#include "browser/browser_main_parts.h"
#include "browser/inspectable_web_contents_delegate.h"
#include "browser/inspectable_web_contents_view.h"
#include "browser/inspectable_web_contents_view_delegate.h"
#include "brightray/browser/browser_client.h"
#include "brightray/browser/browser_context.h"
#include "brightray/browser/browser_main_parts.h"
#include "brightray/browser/inspectable_web_contents_delegate.h"
#include "brightray/browser/inspectable_web_contents_view.h"
#include "brightray/browser/inspectable_web_contents_view_delegate.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"
#include "components/prefs/pref_registry_simple.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/render_frame_host.h"

View file

@ -6,12 +6,14 @@
#ifndef BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_IMPL_H_
#define BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_IMPL_H_
#include "browser/inspectable_web_contents.h"
#include "browser/devtools_contents_resizing_strategy.h"
#include "browser/devtools_embedder_message_dispatcher.h"
#include <map>
#include <string>
#include <vector>
#include "base/memory/weak_ptr.h"
#include "brightray/browser/devtools_contents_resizing_strategy.h"
#include "brightray/browser/devtools_embedder_message_dispatcher.h"
#include "brightray/browser/inspectable_web_contents.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/devtools_frontend_host.h"
#include "content/public/browser/web_contents_delegate.h"
@ -22,10 +24,6 @@
class PrefService;
class PrefRegistrySimple;
namespace content {
class DevToolsAgentHost;
}
namespace brightray {
class InspectableWebContentsDelegate;
@ -199,4 +197,4 @@ class InspectableWebContentsImpl :
} // namespace brightray
#endif
#endif // BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_IMPL_H_

View file

@ -56,4 +56,4 @@ class InspectableWebContentsView {
} // namespace brightray
#endif
#endif // BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_VIEW_H_

View file

@ -1,4 +1,4 @@
#include "browser/inspectable_web_contents_view_delegate.h"
#include "brightray/browser/inspectable_web_contents_view_delegate.h"
namespace brightray {

View file

@ -1,5 +1,7 @@
#ifndef BROWSER_INSPECTABLE_WEB_CONTENTS_VIEW_DELEGATE_H_
#define BROWSER_INSPECTABLE_WEB_CONTENTS_VIEW_DELEGATE_H_
#ifndef BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_VIEW_DELEGATE_H_
#define BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_VIEW_DELEGATE_H_
#include <string>
#include "ui/gfx/image/image_skia.h"
@ -25,4 +27,4 @@ class InspectableWebContentsViewDelegate {
} // namespace brightray
#endif // BROWSER_INSPECTABLE_WEB_CONTENTS_VIEW_DELEGATE_H_
#endif // BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_VIEW_DELEGATE_H_

View file

@ -1,7 +1,7 @@
#ifndef BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_VIEW_MAC_H_
#define BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_VIEW_MAC_H_
#include "browser/inspectable_web_contents_view.h"
#include "brightray/browser/inspectable_web_contents_view.h"
#include "base/mac/scoped_nsobject.h"
@ -42,4 +42,4 @@ class InspectableWebContentsViewMac : public InspectableWebContentsView {
} // namespace brightray
#endif
#endif // BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_VIEW_MAC_H_

View file

@ -1,11 +1,11 @@
#include "browser/inspectable_web_contents_view_mac.h"
#include "brightray/browser/inspectable_web_contents_view_mac.h"
#import <AppKit/AppKit.h>
#include "base/strings/sys_string_conversions.h"
#include "browser/inspectable_web_contents.h"
#include "browser/inspectable_web_contents_view_delegate.h"
#import "browser/mac/bry_inspectable_web_contents_view.h"
#include "brightray/browser/inspectable_web_contents.h"
#include "brightray/browser/inspectable_web_contents_view_delegate.h"
#import "brightray/browser/mac/bry_inspectable_web_contents_view.h"
namespace brightray {

View file

@ -2,7 +2,7 @@
// Path to the code generator:
// tools/generate_library_loader/generate_library_loader.py .
#include "browser/linux/libnotify_loader.h"
#include "brightray/browser/linux/libnotify_loader.h"
#include <dlfcn.h>

View file

@ -6,7 +6,6 @@
#define BRIGHTRAY_BROWSER_LINUX_LIBNOTIFY_LOADER_H_
#include <libnotify/notify.h>
#include <string>
class LibNotifyLoader {

View file

@ -2,14 +2,14 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "browser/linux/libnotify_notification.h"
#include "brightray/browser/linux/libnotify_notification.h"
#include "base/files/file_enumerator.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "browser/notification_delegate.h"
#include "brightray/browser/notification_delegate.h"
#include "brightray/common/application_info.h"
#include "chrome/browser/ui/libgtkui/skia_utils_gtk.h"
#include "common/application_info.h"
#include "third_party/skia/include/core/SkBitmap.h"
namespace brightray {

View file

@ -2,11 +2,13 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef BROWSER_LINUX_LIBNOTIFY_NOTIFICATION_H_
#define BROWSER_LINUX_LIBNOTIFY_NOTIFICATION_H_
#ifndef BRIGHTRAY_BROWSER_LINUX_LIBNOTIFY_NOTIFICATION_H_
#define BRIGHTRAY_BROWSER_LINUX_LIBNOTIFY_NOTIFICATION_H_
#include "browser/linux/libnotify_loader.h"
#include "browser/notification.h"
#include <string>
#include "brightray/browser/linux/libnotify_loader.h"
#include "brightray/browser/notification.h"
#include "ui/base/glib/glib_signal.h"
namespace brightray {
@ -41,4 +43,4 @@ class LibnotifyNotification : public Notification {
} // namespace brightray
#endif // BROWSER_LINUX_LIBNOTIFY_NOTIFICATION_H_
#endif // BRIGHTRAY_BROWSER_LINUX_LIBNOTIFY_NOTIFICATION_H_

View file

@ -3,9 +3,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/linux/notification_presenter_linux.h"
#include "brightray/browser/linux/notification_presenter_linux.h"
#include "browser/linux/libnotify_notification.h"
#include "brightray/browser/linux/libnotify_notification.h"
namespace brightray {

View file

@ -3,10 +3,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#ifndef BRIGHTRAY_BROWSER_NOTIFICATION_PRESENTER_LINUX_H_
#define BRIGHTRAY_BROWSER_NOTIFICATION_PRESENTER_LINUX_H_
#ifndef BRIGHTRAY_BROWSER_LINUX_NOTIFICATION_PRESENTER_LINUX_H_
#define BRIGHTRAY_BROWSER_LINUX_NOTIFICATION_PRESENTER_LINUX_H_
#include "browser/notification_presenter.h"
#include "brightray/browser/notification_presenter.h"
namespace brightray {
@ -24,4 +24,4 @@ class NotificationPresenterLinux : public NotificationPresenter {
} // namespace brightray
#endif
#endif // BRIGHTRAY_BROWSER_LINUX_NOTIFICATION_PRESENTER_LINUX_H_

View file

@ -1,7 +0,0 @@
#import "base/mac/scoped_sending_event.h"
@interface BRYApplication : NSApplication<CrAppProtocol, CrAppControlProtocol> {
BOOL _handlingSendEvent;
}
@end

View file

@ -1,19 +0,0 @@
#import "bry_application.h"
@interface BRYApplication ()
@property (nonatomic, assign, getter = isHandlingSendEvent) BOOL handlingSendEvent;
@end
@implementation BRYApplication
@synthesize handlingSendEvent = _handlingSendEvent;
- (void)sendEvent:(NSEvent *)theEvent
{
base::mac::ScopedSendingEvent scopedSendingEvent;
[super sendEvent:theEvent];
}
@end

View file

@ -1,8 +1,7 @@
#import <AppKit/AppKit.h>
#include "browser/devtools_contents_resizing_strategy.h"
#include "base/mac/scoped_nsobject.h"
#include "brightray/browser/devtools_contents_resizing_strategy.h"
#include "ui/base/cocoa/base_view.h"
namespace brightray {

View file

@ -1,10 +1,9 @@
#include "browser/mac/bry_inspectable_web_contents_view.h"
#include "browser/inspectable_web_contents_impl.h"
#include "browser/inspectable_web_contents_view_delegate.h"
#include "browser/inspectable_web_contents_view_mac.h"
#include "browser/mac/event_dispatching_window.h"
#include "brightray/browser/mac/bry_inspectable_web_contents_view.h"
#include "brightray/browser/inspectable_web_contents_impl.h"
#include "brightray/browser/inspectable_web_contents_view_delegate.h"
#include "brightray/browser/inspectable_web_contents_view_mac.h"
#include "brightray/browser/mac/event_dispatching_window.h"
#include "content/public/browser/render_widget_host_view.h"
#include "ui/gfx/mac/scoped_cocoa_disable_screen_updates.h"

View file

@ -2,13 +2,15 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef BROWSER_MAC_COCOA_NOTIFICATION_H_
#define BROWSER_MAC_COCOA_NOTIFICATION_H_
#ifndef BRIGHTRAY_BROWSER_MAC_COCOA_NOTIFICATION_H_
#define BRIGHTRAY_BROWSER_MAC_COCOA_NOTIFICATION_H_
#import <Foundation/Foundation.h>
#include <string>
#include "base/mac/scoped_nsobject.h"
#include "browser/notification.h"
#include "brightray/browser/notification.h"
namespace brightray {
@ -39,4 +41,4 @@ class CocoaNotification : public Notification {
} // namespace brightray
#endif // BROWSER_MAC_COCOA_NOTIFICATION_H_
#endif // BRIGHTRAY_BROWSER_MAC_COCOA_NOTIFICATION_H_

View file

@ -2,12 +2,12 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "browser/mac/cocoa_notification.h"
#include "brightray/browser/mac/cocoa_notification.h"
#include "base/mac/mac_util.h"
#include "base/strings/sys_string_conversions.h"
#include "browser/notification_delegate.h"
#include "browser/notification_presenter.h"
#include "brightray/browser/notification_delegate.h"
#include "brightray/browser/notification_presenter.h"
#include "skia/ext/skia_utils_mac.h"
namespace brightray {

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "browser/mac/event_dispatching_window.h"
#include "brightray/browser/mac/event_dispatching_window.h"
@implementation EventDispatchingWindow

View file

@ -2,10 +2,10 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "browser/mac/notification_center_delegate.h"
#include "brightray/browser/mac/notification_center_delegate.h"
#include "browser/mac/cocoa_notification.h"
#include "browser/mac/notification_presenter_mac.h"
#include "brightray/browser/mac/cocoa_notification.h"
#include "brightray/browser/mac/notification_presenter_mac.h"
@implementation NotificationCenterDelegate

View file

@ -3,12 +3,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#ifndef BRIGHTRAY_BROWSER_NOTIFICATION_PRESENTER_MAC_H_
#define BRIGHTRAY_BROWSER_NOTIFICATION_PRESENTER_MAC_H_
#ifndef BRIGHTRAY_BROWSER_MAC_NOTIFICATION_PRESENTER_MAC_H_
#define BRIGHTRAY_BROWSER_MAC_NOTIFICATION_PRESENTER_MAC_H_
#include "base/mac/scoped_nsobject.h"
#include "browser/mac/notification_center_delegate.h"
#include "browser/notification_presenter.h"
#include "brightray/browser/mac/notification_center_delegate.h"
#include "brightray/browser/notification_presenter.h"
namespace brightray {
@ -33,4 +33,4 @@ class NotificationPresenterMac : public NotificationPresenter {
} // namespace brightray
#endif
#endif // BRIGHTRAY_BROWSER_MAC_NOTIFICATION_PRESENTER_MAC_H_

View file

@ -2,10 +2,10 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "browser/mac/notification_presenter_mac.h"
#include "brightray/browser/mac/notification_presenter_mac.h"
#include "browser/mac/cocoa_notification.h"
#include "browser/mac/notification_center_delegate.h"
#include "brightray/browser/mac/cocoa_notification.h"
#include "brightray/browser/mac/notification_center_delegate.h"
namespace brightray {

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/media/media_capture_devices_dispatcher.h"
#include "brightray/browser/media/media_capture_devices_dispatcher.h"
#include "base/logging.h"
#include "content/public/browser/browser_thread.h"

View file

@ -5,10 +5,10 @@
#ifndef BRIGHTRAY_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_
#define BRIGHTRAY_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_
#include "base/callback.h"
#include <string>
#include "base/memory/singleton.h"
#include "content/public/browser/media_observer.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/common/media_stream_request.h"
namespace brightray {

View file

@ -1,7 +1,7 @@
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "browser/media/media_device_id_salt.h"
#include "brightray/browser/media/media_device_id_salt.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"

View file

@ -8,7 +8,6 @@
#include <string>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "components/prefs/pref_member.h"
class PrefRegistrySimple;

View file

@ -2,10 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/media/media_stream_devices_controller.h"
#include "browser/media/media_capture_devices_dispatcher.h"
#include "brightray/browser/media/media_stream_devices_controller.h"
#include "brightray/browser/media/media_capture_devices_dispatcher.h"
#include "content/public/browser/desktop_media_id.h"
#include "content/public/common/media_stream_request.h"

View file

@ -5,8 +5,6 @@
#ifndef BRIGHTRAY_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_
#define BRIGHTRAY_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_
#include <string>
#include "content/public/browser/web_contents_delegate.h"
namespace brightray {

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "browser/net/devtools_network_conditions.h"
#include "brightray/browser/net/devtools_network_conditions.h"
namespace brightray {

View file

@ -2,14 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BROWSER_DEVTOOLS_NETWORK_CONDITIONS_H_
#define BROWSER_DEVTOOLS_NETWORK_CONDITIONS_H_
#include <string>
#include <vector>
#ifndef BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_CONDITIONS_H_
#define BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_CONDITIONS_H_
#include "base/macros.h"
#include "url/gurl.h"
namespace brightray {
@ -40,4 +36,4 @@ class DevToolsNetworkConditions {
} // namespace brightray
#endif // BROWSER_DEVTOOLS_NETWORK_CONDITIONS_H_
#endif // BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_CONDITIONS_H_

View file

@ -2,13 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/net/devtools_network_controller.h"
#include "browser/net/devtools_network_conditions.h"
#include "browser/net/devtools_network_interceptor.h"
#include "browser/net/devtools_network_transaction.h"
#include "brightray/browser/net/devtools_network_controller.h"
#include "base/bind.h"
#include "brightray/browser/net/devtools_network_conditions.h"
#include "brightray/browser/net/devtools_network_interceptor.h"
#include "brightray/browser/net/devtools_network_transaction.h"
#include "content/public/browser/browser_thread.h"
using content::BrowserThread;

View file

@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#ifndef BROWSER_DEVTOOLS_NETWORK_CONTROLLER_H_
#define BROWSER_DEVTOOLS_NETWORK_CONTROLLER_H_
#ifndef BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_CONTROLLER_H_
#define BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_CONTROLLER_H_
#include <unordered_map>
#include <memory>
#include <string>
#include <unordered_map>
#include "base/macros.h"
#include "base/threading/thread_checker.h"
@ -41,4 +41,4 @@ class DevToolsNetworkController {
} // namespace brightray
#endif // BROWSER_DEVTOOLS_NETWORK_CONTROLLER_H_
#endif // BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_CONTROLLER_H_

View file

@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/net/devtools_network_controller_handle.h"
#include "brightray/browser/net/devtools_network_controller_handle.h"
#include "base/bind.h"
#include "browser/net/devtools_network_conditions.h"
#include "browser/net/devtools_network_controller.h"
#include "brightray/browser/net/devtools_network_conditions.h"
#include "brightray/browser/net/devtools_network_controller.h"
#include "content/public/browser/browser_thread.h"
using content::BrowserThread;

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#ifndef BROWSER_DEVTOOLS_NETWORK_CONTROLLER_HANDLE_H_
#define BROWSER_DEVTOOLS_NETWORK_CONTROLLER_HANDLE_H_
#ifndef BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_CONTROLLER_HANDLE_H_
#define BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_CONTROLLER_HANDLE_H_
#include <memory>
#include <string>
@ -42,4 +42,4 @@ class DevToolsNetworkControllerHandle {
} // namespace brightray
#endif // BROWSER_DEVTOOLS_NETWORK_CONTROLLER_HANDLE_H_
#endif // BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_CONTROLLER_HANDLE_H_

View file

@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "browser/net/devtools_network_interceptor.h"
#include "brightray/browser/net/devtools_network_interceptor.h"
#include <algorithm>
#include <limits>
#include "base/time/time.h"
#include "browser/net/devtools_network_conditions.h"
#include "brightray/browser/net/devtools_network_conditions.h"
#include "net/base/net_errors.h"
namespace brightray {

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BROWSER_DEVTOOLS_NETWORK_INTERCEPTOR_H_
#define BROWSER_DEVTOOLS_NETWORK_INTERCEPTOR_H_
#ifndef BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_INTERCEPTOR_H_
#define BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_INTERCEPTOR_H_
#include <string>
#include <utility>
@ -104,4 +104,4 @@ class DevToolsNetworkInterceptor {
} // namespace brightray
#endif // BROWSER_DEVTOOLS_NETWORK_INTERCEPTOR_H_
#endif // BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_INTERCEPTOR_H_

View file

@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/net/devtools_network_protocol_handler.h"
#include "brightray/browser/net/devtools_network_protocol_handler.h"
#include "browser/browser_context.h"
#include "browser/net/devtools_network_conditions.h"
#include "browser/net/devtools_network_controller.h"
#include <string>
#include "base/strings/stringprintf.h"
#include "brightray/browser/browser_context.h"
#include "brightray/browser/net/devtools_network_conditions.h"
#include "brightray/browser/net/devtools_network_controller.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/devtools_agent_host.h"
namespace brightray {
namespace {
@ -39,7 +39,6 @@ const char kError[] = "error";
// JSON RPC 2.0 spec: http://www.jsonrpc.org/specification#error_object
const int kErrorInvalidParams = -32602;
bool ParseCommand(const base::DictionaryValue* command,
int* id,
std::string* method,

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BROWSER_DEVTOOLS_NETWORK_PROTOCOL_HANDLER_H_
#define BROWSER_DEVTOOLS_NETWORK_PROTOCOL_HANDLER_H_
#ifndef BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_PROTOCOL_HANDLER_H_
#define BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_PROTOCOL_HANDLER_H_
#include "base/macros.h"
#include "base/values.h"
@ -45,4 +45,4 @@ class DevToolsNetworkProtocolHandler {
} // namespace brightray
#endif // BROWSER_DEVTOOLS_NETWORK_PROTOCOL_HANDLER_H_
#endif // BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_PROTOCOL_HANDLER_H_

View file

@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/net/devtools_network_transaction.h"
#include "brightray/browser/net/devtools_network_transaction.h"
#include "browser/net/devtools_network_controller.h"
#include "browser/net/devtools_network_upload_data_stream.h"
#include <string>
#include "brightray/browser/net/devtools_network_controller.h"
#include "brightray/browser/net/devtools_network_upload_data_stream.h"
#include "net/base/load_timing_info.h"
#include "net/base/net_errors.h"
#include "net/base/upload_progress.h"

View file

@ -2,18 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BROWSER_DEVTOOLS_NETWORK_TRANSACTION_H_
#define BROWSER_DEVTOOLS_NETWORK_TRANSACTION_H_
#ifndef BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_TRANSACTION_H_
#define BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_TRANSACTION_H_
#include <stdint.h>
#include "base/memory/weak_ptr.h"
#include "browser/net/devtools_network_interceptor.h"
#include "brightray/browser/net/devtools_network_interceptor.h"
#include "net/base/completion_callback.h"
#include "net/base/load_states.h"
#include "net/base/request_priority.h"
#include "net/http/http_transaction.h"
#include "net/websockets/websocket_handshake_stream_base.h"
namespace brightray {
@ -105,4 +104,4 @@ class DevToolsNetworkTransaction : public net::HttpTransaction {
} // namespace brightray
#endif // BROWSER_DEVTOOLS_NETWORK_TRANSACTION_H_
#endif // BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_TRANSACTION_H_

View file

@ -2,11 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/net/devtools_network_transaction_factory.h"
#include "brightray/browser/net/devtools_network_transaction_factory.h"
#include "browser/net/devtools_network_controller.h"
#include "browser/net/devtools_network_transaction.h"
#include <set>
#include <string>
#include "brightray/browser/net/devtools_network_controller.h"
#include "brightray/browser/net/devtools_network_transaction.h"
#include "content/public/browser/service_worker_context.h"
#include "net/base/net_errors.h"
#include "net/http/http_network_layer.h"

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#ifndef BROWSER_DEVTOOLS_NETWORK_TRANSACTION_FACTORY_H_
#define BROWSER_DEVTOOLS_NETWORK_TRANSACTION_FACTORY_H_
#ifndef BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_TRANSACTION_FACTORY_H_
#define BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_TRANSACTION_FACTORY_H_
#include "base/macros.h"
#include "net/base/request_priority.h"
@ -36,4 +36,4 @@ class DevToolsNetworkTransactionFactory : public net::HttpTransactionFactory {
} // namespace brightray
#endif // BROWSER_DEVTOOLS_NETWORK_TRANSACTION_FACTORY_H_
#endif // BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_TRANSACTION_FACTORY_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "browser/net/devtools_network_upload_data_stream.h"
#include "brightray/browser/net/devtools_network_upload_data_stream.h"
#include "net/base/net_errors.h"

View file

@ -2,15 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BROWSER_DEVTOOLS_NETWORK_UPLOAD_DATA_STREAM_H_
#define BROWSER_DEVTOOLS_NETWORK_UPLOAD_DATA_STREAM_H_
#ifndef BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_UPLOAD_DATA_STREAM_H_
#define BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_UPLOAD_DATA_STREAM_H_
#include <stdint.h>
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "browser/net/devtools_network_interceptor.h"
#include "net/base/completion_callback.h"
#include "brightray/browser/net/devtools_network_interceptor.h"
#include "net/base/upload_data_stream.h"
namespace brightray {
@ -48,4 +47,4 @@ class DevToolsNetworkUploadDataStream : public net::UploadDataStream {
} // namespace brightray
#endif // BROWSER_DEVTOOLS_NETWORK_UPLOAD_DATA_STREAM_H_
#endif // BRIGHTRAY_BROWSER_NET_DEVTOOLS_NETWORK_UPLOAD_DATA_STREAM_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "browser/net_log.h"
#include "brightray/browser/net_log.h"
#include "base/command_line.h"
#include "base/files/file_path.h"

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef BROWSER_NET_LOG_H_
#define BROWSER_NET_LOG_H_
#ifndef BRIGHTRAY_BROWSER_NET_LOG_H_
#define BRIGHTRAY_BROWSER_NET_LOG_H_
#include "base/files/scoped_file.h"
#include "net/log/net_log.h"
@ -27,4 +27,4 @@ class NetLog : public net::NetLog {
} // namespace brightray
#endif // BROWSER_NET_LOG_H_
#endif // BRIGHTRAY_BROWSER_NET_LOG_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/network_delegate.h"
#include "brightray/browser/network_delegate.h"
#include <string>
#include <vector>

View file

@ -9,7 +9,6 @@
#include <vector>
#include "net/base/network_delegate.h"
#include "net/proxy/proxy_server.h"
namespace brightray {
@ -77,4 +76,4 @@ class NetworkDelegate : public net::NetworkDelegate {
} // namespace brightray
#endif
#endif // BRIGHTRAY_BROWSER_NETWORK_DELEGATE_H_

View file

@ -2,10 +2,10 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "browser/notification.h"
#include "brightray/browser/notification.h"
#include "browser/notification_delegate.h"
#include "browser/notification_presenter.h"
#include "brightray/browser/notification_delegate.h"
#include "brightray/browser/notification_presenter.h"
namespace brightray {

View file

@ -2,8 +2,10 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef BROWSER_NOTIFICATION_H_
#define BROWSER_NOTIFICATION_H_
#ifndef BRIGHTRAY_BROWSER_NOTIFICATION_H_
#define BRIGHTRAY_BROWSER_NOTIFICATION_H_
#include <string>
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
@ -62,4 +64,4 @@ class Notification {
} // namespace brightray
#endif // BROWSER_NOTIFICATION_H_
#endif // BRIGHTRAY_BROWSER_NOTIFICATION_H_

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef BROWSER_NOTIFICATION_DELEGATE_H_
#define BROWSER_NOTIFICATION_DELEGATE_H_
#ifndef BRIGHTRAY_BROWSER_NOTIFICATION_DELEGATE_H_
#define BRIGHTRAY_BROWSER_NOTIFICATION_DELEGATE_H_
#include "content/public/browser/desktop_notification_delegate.h"
@ -20,4 +20,4 @@ class NotificationDelegate : public content::DesktopNotificationDelegate {
} // namespace brightray
#endif // BROWSER_NOTIFICATION_DELEGATE_H_
#endif // BRIGHTRAY_BROWSER_NOTIFICATION_DELEGATE_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "browser/notification_delegate_adapter.h"
#include "brightray/browser/notification_delegate_adapter.h"
namespace brightray {

View file

@ -2,13 +2,13 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef BROWSER_NOTIFICATION_DELEGATE_ADAPTER_H_
#define BROWSER_NOTIFICATION_DELEGATE_ADAPTER_H_
#ifndef BRIGHTRAY_BROWSER_NOTIFICATION_DELEGATE_ADAPTER_H_
#define BRIGHTRAY_BROWSER_NOTIFICATION_DELEGATE_ADAPTER_H_
#include <memory>
#include "base/macros.h"
#include "browser/notification_delegate.h"
#include "brightray/browser/notification_delegate.h"
namespace brightray {
@ -35,4 +35,4 @@ class NotificationDelegateAdapter : public NotificationDelegate {
} // namespace brightray
#endif // BROWSER_NOTIFICATION_DELEGATE_ADAPTER_H_
#endif // BRIGHTRAY_BROWSER_NOTIFICATION_DELEGATE_ADAPTER_H_

View file

@ -2,9 +2,9 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "browser/notification_presenter.h"
#include "brightray/browser/notification_presenter.h"
#include "browser/notification.h"
#include "brightray/browser/notification.h"
namespace brightray {

View file

@ -42,4 +42,4 @@ class NotificationPresenter {
} // namespace brightray
#endif
#endif // BRIGHTRAY_BROWSER_NOTIFICATION_PRESENTER_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/permission_manager.h"
#include "brightray/browser/permission_manager.h"
#include "base/callback.h"
#include "content/public/browser/child_process_security_policy.h"

View file

@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#ifndef BROWSER_PERMISSION_MANAGER_H_
#define BROWSER_PERMISSION_MANAGER_H_
#ifndef BRIGHTRAY_BROWSER_PERMISSION_MANAGER_H_
#define BRIGHTRAY_BROWSER_PERMISSION_MANAGER_H_
#include <vector>
#include "base/callback_forward.h"
#include "base/macros.h"
@ -54,4 +56,4 @@ class PermissionManager : public content::PermissionManager {
} // namespace brightray
#endif // BROWSER_PERMISSION_MANAGER_H_
#endif // BRIGHTRAY_BROWSER_PERMISSION_MANAGER_H_

View file

@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/platform_notification_service.h"
#include "brightray/browser/platform_notification_service.h"
#include "browser/browser_client.h"
#include "browser/notification.h"
#include "browser/notification_delegate_adapter.h"
#include "browser/notification_presenter.h"
#include "content/public/common/platform_notification_data.h"
#include "brightray/browser/browser_client.h"
#include "brightray/browser/notification.h"
#include "brightray/browser/notification_delegate_adapter.h"
#include "brightray/browser/notification_presenter.h"
#include "content/public/common/notification_resources.h"
#include "content/public/common/platform_notification_data.h"
#include "third_party/skia/include/core/SkBitmap.h"
namespace brightray {

View file

@ -2,8 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#ifndef BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
#define BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
#ifndef BRIGHTRAY_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
#define BRIGHTRAY_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
#include <set>
#include <string>
#include "content/public/browser/browser_context.h"
#include "content/public/browser/platform_notification_service.h"
@ -58,4 +61,4 @@ class PlatformNotificationService
} // namespace brightray
#endif // BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
#endif // BRIGHTRAY_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "browser/special_storage_policy.h"
#include "brightray/browser/special_storage_policy.h"
namespace brightray {

View file

@ -2,22 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/url_request_context_getter.h"
#include "brightray/browser/url_request_context_getter.h"
#include <algorithm>
#include "browser/net/devtools_network_controller_handle.h"
#include "browser/net/devtools_network_transaction_factory.h"
#include "browser/net_log.h"
#include "browser/network_delegate.h"
#include "common/switches.h"
#include "base/command_line.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/worker_pool.h"
#include "brightray/browser/net/devtools_network_controller_handle.h"
#include "brightray/browser/net/devtools_network_transaction_factory.h"
#include "brightray/browser/net_log.h"
#include "brightray/browser/network_delegate.h"
#include "brightray/common/switches.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/cookie_store_factory.h"
#include "content/public/common/content_switches.h"
@ -51,9 +50,9 @@
#include "net/url_request/url_request_context_storage.h"
#include "net/url_request/url_request_intercepting_job_factory.h"
#include "net/url_request/url_request_job_factory_impl.h"
#include "storage/browser/quota/special_storage_policy.h"
#include "ui/base/l10n/l10n_util.h"
#include "url/url_constants.h"
#include "storage/browser/quota/special_storage_policy.h"
#if defined(USE_NSS_CERTS)
#include "net/cert_net/nss_ocsp.h"
@ -307,7 +306,7 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
network_session_params.enable_http2 = false;
// --ignore-certificate-errors
if (command_line.HasSwitch(switches::kIgnoreCertificateErrors))
if (command_line.HasSwitch(::switches::kIgnoreCertificateErrors))
network_session_params.ignore_certificate_errors = true;
// --host-rules

View file

@ -5,6 +5,9 @@
#ifndef BRIGHTRAY_BROWSER_URL_REQUEST_CONTEXT_GETTER_H_
#define BRIGHTRAY_BROWSER_URL_REQUEST_CONTEXT_GETTER_H_
#include <string>
#include <vector>
#include "base/files/file_path.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/content_browser_client.h"
@ -18,6 +21,10 @@ namespace base {
class MessageLoop;
}
namespace content {
class StreamContext;
}
namespace net {
class HostMappingRules;
class HostResolver;
@ -58,6 +65,7 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
return nullptr;
}
virtual MediaDeviceIDSalt* GetMediaDeviceIDSalt() { return nullptr; }
virtual content::StreamContext* GetStreamContext() { return nullptr; }
};
URLRequestContextGetter(
@ -82,6 +90,9 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
MediaDeviceIDSalt* GetMediaDeviceIDSalt() const {
return delegate_->GetMediaDeviceIDSalt();
}
content::StreamContext* stream_context() const {
return delegate_->GetStreamContext();
}
private:
Delegate* delegate_;
@ -112,4 +123,4 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
} // namespace brightray
#endif
#endif // BRIGHTRAY_BROWSER_URL_REQUEST_CONTEXT_GETTER_H_

View file

@ -1,10 +1,9 @@
#include "browser/views/inspectable_web_contents_view_views.h"
#include "browser/inspectable_web_contents_delegate.h"
#include "browser/inspectable_web_contents_impl.h"
#include "browser/inspectable_web_contents_view_delegate.h"
#include "brightray/browser/views/inspectable_web_contents_view_views.h"
#include "base/strings/utf_string_conversions.h"
#include "brightray/browser/inspectable_web_contents_delegate.h"
#include "brightray/browser/inspectable_web_contents_impl.h"
#include "brightray/browser/inspectable_web_contents_view_delegate.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/webview/webview.h"
#include "ui/views/widget/widget.h"

View file

@ -1,10 +1,9 @@
#ifndef BROWSER_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_
#define BROWSER_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_
#include "browser/devtools_contents_resizing_strategy.h"
#include "browser/inspectable_web_contents_view.h"
#ifndef BRIGHTRAY_BROWSER_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_
#define BRIGHTRAY_BROWSER_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_
#include "base/compiler_specific.h"
#include "brightray/browser/devtools_contents_resizing_strategy.h"
#include "brightray/browser/inspectable_web_contents_view.h"
#include "ui/views/view.h"
namespace views {
@ -64,4 +63,4 @@ class InspectableWebContentsViewViews : public InspectableWebContentsView,
} // namespace brightray
#endif // BROWSER_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_
#endif // BRIGHTRAY_BROWSER_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/views/views_delegate.h"
#include "brightray/browser/views/views_delegate.h"
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
#include "ui/views/widget/native_widget_aura.h"
@ -100,7 +100,6 @@ void ViewsDelegate::OnBeforeWidgetInit(
}
}
bool ViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) {
#if defined(OS_LINUX)
// On Ubuntu Unity, the system always provides a title bar for maximized

Some files were not shown because too many files have changed in this diff Show more