plugin.path = path;
plugin.permissions = ppapi::PERMISSION_ALL_BITS;
- std::vector<std::string> flash_version_numbers;
- base::SplitString(version, '.', &flash_version_numbers);
+ std::vector<std::string> flash_version_numbers = base::SplitString(
+ version, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
if (flash_version_numbers.size() < 1)
flash_version_numbers.push_back("11");
// |SplitString()| puts in an empty string given an empty string. :(
// E.g., "Shockwave Flash 10.2 r154":
plugin.description = plugin.name + " " + flash_version_numbers[0] + "." +
flash_version_numbers[1] + " r" + flash_version_numbers[2];
- plugin.version = JoinString(flash_version_numbers, '.');
+ plugin.version = base::JoinString(flash_version_numbers, ".");
content::WebPluginMimeType swf_mime_type(
content::kFlashPluginSwfMimeType,
content::kFlashPluginSwfExtension,
}
void AtomContentClient::AddAdditionalSchemes(
- std::vector<std::string>* standard_schemes,
+ std::vector<url::SchemeWithType>* standard_schemes,
std::vector<std::string>* savable_schemes) {
auto command_line = base::CommandLine::ForCurrentProcess();
auto custom_schemes = command_line->GetSwitchValueASCII(
switches::kRegisterStandardSchemes);
if (!custom_schemes.empty()) {
- std::vector<std::string> schemes;
- base::SplitString(custom_schemes, ',', &schemes);
- standard_schemes->insert(standard_schemes->end(),
- schemes.begin(),
- schemes.end());
+ std::vector<std::string> schemes = base::SplitString(
+ custom_schemes, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
+ for (const std::string& scheme : schemes)
+ standard_schemes->push_back({scheme.c_str(), url::SCHEME_WITHOUT_PORT});
}
- standard_schemes->push_back("chrome-extension");
+ standard_schemes->push_back({"chrome-extension", url::SCHEME_WITHOUT_PORT});
}
void AtomContentClient::AddPepperPlugins(
std::string GetProduct() const override;
std::string GetUserAgent() const override;
void AddAdditionalSchemes(
- std::vector<std::string>* standard_schemes,
+ std::vector<url::SchemeWithType>* standard_schemes,
std::vector<std::string>* savable_schemes) override;
void AddPepperPlugins(
std::vector<content::PepperPluginInfo>* plugins) override;
uint32 GetStorageMask(const std::vector<std::string>& storage_types) {
uint32 storage_mask = 0;
for (const auto& it : storage_types) {
- auto type = base::StringToLowerASCII(it);
+ auto type = base::ToLowerASCII(it);
if (type == "appcache")
storage_mask |= StoragePartition::REMOVE_DATA_MASK_APPCACHE;
else if (type == "cookies")
uint32 GetQuotaMask(const std::vector<std::string>& quota_types) {
uint32 quota_mask = 0;
for (const auto& it : quota_types) {
- auto type = base::StringToLowerASCII(it);
+ auto type = base::ToLowerASCII(it);
if (type == "temporary")
quota_mask |= StoragePartition::QUOTA_MANAGED_STORAGE_MASK_TEMPORARY;
else if (type == "persistent")
const net::ProxyConfig& config,
const base::Closure& callback) {
auto proxy_service = getter->GetURLRequestContext()->proxy_service();
- proxy_service->ResetConfigService(new net::ProxyConfigServiceFixed(config));
+ proxy_service->ResetConfigService(make_scoped_ptr(
+ new net::ProxyConfigServiceFixed(config)));
// Refetches and applies the new pac script if provided.
proxy_service->ForceReloadProxyConfig();
RunCallbackInUI(callback);
std::string key;
std::string value;
while (headers->EnumerateHeaderLines(&iter, &key, &value)) {
- key = base::StringToLowerASCII(key);
+ key = base::ToLowerASCII(key);
if (response_headers.HasKey(key)) {
base::ListValue* values = nullptr;
if (response_headers.GetList(key, &values))
std::string save_type;
if (!ConvertFromV8(isolate, val, &save_type))
return false;
- save_type = base::StringToLowerASCII(save_type);
+ save_type = base::ToLowerASCII(save_type);
if (save_type == "htmlonly") {
*out = content::SAVE_PAGE_TYPE_AS_ONLY_HTML;
} else if (save_type == "htmlcomplete") {
base::TimeTicks present_time,
scoped_refptr<media::VideoFrame>* storage,
DeliverFrameCallback* callback) {
- *storage = media::VideoFrame::CreateFrame(media::VideoFrame::YV12, size_,
- gfx::Rect(size_), size_,
- base::TimeDelta());
+ *storage = media::VideoFrame::CreateFrame(
+ media::PIXEL_FORMAT_YV12,
+ size_, gfx::Rect(size_), size_, base::TimeDelta());
*callback = base::Bind(&FrameSubscriber::OnFrameDelivered,
- base::Unretained(this),
- *storage);
+ base::Unretained(this), *storage);
return true;
}
void AtomBrowserClient::SetCustomSchemes(
const std::vector<std::string>& schemes) {
- g_custom_schemes = JoinString(schemes, ',');
+ g_custom_schemes = base::JoinString(schemes, ",");
}
AtomBrowserClient::AtomBrowserClient() : delegate_(nullptr) {
prefs->javascript_can_open_windows_automatically = true;
prefs->plugins_enabled = true;
prefs->dom_paste_enabled = true;
- prefs->java_enabled = false;
prefs->allow_scripts_to_close_windows = true;
prefs->javascript_can_access_clipboard = true;
prefs->local_storage_enabled = true;
AtomBrowserContext::AtomBrowserContext(const std::string& partition,
bool in_memory)
: brightray::BrowserContext(partition, in_memory),
- cert_verifier_(new AtomCertVerifier),
+ cert_verifier_(nullptr),
job_factory_(new AtomURLRequestJobFactory),
allow_ntlm_everywhere_(false) {
}
return content::BuildUserAgentFromProduct(user_agent);
}
-net::URLRequestJobFactory* AtomBrowserContext::CreateURLRequestJobFactory(
+scoped_ptr<net::URLRequestJobFactory> AtomBrowserContext::CreateURLRequestJobFactory(
content::ProtocolHandlerMap* handlers,
content::URLRequestInterceptorScopedVector* interceptors) {
scoped_ptr<AtomURLRequestJobFactory> job_factory(job_factory_);
top_job_factory.Pass(), make_scoped_ptr(*it)));
interceptors->weak_clear();
- return top_job_factory.release();
+ return top_job_factory.Pass();
}
net::HttpCache::BackendFactory*
return guest_manager_.get();
}
-net::CertVerifier* AtomBrowserContext::CreateCertVerifier() {
- return cert_verifier_;
+scoped_ptr<net::CertVerifier> AtomBrowserContext::CreateCertVerifier() {
+ DCHECK(!cert_verifier_);
+ cert_verifier_ = new AtomCertVerifier;
+ return make_scoped_ptr(cert_verifier_);
}
net::SSLConfigService* AtomBrowserContext::CreateSSLConfigService() {
// brightray::URLRequestContextGetter::Delegate:
std::string GetUserAgent() override;
- net::URLRequestJobFactory* CreateURLRequestJobFactory(
+ scoped_ptr<net::URLRequestJobFactory> CreateURLRequestJobFactory(
content::ProtocolHandlerMap* handlers,
content::URLRequestInterceptorScopedVector* interceptors) override;
net::HttpCache::BackendFactory* CreateHttpCacheBackendFactory(
const base::FilePath& base_path) override;
- net::CertVerifier* CreateCertVerifier() override;
+ scoped_ptr<net::CertVerifier> CreateCertVerifier() override;
net::SSLConfigService* CreateSSLConfigService() override;
bool AllowNTLMCredentialsForDomain(const GURL& auth_origin) override;
void CommonWebContentsDelegate::GetDevToolsWindowWMClass(
std::string* name, std::string* class_name) {
*class_name = Browser::Get()->GetName();
- *name = base::StringToLowerASCII(*class_name);
+ *name = base::ToLowerASCII(*class_name);
}
#endif
const float scale =
screen->GetDisplayNearestWindow(native_view).device_scale_factor();
if (scale > 1.0f)
- bitmap_size = gfx::ToCeiledSize(gfx::ScaleSize(view_size, scale));
+ bitmap_size = gfx::ScaleToCeiledSize(view_size, scale);
host->CopyFromBackingStore(
- rect.IsEmpty() ? gfx::Rect(view_size) : rect,
+ gfx::Rect(view_size),
bitmap_size,
base::Bind(&NativeWindow::OnCapturePageDone,
weak_factory_.GetWeakPtr(),
#include <string>
-#import "atom/browser/ui/cocoa/event_processing_window.h"
#include "atom/common/draggable_region.h"
#include "atom/common/options_switches.h"
#include "base/mac/mac_util.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "native_mate/dictionary.h"
+#import "ui/base/cocoa/command_dispatcher.h"
#include "ui/gfx/skia_util.h"
namespace {
@end
-@interface AtomNSWindow : EventProcessingWindow {
+@interface AtomNSWindow : NSWindow<CommandDispatchingWindow> {
@private
atom::NativeWindowMac* shell_;
bool enable_larger_than_screen_;
+ base::scoped_nsobject<CommandDispatcher> commandDispatcher_;
}
@property BOOL acceptsFirstMouse;
@property BOOL disableAutoHideCursor;
- (void)setShell:(atom::NativeWindowMac*)shell {
shell_ = shell;
+ commandDispatcher_.reset([[CommandDispatcher alloc] initWithOwner:self]);
}
- (void)setEnableLargerThanScreen:(bool)enable {
enable_larger_than_screen_ = enable;
}
+// NSWindow overrides.
+
- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen*)screen {
// Resizing is disabled.
if (ScopedDisableResize::IsResizeDisabled())
return !self.disableKeyOrMainWindow;
}
+// CommandDispatchingWindow implementation.
+
+- (void)setCommandHandler:(id<UserInterfaceItemCommandHandler>)commandHandler {
+}
+
+- (BOOL)redispatchKeyEvent:(NSEvent*)event {
+ return [commandDispatcher_ redispatchKeyEvent:event];
+}
+
+- (BOOL)defaultPerformKeyEquivalent:(NSEvent*)event {
+ return [super performKeyEquivalent:event];
+}
+
+- (void)commandDispatch:(id)sender {
+}
+
+- (void)commandDispatchUsingKeyModifiers:(id)sender {
+}
+
@end
@interface ControlRegionView : NSView
event.type == content::NativeWebKeyboardEvent::Char)
return;
- if (event.os_event.window == window_.get()) {
- EventProcessingWindow* event_window =
- static_cast<EventProcessingWindow*>(window_);
- DCHECK([event_window isKindOfClass:[EventProcessingWindow class]]);
- [event_window redispatchKeyEvent:event.os_event];
- } else {
+ BOOL handled = [[NSApp mainMenu] performKeyEquivalent:event.os_event];
+ if (!handled && event.os_event.window != window_.get()) {
// The event comes from detached devtools view, and it has already been
- // handled by the devtools itself, we now send it to application menu to
- // make menu acclerators work.
- BOOL handled = [[NSApp mainMenu] performKeyEquivalent:event.os_event];
- // Handle the cmd+~ shortcut.
if (!handled && (event.os_event.modifierFlags & NSCommandKeyMask) &&
- (event.os_event.keyCode == 50 /* ~ key */))
+ (event.os_event.keyCode == 50 /* ~ key */)) {
+ // Handle the cmd+~ shortcut.
Focus(true);
+ }
}
}
// Set WM_WINDOW_ROLE.
params.wm_role_name = "browser-window";
// Set WM_CLASS.
- params.wm_class_name = base::StringToLowerASCII(name);
+ params.wm_class_name = base::ToLowerASCII(name);
params.wm_class_class = name;
#endif
#include "net/http/http_response_headers.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_fetcher_response_writer.h"
+#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_builder.h"
#include "net/url_request/url_request_status.h"
// Convert string to RequestType.
net::URLFetcher::RequestType GetRequestType(const std::string& raw) {
- std::string method = base::StringToUpperASCII(raw);
+ std::string method = base::ToUpperASCII(raw);
if (method.empty() || method == "GET")
return net::URLFetcher::GET;
else if (method == "POST")
auto task_runner = base::ThreadTaskRunnerHandle::Get();
net::URLRequestContextBuilder builder;
builder.set_proxy_service(net::ProxyService::CreateDirect());
- url_request_context_getter_ =
- new net::TrivialURLRequestContextGetter(builder.Build(), task_runner);
+ request_context_ = builder.Build();
+ url_request_context_getter_ = new net::TrivialURLRequestContextGetter(
+ request_context_.get(), task_runner);
}
return url_request_context_getter_.get();
}
// Create a independent request context.
net::URLRequestContextGetter* CreateRequestContext();
+ scoped_ptr<net::URLRequestContext> request_context_;
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
scoped_ptr<net::URLFetcher> fetcher_;
scoped_refptr<net::IOBuffer> pending_buffer_;
LOG(ERROR) << "The accelerator string can only contain ASCII characters";
return false;
}
- std::string shortcut(base::StringToLowerASCII(description));
+ std::string shortcut(base::ToLowerASCII(description));
- std::vector<std::string> tokens;
- base::SplitString(shortcut, '+', &tokens);
+ std::vector<std::string> tokens = base::SplitString(
+ shortcut, "+", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
// Now, parse it into an accelerator.
int modifiers = ui::EF_NONE;
+++ /dev/null
-// Copyright (c) 2013 GitHub, Inc.
-// Use of this source code is governed by the MIT license that can be
-// found in the LICENSE file.
-
-#ifndef ATOM_BROWSER_UI_COCOA_EVENT_PROCESSING_WINDOW_H_
-#define ATOM_BROWSER_UI_COCOA_EVENT_PROCESSING_WINDOW_H_
-
-#import <Cocoa/Cocoa.h>
-
-// Override NSWindow to access unhandled keyboard events (for command
-// processing); subclassing NSWindow is the only method to do
-// this.
-@interface EventProcessingWindow : NSWindow {
- @private
- BOOL redispatchingEvent_;
- BOOL eventHandled_;
-}
-
-// Sends a key event to |NSApp sendEvent:|, but also makes sure that it's not
-// short-circuited to the RWHV. This is used to send keyboard events to the menu
-// and the cmd-` handler if a keyboard event comes back unhandled from the
-// renderer. The event must be of type |NSKeyDown|, |NSKeyUp|, or
-// |NSFlagsChanged|.
-// Returns |YES| if |event| has been handled.
-- (BOOL)redispatchKeyEvent:(NSEvent*)event;
-
-- (BOOL)performKeyEquivalent:(NSEvent*)theEvent;
-@end
-
-#endif // ATOM_BROWSER_UI_COCOA_EVENT_PROCESSING_WINDOW_H_
+++ /dev/null
-// Copyright (c) 2013 GitHub, Inc.
-// Use of this source code is governed by the MIT license that can be
-// found in the LICENSE file.
-
-#import "atom/browser/ui/cocoa/event_processing_window.h"
-
-#include "base/logging.h"
-#import "content/public/browser/render_widget_host_view_mac_base.h"
-
-@interface EventProcessingWindow ()
-// Duplicate the given key event, but changing the associated window.
-- (NSEvent*)keyEventForWindow:(NSWindow*)window fromKeyEvent:(NSEvent*)event;
-@end
-
-@implementation EventProcessingWindow
-
-- (BOOL)redispatchKeyEvent:(NSEvent*)event {
- DCHECK(event);
- NSEventType eventType = [event type];
- if (eventType != NSKeyDown &&
- eventType != NSKeyUp &&
- eventType != NSFlagsChanged) {
- NOTREACHED();
- return YES; // Pretend it's been handled in an effort to limit damage.
- }
-
- // Ordinarily, the event's window should be this window. However, when
- // switching between normal and fullscreen mode, we switch out the window, and
- // the event's window might be the previous window (or even an earlier one if
- // the renderer is running slowly and several mode switches occur). In this
- // rare case, we synthesize a new key event so that its associate window
- // (number) is our own.
- if ([event window] != self)
- event = [self keyEventForWindow:self fromKeyEvent:event];
-
- // Redispatch the event.
- eventHandled_ = YES;
- redispatchingEvent_ = YES;
- [NSApp sendEvent:event];
- redispatchingEvent_ = NO;
-
- // If the event was not handled by [NSApp sendEvent:], the sendEvent:
- // method below will be called, and because |redispatchingEvent_| is YES,
- // |eventHandled_| will be set to NO.
- return eventHandled_;
-}
-
-- (void)sendEvent:(NSEvent*)event {
- if (!redispatchingEvent_)
- [super sendEvent:event];
- else
- eventHandled_ = NO;
-}
-
-- (NSEvent*)keyEventForWindow:(NSWindow*)window fromKeyEvent:(NSEvent*)event {
- NSEventType eventType = [event type];
-
- // Convert the event's location from the original window's coordinates into
- // our own.
- NSPoint eventLoc = [event locationInWindow];
- eventLoc = [self convertRectFromScreen:
- [[event window] convertRectToScreen:NSMakeRect(eventLoc.x, eventLoc.y, 0, 0)]].origin;
-
- // Various things *only* apply to key down/up.
- BOOL eventIsARepeat = NO;
- NSString* eventCharacters = nil;
- NSString* eventUnmodCharacters = nil;
- if (eventType == NSKeyDown || eventType == NSKeyUp) {
- eventIsARepeat = [event isARepeat];
- eventCharacters = [event characters];
- eventUnmodCharacters = [event charactersIgnoringModifiers];
- }
-
- // This synthesis may be slightly imperfect: we provide nil for the context,
- // since I (viettrungluu) am sceptical that putting in the original context
- // (if one is given) is valid.
- return [NSEvent keyEventWithType:eventType
- location:eventLoc
- modifierFlags:[event modifierFlags]
- timestamp:[event timestamp]
- windowNumber:[window windowNumber]
- context:nil
- characters:eventCharacters
- charactersIgnoringModifiers:eventUnmodCharacters
- isARepeat:eventIsARepeat
- keyCode:[event keyCode]];
-}
-
-
-- (BOOL)performKeyEquivalent:(NSEvent*)event {
- if (redispatchingEvent_)
- return NO;
-
- // Give the web site a chance to handle the event. If it doesn't want to
- // handle it, it will call us back with one of the |handle*| methods above.
- NSResponder* r = [self firstResponder];
- if ([r conformsToProtocol:@protocol(RenderWidgetHostViewMacBase)])
- return [r performKeyEquivalent:event];
-
- if ([super performKeyEquivalent:event])
- return YES;
-
- return NO;
-}
-
-@end // EventProcessingWindow
}
const char* TranslateToStock(int id, const std::string& text) {
- std::string lower = base::StringToLowerASCII(text);
+ std::string lower = base::ToLowerASCII(text);
if (lower == "cancel")
return GTK_STOCK_CANCEL;
else if (lower == "no")
int id;
};
CommonButtonID GetCommonID(const base::string16& button) {
- base::string16 lower = base::StringToLowerASCII(button);
+ base::string16 lower = base::ToLowerASCII(button);
if (lower == L"ok")
return { TDCBF_OK_BUTTON, IDOK };
else if (lower == L"yes")
XDisplay* xdisplay = gfx::GetXDisplay();
std::string type_prefix = "_NET_WM_WINDOW_TYPE_";
::Atom window_type = XInternAtom(
- xdisplay, (type_prefix + base::StringToUpperASCII(type)).c_str(), False);
+ xdisplay, (type_prefix + base::ToUpperASCII(type)).c_str(), False);
XChangeProperty(xdisplay, xwindow,
XInternAtom(xdisplay, "_NET_WM_WINDOW_TYPE", False),
XA_ATOM,
switches::kExperimentalCanvasFeatures },
{ options::kOverlayScrollbars,
switches::kOverlayScrollbars },
- { options::kOverlayFullscreenVideo,
- switches::kOverlayFullscreenVideo },
{ options::kSharedWorker,
switches::kSharedWorker },
{ options::kPageVisibility,
prefs->javascript_enabled = b;
if (self->web_preferences_.GetBoolean("images", &b))
prefs->images_enabled = b;
- if (self->web_preferences_.GetBoolean("java", &b))
- prefs->java_enabled = b;
if (self->web_preferences_.GetBoolean("textAreasAreResizable", &b))
prefs->text_areas_are_resizable = b;
if (self->web_preferences_.GetBoolean("webgl", &b))
// We don't try to convert string to float here because it is very very
// expensive.
for (unsigned i = 0; i < arraysize(kScaleFactorPairs); ++i) {
- if (base::EndsWith(filename, kScaleFactorPairs[i].name, true))
+ if (base::EndsWith(filename, kScaleFactorPairs[i].name,
+ base::CompareCase::INSENSITIVE_ASCII))
return kScaleFactorPairs[i].scale;
}
// Perform microtask checkpoint after running JavaScript.
scoped_ptr<blink::WebScopedRunV8Script> script_scope(
Locker::IsBrowserProcess() ?
- nullptr : new blink::WebScopedRunV8Script(isolate));
+ nullptr : new blink::WebScopedRunV8Script);
// Use node::MakeCallback to call the callback, and it will also run pending
// tasks in Node.js.
return node::MakeCallback(
std::vector<CrashReporter::UploadReportResult> result;
if (base::ReadFileToString(base::FilePath::FromUTF8Unsafe(path),
&file_content)) {
- std::vector<std::string> reports;
- base::SplitString(file_content, '\n', &reports);
+ std::vector<std::string> reports = base::SplitString(
+ file_content, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
for (const std::string& report : reports) {
- std::vector<std::string> report_item;
- base::SplitString(report, ',', &report_item);
+ std::vector<std::string> report_item = base::SplitString(
+ report, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
int report_time = 0;
if (report_item.size() >= 2 && base::StringToInt(report_item[0],
&report_time)) {
// static
CrashReporterLinux* CrashReporterLinux::GetInstance() {
- return Singleton<CrashReporterLinux>::get();
+ return base::Singleton<CrashReporterLinux>::get();
}
// static
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
+namespace base {
template <typename T> struct DefaultSingletonTraits;
+}
namespace google_breakpad {
class ExceptionHandler;
void SetUploadParameters() override;
private:
- friend struct DefaultSingletonTraits<CrashReporterLinux>;
+ friend struct base::DefaultSingletonTraits<CrashReporterLinux>;
CrashReporterLinux();
virtual ~CrashReporterLinux();
#include "base/strings/string_piece.h"
#include "vendor/crashpad/client/simple_string_dictionary.h"
+namespace base {
template <typename T> struct DefaultSingletonTraits;
+}
namespace crash_reporter {
void SetUploadParameters() override;
private:
- friend struct DefaultSingletonTraits<CrashReporterMac>;
+ friend struct base::DefaultSingletonTraits<CrashReporterMac>;
CrashReporterMac();
virtual ~CrashReporterMac();
// static
CrashReporterMac* CrashReporterMac::GetInstance() {
- return Singleton<CrashReporterMac>::get();
+ return base::Singleton<CrashReporterMac>::get();
}
// static
// static
CrashReporterWin* CrashReporterWin::GetInstance() {
- return Singleton<CrashReporterWin>::get();
+ return base::Singleton<CrashReporterWin>::get();
}
// static
#include "base/memory/scoped_ptr.h"
#include "vendor/breakpad/src/client/windows/handler/exception_handler.h"
+namespace base {
template <typename T> struct DefaultSingletonTraits;
+}
namespace crash_reporter {
int CrashForException(EXCEPTION_POINTERS* info);
private:
- friend struct DefaultSingletonTraits<CrashReporterWin>;
+ friend struct base::DefaultSingletonTraits<CrashReporterWin>;
CrashReporterWin();
virtual ~CrashReporterWin();
struct Converter<blink::WebInputEvent::Type> {
static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val,
blink::WebInputEvent::Type* out) {
- std::string type = base::StringToLowerASCII(V8ToString(val));
+ std::string type = base::ToLowerASCII(V8ToString(val));
if (type == "mousedown")
*out = blink::WebInputEvent::MouseDown;
else if (type == "mouseup")
struct Converter<blink::WebMouseEvent::Button> {
static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val,
blink::WebMouseEvent::Button* out) {
- std::string button = base::StringToLowerASCII(V8ToString(val));
+ std::string button = base::ToLowerASCII(V8ToString(val));
if (button == "left")
*out = blink::WebMouseEvent::Button::ButtonLeft;
else if (button == "middle")
struct Converter<blink::WebInputEvent::Modifiers> {
static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val,
blink::WebInputEvent::Modifiers* out) {
- std::string modifier = base::StringToLowerASCII(V8ToString(val));
+ std::string modifier = base::ToLowerASCII(V8ToString(val));
if (modifier == "shift")
*out = blink::WebInputEvent::ShiftKey;
else if (modifier == "control" || modifier == "ctrl")
out->windowsKeyCode = atom::KeyboardCodeFromCharCode(code, &shifted);
else if (dict.Get("keyCode", &identifier))
out->windowsKeyCode = atom::KeyboardCodeFromKeyIdentifier(
- base::StringToLowerASCII(identifier));
+ base::ToLowerASCII(identifier));
else
return false;
std::string screen_position;
if (dict.Get("screenPosition", &screen_position)) {
- screen_position = base::StringToLowerASCII(screen_position);
+ screen_position = base::ToLowerASCII(screen_position);
if (screen_position == "mobile")
out->screenPosition = blink::WebDeviceEmulationParams::Mobile;
else if (screen_position == "desktop")
return v8::Null(isolate);
scoped_ptr<blink::WebScopedRunV8Script> script_scope(
Locker::IsBrowserProcess() ?
- nullptr : new blink::WebScopedRunV8Script(isolate));
+ nullptr : new blink::WebScopedRunV8Script);
v8::Local<v8::Function> holder = function.NewHandle(isolate);
v8::Local<v8::Context> context = holder->CreationContext();
v8::Context::Scope context_scope(context);
return;
scoped_ptr<blink::WebScopedRunV8Script> script_scope(
Locker::IsBrowserProcess() ?
- nullptr : new blink::WebScopedRunV8Script(isolate));
+ nullptr : new blink::WebScopedRunV8Script);
v8::Local<v8::Function> holder = function.NewHandle(isolate);
v8::Local<v8::Context> context = holder->CreationContext();
v8::Context::Scope context_scope(context);
return ret;
scoped_ptr<blink::WebScopedRunV8Script> script_scope(
Locker::IsBrowserProcess() ?
- nullptr : new blink::WebScopedRunV8Script(isolate));
+ nullptr : new blink::WebScopedRunV8Script);
v8::Local<v8::Function> holder = function.NewHandle(isolate);
v8::Local<v8::Context> context = holder->CreationContext();
v8::Context::Scope context_scope(context);
// Perform microtask checkpoint after running JavaScript.
scoped_ptr<blink::WebScopedRunV8Script> script_scope(
- is_browser_ ? nullptr : new blink::WebScopedRunV8Script(env->isolate()));
+ is_browser_ ? nullptr : new blink::WebScopedRunV8Script);
// Deal with uv events.
int r = uv_run(uv_loop_, UV_RUN_NOWAIT);
const char kExperimentalFeatures[] = "experimentalFeatures";
const char kExperimentalCanvasFeatures[] = "experimentalCanvasFeatures";
const char kOverlayScrollbars[] = "overlayScrollbars";
-const char kOverlayFullscreenVideo[] = "overlayFullscreenVideo";
const char kSharedWorker[] = "sharedWorker";
} // namespace options
const char kExperimentalFeatures[] = "experimental-features";
const char kExperimentalCanvasFeatures[] = "experimental-canvas-features";
const char kOverlayScrollbars[] = "overlay-scrollbars";
-const char kOverlayFullscreenVideo[] = "overlay-fullscreen-video";
const char kSharedWorker[] = "shared-worker";
const char kPageVisibility[] = "page-visiblity";
extern const char kExperimentalFeatures[];
extern const char kExperimentalCanvasFeatures[];
extern const char kOverlayScrollbars[];
-extern const char kOverlayFullscreenVideo[];
extern const char kSharedWorker[];
extern const char kPageVisibility[];
extern const char kExperimentalFeatures[];
extern const char kExperimentalCanvasFeatures[];
extern const char kOverlayScrollbars[];
-extern const char kOverlayFullscreenVideo[];
extern const char kSharedWorker[];
extern const char kPageVisibility[];
blink::WebRuntimeFeatures::enableExperimentalCanvasFeatures(true);
if (IsSwitchEnabled(command_line, switches::kOverlayScrollbars))
blink::WebRuntimeFeatures::enableOverlayScrollbars(true);
- if (IsSwitchEnabled(command_line, switches::kOverlayFullscreenVideo))
- blink::WebRuntimeFeatures::enableOverlayFullscreenVideo(true);
if (IsSwitchEnabled(command_line, switches::kSharedWorker))
blink::WebRuntimeFeatures::enableSharedWorker(true);
}
// be CPU bound, the page overly complex/large or the system just
// memory-bound.
static const int kPrinterSettingsTimeout = 60000;
- base::OneShotTimer<base::MessageLoop> quit_timer;
+ base::OneShotTimer quit_timer;
quit_timer.Start(FROM_HERE,
TimeDelta::FromMilliseconds(kPrinterSettingsTimeout),
base::MessageLoop::current(), &base::MessageLoop::Quit);
// reads.
size_t bytes_read_;
- base::OneShotTimer<SocketReader> timer_;
+ base::OneShotTimer timer_;
DISALLOW_COPY_AND_ASSIGN(SocketReader);
};
// static
TtsControllerImpl* TtsControllerImpl::GetInstance() {
- return Singleton<TtsControllerImpl>::get();
+ return base::Singleton<TtsControllerImpl>::get();
}
TtsControllerImpl::TtsControllerImpl()
int GetMatchingVoice(const Utterance* utterance,
std::vector<VoiceData>& voices);
- friend struct DefaultSingletonTraits<TtsControllerImpl>;
+ friend struct base::DefaultSingletonTraits<TtsControllerImpl>;
// The current utterance being spoken.
Utterance* current_utterance_;
DISALLOW_COPY_AND_ASSIGN(TtsControllerImpl);
};
-#endif // CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_
\ No newline at end of file
+#endif // CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_
int last_char_index_;
bool paused_;
- friend struct DefaultSingletonTraits<TtsPlatformImplMac>;
+ friend struct base::DefaultSingletonTraits<TtsPlatformImplMac>;
DISALLOW_COPY_AND_ASSIGN(TtsPlatformImplMac);
};
// static
TtsPlatformImplMac* TtsPlatformImplMac::GetInstance() {
- return Singleton<TtsPlatformImplMac>::get();
+ return base::Singleton<TtsPlatformImplMac>::get();
}
@implementation ChromeTtsDelegate
#include "third_party/skia/include/core/SkMatrix.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkPoint.h"
-#include "third_party/skia/include/core/SkTemplates.h"
#include "third_party/skia/include/core/SkTypeface.h"
#include "ui/gfx/geometry/rect.h"
#include "url/gurl.h"
bool rejected = false;
while (header_iter.GetNext()) {
std::string lower_case_header_name =
- base::StringToLowerASCII(header_iter.name());
+ base::ToLowerASCII(header_iter.name());
if (!IsSimpleHeader(lower_case_header_name, header_iter.values())) {
rejected = true;
// on the page).
WebPreferences prefs = preferences;
prefs.javascript_enabled = false;
- prefs.java_enabled = false;
blink::WebView* web_view = blink::WebView::create(this);
owns_web_view_ = true;
* `allowRunningInsecureContent` Boolean - Allow a https page to run
JavaScript, CSS or plugins from http URLs. Default is `false`.
* `images` Boolean - Enables image support. Default is `true`.
- * `java` Boolean - Enables Java support. Default is `false`.
* `textAreasAreResizable` Boolean - Make TextArea elements resizable. Default
is `true`.
* `webgl` Boolean - Enables WebGL support. Default is `true`.
canvas features. Default is `false`.
* `overlayScrollbars` Boolean - Enables overlay scrollbars. Default is
`false`.
- * `overlayFullscreenVideo` Boolean - Enables overlay fullscreen video. Default
- is `false`
* `sharedWorker` Boolean - Enables Shared Worker support. Default is `false`.
* `directWrite` Boolean - Enables DirectWrite font rendering system on
Windows. Default is `true`.
'atom/browser/ui/atom_menu_model.h',
'atom/browser/ui/cocoa/atom_menu_controller.h',
'atom/browser/ui/cocoa/atom_menu_controller.mm',
- 'atom/browser/ui/cocoa/event_processing_window.h',
- 'atom/browser/ui/cocoa/event_processing_window.mm',
'atom/browser/ui/file_dialog.h',
'atom/browser/ui/file_dialog_gtk.cc',
'atom/browser/ui/file_dialog_mac.mm',
-Subproject commit 57842edb817cc1ae38a02fd7f266dd6aa3afbb45
+Subproject commit fff0f0e2d39886a49fce4f78aa3b625b880b3607