提交 1c68b123 编写于 作者: A Adam Barth

Reland "Remove more //base dependencies" (#2857)"

Hopefully this will build this time.
上级 15ee1fb7
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#ifndef SKY_ENGINE_BINDINGS_DART_MOJO_INTERNAL_H_ #ifndef SKY_ENGINE_BINDINGS_DART_MOJO_INTERNAL_H_
#define SKY_ENGINE_BINDINGS_DART_MOJO_INTERNAL_H_ #define SKY_ENGINE_BINDINGS_DART_MOJO_INTERNAL_H_
#include "base/macros.h" #include "lib/ftl/macros.h"
#include "mojo/public/cpp/system/handle.h" #include "mojo/public/cpp/system/handle.h"
namespace blink { namespace blink {
...@@ -17,7 +17,7 @@ class DartMojoInternal { ...@@ -17,7 +17,7 @@ class DartMojoInternal {
static void SetHandleWatcherProducerHandle(MojoHandle handle); static void SetHandleWatcherProducerHandle(MojoHandle handle);
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(DartMojoInternal); FTL_DISALLOW_IMPLICIT_CONSTRUCTORS(DartMojoInternal);
}; };
} // namespace blink } // namespace blink
......
...@@ -8,10 +8,6 @@ ...@@ -8,10 +8,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "base/bind.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/time/time.h"
#include "dart/runtime/bin/embedded_dart_io.h" #include "dart/runtime/bin/embedded_dart_io.h"
#include "dart/runtime/include/dart_api.h" #include "dart/runtime/include/dart_api.h"
#include "dart/runtime/include/dart_tools_api.h" #include "dart/runtime/include/dart_tools_api.h"
...@@ -23,6 +19,7 @@ ...@@ -23,6 +19,7 @@
#include "flutter/tonic/dart_library_natives.h" #include "flutter/tonic/dart_library_natives.h"
#include "flutter/tonic/dart_microtask_queue.h" #include "flutter/tonic/dart_microtask_queue.h"
#include "flutter/tonic/dart_state.h" #include "flutter/tonic/dart_state.h"
#include "lib/ftl/logging.h"
#include "sky/engine/core/script/ui_dart_state.h" #include "sky/engine/core/script/ui_dart_state.h"
#include "sky/engine/wtf/text/WTFString.h" #include "sky/engine/wtf/text/WTFString.h"
...@@ -86,7 +83,7 @@ static void InitDartInternal(Dart_Handle builtin_library, ...@@ -86,7 +83,7 @@ static void InitDartInternal(Dart_Handle builtin_library,
DART_CHECK_VALID(isolate_lib); DART_CHECK_VALID(isolate_lib);
DART_CHECK_VALID(Dart_Invoke(isolate_lib, method_name, 0, NULL)); DART_CHECK_VALID(Dart_Invoke(isolate_lib, method_name, 0, NULL));
} else { } else {
CHECK(isolate_type == DartRuntimeHooks::SecondaryIsolate); FTL_CHECK(isolate_type == DartRuntimeHooks::SecondaryIsolate);
Dart_Handle io_lib = Dart_LookupLibrary(ToDart("dart:io")); Dart_Handle io_lib = Dart_LookupLibrary(ToDart("dart:io"));
DART_CHECK_VALID(io_lib); DART_CHECK_VALID(io_lib);
Dart_Handle setup_hooks = Dart_NewStringFromCString("_setupHooks"); Dart_Handle setup_hooks = Dart_NewStringFromCString("_setupHooks");
...@@ -111,7 +108,7 @@ static void InitDartAsync(Dart_Handle builtin_library, ...@@ -111,7 +108,7 @@ static void InitDartAsync(Dart_Handle builtin_library,
schedule_microtask = schedule_microtask =
GetClosure(builtin_library, "_getScheduleMicrotaskClosure"); GetClosure(builtin_library, "_getScheduleMicrotaskClosure");
} else { } else {
CHECK(isolate_type == DartRuntimeHooks::SecondaryIsolate); FTL_CHECK(isolate_type == DartRuntimeHooks::SecondaryIsolate);
Dart_Handle isolate_lib = Dart_LookupLibrary(ToDart("dart:isolate")); Dart_Handle isolate_lib = Dart_LookupLibrary(ToDart("dart:isolate"));
Dart_Handle method_name = Dart_Handle method_name =
Dart_NewStringFromCString("_getIsolateScheduleImmediateClosure"); Dart_NewStringFromCString("_getIsolateScheduleImmediateClosure");
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
#ifndef SKY_ENGINE_BINDINGS_DART_RUNTIME_HOOKS_H_ #ifndef SKY_ENGINE_BINDINGS_DART_RUNTIME_HOOKS_H_
#define SKY_ENGINE_BINDINGS_DART_RUNTIME_HOOKS_H_ #define SKY_ENGINE_BINDINGS_DART_RUNTIME_HOOKS_H_
#include "base/macros.h"
#include "dart/runtime/include/dart_api.h" #include "dart/runtime/include/dart_api.h"
#include "flutter/tonic/dart_library_natives.h" #include "flutter/tonic/dart_library_natives.h"
#include "lib/ftl/macros.h"
namespace blink { namespace blink {
...@@ -22,7 +22,7 @@ class DartRuntimeHooks { ...@@ -22,7 +22,7 @@ class DartRuntimeHooks {
static void RegisterNatives(DartLibraryNatives* natives); static void RegisterNatives(DartLibraryNatives* natives);
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(DartRuntimeHooks); FTL_DISALLOW_IMPLICIT_CONSTRUCTORS(DartRuntimeHooks);
}; };
} // namespace blink } // namespace blink
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#ifndef SKY_ENGINE_BINDINGS_DART_UI_H_ #ifndef SKY_ENGINE_BINDINGS_DART_UI_H_
#define SKY_ENGINE_BINDINGS_DART_UI_H_ #define SKY_ENGINE_BINDINGS_DART_UI_H_
#include "base/macros.h" #include "lib/ftl/macros.h"
namespace blink { namespace blink {
...@@ -15,7 +15,7 @@ class DartUI { ...@@ -15,7 +15,7 @@ class DartUI {
static void InitForIsolate(); static void InitForIsolate();
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(DartUI); FTL_DISALLOW_IMPLICIT_CONSTRUCTORS(DartUI);
}; };
} // namespace blink } // namespace blink
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#define SKY_ENGINE_BINDINGS_MOJO_SERVICES_H_ #define SKY_ENGINE_BINDINGS_MOJO_SERVICES_H_
#include "dart/runtime/include/dart_api.h" #include "dart/runtime/include/dart_api.h"
#include "lib/ftl/macros.h"
#include "mojo/public/cpp/application/service_provider_impl.h" #include "mojo/public/cpp/application/service_provider_impl.h"
#include "mojo/public/interfaces/application/service_provider.mojom.h" #include "mojo/public/interfaces/application/service_provider.mojom.h"
#include "mojo/services/asset_bundle/interfaces/asset_bundle.mojom.h" #include "mojo/services/asset_bundle/interfaces/asset_bundle.mojom.h"
...@@ -51,7 +52,7 @@ class MojoServices { ...@@ -51,7 +52,7 @@ class MojoServices {
// https://github.com/domokit/mojo/issues/536 // https://github.com/domokit/mojo/issues/536
mojo::ServiceProviderPtr services_from_dart_; mojo::ServiceProviderPtr services_from_dart_;
MOJO_DISALLOW_COPY_AND_ASSIGN(MojoServices); FTL_DISALLOW_COPY_AND_ASSIGN(MojoServices);
}; };
} // namespace blink } // namespace blink
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
#include <memory> #include <memory>
#include "base/callback_forward.h" #include "base/callback_forward.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "dart/runtime/include/dart_api.h" #include "dart/runtime/include/dart_api.h"
#include "lib/ftl/macros.h"
#include "mojo/public/cpp/system/data_pipe.h" #include "mojo/public/cpp/system/data_pipe.h"
#include "sky/engine/wtf/OwnPtr.h" #include "sky/engine/wtf/OwnPtr.h"
#include "sky/engine/wtf/text/AtomicString.h" #include "sky/engine/wtf/text/AtomicString.h"
...@@ -55,7 +55,7 @@ class DartController { ...@@ -55,7 +55,7 @@ class DartController {
base::WeakPtrFactory<DartController> weak_factory_; base::WeakPtrFactory<DartController> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(DartController); FTL_DISALLOW_COPY_AND_ASSIGN(DartController);
}; };
} }
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
#include "dart_service_isolate.h" #include "dart_service_isolate.h"
#include "base/logging.h"
#include "dart/runtime/include/dart_api.h" #include "dart/runtime/include/dart_api.h"
#include "flutter/tonic/dart_converter.h" #include "flutter/tonic/dart_converter.h"
#include "flutter/tonic/dart_error.h" #include "flutter/tonic/dart_error.h"
#include "flutter/tonic/dart_library_natives.h" #include "flutter/tonic/dart_library_natives.h"
#include "lib/ftl/logging.h"
#include "sky/engine/core/script/embedder_resources.h" #include "sky/engine/core/script/embedder_resources.h"
#define RETURN_ERROR_HANDLE(handle) \ #define RETURN_ERROR_HANDLE(handle) \
...@@ -44,12 +44,12 @@ static int observatory_port_; ...@@ -44,12 +44,12 @@ static int observatory_port_;
Dart_NativeFunction GetNativeFunction(Dart_Handle name, Dart_NativeFunction GetNativeFunction(Dart_Handle name,
int argument_count, int argument_count,
bool* auto_setup_scope) { bool* auto_setup_scope) {
CHECK(g_natives); FTL_CHECK(g_natives);
return g_natives->GetNativeFunction(name, argument_count, auto_setup_scope); return g_natives->GetNativeFunction(name, argument_count, auto_setup_scope);
} }
const uint8_t* GetSymbol(Dart_NativeFunction native_function) { const uint8_t* GetSymbol(Dart_NativeFunction native_function) {
CHECK(g_natives); FTL_CHECK(g_natives);
return g_natives->GetSymbol(native_function); return g_natives->GetSymbol(native_function);
} }
...@@ -57,9 +57,9 @@ const uint8_t* GetSymbol(Dart_NativeFunction native_function) { ...@@ -57,9 +57,9 @@ const uint8_t* GetSymbol(Dart_NativeFunction native_function) {
void DartServiceIsolate::TriggerResourceLoad(Dart_NativeArguments args) { void DartServiceIsolate::TriggerResourceLoad(Dart_NativeArguments args) {
Dart_Handle library = Dart_RootLibrary(); Dart_Handle library = Dart_RootLibrary();
DCHECK(!Dart_IsError(library)); FTL_DCHECK(!Dart_IsError(library));
Dart_Handle result = LoadResources(library); Dart_Handle result = LoadResources(library);
DCHECK(!Dart_IsError(result)); FTL_DCHECK(!Dart_IsError(result));
} }
void DartServiceIsolate::NotifyServerState(Dart_NativeArguments args) { void DartServiceIsolate::NotifyServerState(Dart_NativeArguments args) {
...@@ -85,11 +85,11 @@ bool DartServiceIsolate::Startup(std::string server_ip, ...@@ -85,11 +85,11 @@ bool DartServiceIsolate::Startup(std::string server_ip,
bool disable_origin_check, bool disable_origin_check,
char** error) { char** error) {
Dart_Isolate isolate = Dart_CurrentIsolate(); Dart_Isolate isolate = Dart_CurrentIsolate();
CHECK(isolate); FTL_CHECK(isolate);
// Remember the embedder's library tag handler. // Remember the embedder's library tag handler.
g_embedder_tag_handler = embedder_tag_handler; g_embedder_tag_handler = embedder_tag_handler;
CHECK(g_embedder_tag_handler); FTL_CHECK(g_embedder_tag_handler);
// Setup native entries. // Setup native entries.
if (!g_natives) { if (!g_natives) {
...@@ -120,7 +120,7 @@ bool DartServiceIsolate::Startup(std::string server_ip, ...@@ -120,7 +120,7 @@ bool DartServiceIsolate::Startup(std::string server_ip,
Dart_SetLibraryTagHandler(DartServiceIsolate::LibraryTagHandler); Dart_SetLibraryTagHandler(DartServiceIsolate::LibraryTagHandler);
// Load main script. // Load main script.
Dart_Handle library = LoadScript(kServiceIsolateScript); Dart_Handle library = LoadScript(kServiceIsolateScript);
DCHECK(library != Dart_Null()); FTL_DCHECK(library != Dart_Null());
SHUTDOWN_ON_ERROR(library); SHUTDOWN_ON_ERROR(library);
// Setup native entry resolution. // Setup native entry resolution.
result = Dart_SetNativeResolver(library, GetNativeFunction, GetSymbol); result = Dart_SetNativeResolver(library, GetNativeFunction, GetSymbol);
...@@ -205,7 +205,7 @@ Dart_Handle DartServiceIsolate::LoadResource(Dart_Handle library, ...@@ -205,7 +205,7 @@ Dart_Handle DartServiceIsolate::LoadResource(Dart_Handle library,
const char* data_buffer = NULL; const char* data_buffer = NULL;
int data_buffer_length = g_resources->ResourceLookup(resource_name, int data_buffer_length = g_resources->ResourceLookup(resource_name,
&data_buffer); &data_buffer);
DCHECK(data_buffer_length != EmbedderResources::kNoSuchInstance); FTL_DCHECK(data_buffer_length != EmbedderResources::kNoSuchInstance);
Dart_Handle data_list = Dart_NewTypedData(Dart_TypedData_kUint8, Dart_Handle data_list = Dart_NewTypedData(Dart_TypedData_kUint8,
data_buffer_length); data_buffer_length);
RETURN_ERROR_HANDLE(data_list); RETURN_ERROR_HANDLE(data_list);
...@@ -216,9 +216,9 @@ Dart_Handle DartServiceIsolate::LoadResource(Dart_Handle library, ...@@ -216,9 +216,9 @@ Dart_Handle DartServiceIsolate::LoadResource(Dart_Handle library,
&data_list_buffer, &data_list_buffer,
&data_list_buffer_length); &data_list_buffer_length);
RETURN_ERROR_HANDLE(result); RETURN_ERROR_HANDLE(result);
DCHECK(data_buffer_length == data_list_buffer_length); FTL_DCHECK(data_buffer_length == data_list_buffer_length);
DCHECK(data_list_buffer != NULL); FTL_DCHECK(data_list_buffer != NULL);
DCHECK(type = Dart_TypedData_kUint8); FTL_DCHECK(type = Dart_TypedData_kUint8);
memmove(data_list_buffer, &data_buffer[0], data_buffer_length); memmove(data_list_buffer, &data_buffer[0], data_buffer_length);
result = Dart_TypedDataReleaseData(data_list); result = Dart_TypedDataReleaseData(data_list);
RETURN_ERROR_HANDLE(result); RETURN_ERROR_HANDLE(result);
...@@ -272,7 +272,7 @@ Dart_Handle DartServiceIsolate::LibraryTagHandler(Dart_LibraryTag tag, ...@@ -272,7 +272,7 @@ Dart_Handle DartServiceIsolate::LibraryTagHandler(Dart_LibraryTag tag,
// Embedder handles all requests for external libraries. // Embedder handles all requests for external libraries.
return g_embedder_tag_handler(tag, library, url); return g_embedder_tag_handler(tag, library, url);
} }
DCHECK((tag == Dart_kSourceTag) || (tag == Dart_kCanonicalizeUrl)); FTL_DCHECK((tag == Dart_kSourceTag) || (tag == Dart_kCanonicalizeUrl));
if (tag == Dart_kCanonicalizeUrl) { if (tag == Dart_kCanonicalizeUrl) {
// url is already canonicalized. // url is already canonicalized.
return url; return url;
......
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
#include "sky/engine/core/script/embedder_resources.h" #include "sky/engine/core/script/embedder_resources.h"
#include "base/logging.h" #include <string.h>
#include "lib/ftl/logging.h"
namespace blink { namespace blink {
...@@ -20,7 +22,7 @@ int EmbedderResources::ResourceLookup(const char* path, const char** resource) { ...@@ -20,7 +22,7 @@ int EmbedderResources::ResourceLookup(const char* path, const char** resource) {
const ResourcesEntry& entry = resources_table_[i]; const ResourcesEntry& entry = resources_table_[i];
if (strcmp(path, entry.path_) == 0) { if (strcmp(path, entry.path_) == 0) {
*resource = entry.resource_; *resource = entry.resource_;
DCHECK(entry.length_ > 0); FTL_DCHECK(entry.length_ > 0);
return entry.length_; return entry.length_;
} }
} }
...@@ -28,17 +30,17 @@ int EmbedderResources::ResourceLookup(const char* path, const char** resource) { ...@@ -28,17 +30,17 @@ int EmbedderResources::ResourceLookup(const char* path, const char** resource) {
} }
const char* EmbedderResources::Path(int idx) { const char* EmbedderResources::Path(int idx) {
DCHECK(idx >= 0); FTL_DCHECK(idx >= 0);
ResourcesEntry* entry = At(idx); ResourcesEntry* entry = At(idx);
if (entry == nullptr) { if (entry == nullptr) {
return nullptr; return nullptr;
} }
DCHECK(entry->path_ != nullptr); FTL_DCHECK(entry->path_ != nullptr);
return entry->path_; return entry->path_;
} }
ResourcesEntry* EmbedderResources::At(int idx) { ResourcesEntry* EmbedderResources::At(int idx) {
DCHECK(idx >= 0); FTL_DCHECK(idx >= 0);
for (int i = 0; resources_table_[i].path_ != nullptr; i++) { for (int i = 0; resources_table_[i].path_ != nullptr; i++) {
if (idx == i) { if (idx == i) {
return &resources_table_[i]; return &resources_table_[i];
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
#include "sky/engine/core/text/TextBox.h" #include "sky/engine/core/text/TextBox.h"
#include "base/logging.h"
#include "flutter/tonic/dart_class_library.h" #include "flutter/tonic/dart_class_library.h"
#include "flutter/tonic/dart_error.h" #include "flutter/tonic/dart_error.h"
#include "lib/ftl/logging.h"
#include "sky/engine/core/script/ui_dart_state.h" #include "sky/engine/core/script/ui_dart_state.h"
namespace blink { namespace blink {
...@@ -17,7 +17,7 @@ Dart_Handle DartConverter<TextBox>::ToDart(const TextBox& val) { ...@@ -17,7 +17,7 @@ Dart_Handle DartConverter<TextBox>::ToDart(const TextBox& val) {
DartClassLibrary& class_library = DartState::Current()->class_library(); DartClassLibrary& class_library = DartState::Current()->class_library();
Dart_Handle type = Dart_HandleFromPersistent( Dart_Handle type = Dart_HandleFromPersistent(
class_library.GetClass("ui", "TextBox")); class_library.GetClass("ui", "TextBox"));
DCHECK(!LogIfError(type)); FTL_DCHECK(!LogIfError(type));
const int argc = 5; const int argc = 5;
Dart_Handle argv[argc] = { Dart_Handle argv[argc] = {
blink::ToDart(val.sk_rect.fLeft), blink::ToDart(val.sk_rect.fLeft),
......
...@@ -6,23 +6,24 @@ ...@@ -6,23 +6,24 @@
#include <memory> #include <memory>
#include "base/lazy_instance.h" #include "lib/ftl/logging.h"
#include "base/logging.h"
namespace blink { namespace blink {
namespace {
static base::LazyInstance<SkySettings> s_settings = LAZY_INSTANCE_INITIALIZER; SkySettings* g_settings = nullptr;
static bool s_have_settings = false; } // namespace
const SkySettings& SkySettings::Get() { const SkySettings& SkySettings::Get() {
return s_settings.Get(); FTL_CHECK(g_settings);
return *g_settings;
} }
void SkySettings::Set(const SkySettings& settings) { void SkySettings::Set(const SkySettings& settings) {
CHECK(!s_have_settings); FTL_CHECK(!g_settings);
s_settings.Get() = settings; g_settings = new SkySettings();
s_have_settings = true; *g_settings = settings;
} }
} // namespace blink } // namespace blink
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
#include "sky/engine/platform/fonts/SegmentedFontData.h" #include "sky/engine/platform/fonts/SegmentedFontData.h"
#include "sky/engine/wtf/unicode/CharacterNames.h" #include "sky/engine/wtf/unicode/CharacterNames.h"
#include "base/logging.h"
namespace blink { namespace blink {
FontFallbackList::FontFallbackList() FontFallbackList::FontFallbackList()
......
...@@ -33,12 +33,12 @@ ...@@ -33,12 +33,12 @@
#import <CoreText/CoreText.h> #import <CoreText/CoreText.h>
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#include "sky/engine/platform/fonts/FontCache.h"
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/mac/scoped_nsobject.h"
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/mac/scoped_nsobject.h"
#include "lib/ftl/macros.h"
#include "sky/engine/platform/fonts/FontCache.h"
namespace blink { namespace blink {
...@@ -129,7 +129,7 @@ class FontFallbackSelector { ...@@ -129,7 +129,7 @@ class FontFallbackSelector {
private: private:
CFRef<CTFontRef> _prototype; CFRef<CTFontRef> _prototype;
DISALLOW_COPY_AND_ASSIGN(FontFallbackSelector); FTL_DISALLOW_COPY_AND_ASSIGN(FontFallbackSelector);
}; };
static base::LazyInstance<FontFallbackSelector> g_fallback_selector = static base::LazyInstance<FontFallbackSelector> g_fallback_selector =
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <memory> #include <memory>
#include "base/bind.h" #include "base/bind.h"
#include "lib/ftl/macros.h"
#include "mojo/data_pipe_utils/data_pipe_drainer.h" #include "mojo/data_pipe_utils/data_pipe_drainer.h"
#include "sky/engine/platform/mojo/data_pipe.h" #include "sky/engine/platform/mojo/data_pipe.h"
#include "sky/engine/public/platform/Platform.h" #include "sky/engine/public/platform/Platform.h"
...@@ -41,7 +42,7 @@ class DrainJob : public mojo::common::DataPipeDrainer::Client { ...@@ -41,7 +42,7 @@ class DrainJob : public mojo::common::DataPipeDrainer::Client {
RefPtr<SharedBuffer> buffer_; RefPtr<SharedBuffer> buffer_;
std::unique_ptr<mojo::common::DataPipeDrainer> drainer_; std::unique_ptr<mojo::common::DataPipeDrainer> drainer_;
DISALLOW_COPY_AND_ASSIGN(DrainJob); FTL_DISALLOW_COPY_AND_ASSIGN(DrainJob);
}; };
} // namespace } // namespace
......
...@@ -20,7 +20,7 @@ std::unique_ptr<SkyView> SkyView::Create(SkyViewClient* client) { ...@@ -20,7 +20,7 @@ std::unique_ptr<SkyView> SkyView::Create(SkyViewClient* client) {
} }
SkyView::SkyView(SkyViewClient* client) SkyView::SkyView(SkyViewClient* client)
: client_(client), weak_factory_(this) {} : client_(client) {}
SkyView::~SkyView() {} SkyView::~SkyView() {}
......
...@@ -7,9 +7,8 @@ ...@@ -7,9 +7,8 @@
#include <memory> #include <memory>
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "flow/layers/layer_tree.h" #include "flow/layers/layer_tree.h"
#include "lib/ftl/macros.h"
#include "mojo/public/cpp/system/data_pipe.h" #include "mojo/public/cpp/system/data_pipe.h"
#include "mojo/services/network/interfaces/url_loader.mojom.h" #include "mojo/services/network/interfaces/url_loader.mojom.h"
#include "sky/engine/bindings/flutter_dart_state.h" #include "sky/engine/bindings/flutter_dart_state.h"
...@@ -71,9 +70,7 @@ class SkyView : public WindowClient, public IsolateClient { ...@@ -71,9 +70,7 @@ class SkyView : public WindowClient, public IsolateClient {
std::string country_code_; std::string country_code_;
std::unique_ptr<DartController> dart_controller_; std::unique_ptr<DartController> dart_controller_;
base::WeakPtrFactory<SkyView> weak_factory_; FTL_DISALLOW_COPY_AND_ASSIGN(SkyView);
DISALLOW_COPY_AND_ASSIGN(SkyView);
}; };
} // namespace blink } // namespace blink
......
...@@ -187,6 +187,10 @@ component("wtf") { ...@@ -187,6 +187,10 @@ component("wtf") {
direct_dependent_configs = [ "//sky/engine:features" ] direct_dependent_configs = [ "//sky/engine:features" ]
public_deps = [
"//lib/ftl",
]
deps = [ deps = [
"//base", "//base",
"//third_party/icu", "//third_party/icu",
......
...@@ -135,7 +135,7 @@ namespace double_conversion { ...@@ -135,7 +135,7 @@ namespace double_conversion {
// The Bignum's value equals value(bigits_) * 2^(exponent_ * kBigitSize). // The Bignum's value equals value(bigits_) * 2^(exponent_ * kBigitSize).
int exponent_; int exponent_;
DISALLOW_COPY_AND_ASSIGN(Bignum); FTL_DISALLOW_COPY_AND_ASSIGN(Bignum);
}; };
} // namespace double_conversion } // namespace double_conversion
......
...@@ -355,7 +355,7 @@ namespace double_conversion { ...@@ -355,7 +355,7 @@ namespace double_conversion {
const int max_leading_padding_zeroes_in_precision_mode_; const int max_leading_padding_zeroes_in_precision_mode_;
const int max_trailing_padding_zeroes_in_precision_mode_; const int max_trailing_padding_zeroes_in_precision_mode_;
DISALLOW_IMPLICIT_CONSTRUCTORS(DoubleToStringConverter); FTL_DISALLOW_IMPLICIT_CONSTRUCTORS(DoubleToStringConverter);
}; };
...@@ -367,7 +367,7 @@ namespace double_conversion { ...@@ -367,7 +367,7 @@ namespace double_conversion {
static double StringToDouble(const char* buffer, size_t length, size_t* processed_characters_count); static double StringToDouble(const char* buffer, size_t length, size_t* processed_characters_count);
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(StringToDoubleConverter); FTL_DISALLOW_IMPLICIT_CONSTRUCTORS(StringToDoubleConverter);
}; };
} // namespace double_conversion } // namespace double_conversion
......
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
#define SKY_ENGINE_WTF_DTOA_UTILS_H_ #define SKY_ENGINE_WTF_DTOA_UTILS_H_
#include <string.h> #include <string.h>
#include "base/macros.h"
#include "lib/ftl/macros.h"
#include "sky/engine/wtf/Assertions.h" #include "sky/engine/wtf/Assertions.h"
#define UNIMPLEMENTED ASSERT_NOT_REACHED #define UNIMPLEMENTED ASSERT_NOT_REACHED
...@@ -220,7 +221,7 @@ namespace double_conversion { ...@@ -220,7 +221,7 @@ namespace double_conversion {
bool is_finalized() const { return position_ < 0; } bool is_finalized() const { return position_ < 0; }
DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder); FTL_DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder);
}; };
// The type-based aliasing rule allows the compiler to assume that pointers of // The type-based aliasing rule allows the compiler to assume that pointers of
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册