Skip to content

Commit

Permalink
Rename the blink namespace to flutter. (flutter#8517)
Browse files Browse the repository at this point in the history
Some components in the Flutter engine were derived from the forked blink codebase. While the forked components have either been removed or rewritten, the use of the blink namespace has mostly (and inconsistently) remained. This renames the blink namesapce to flutter for consistency. There are no functional changes in this patch.
  • Loading branch information
chinmaygarde authored Apr 9, 2019
1 parent fff80a0 commit eec74e5
Show file tree
Hide file tree
Showing 211 changed files with 932 additions and 915 deletions.
8 changes: 4 additions & 4 deletions assets/asset_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "flutter/assets/directory_asset_bundle.h"
#include "flutter/fml/trace_event.h"

namespace blink {
namespace flutter {

AssetManager::AssetManager() = default;

Expand All @@ -29,7 +29,7 @@ void AssetManager::PushBack(std::unique_ptr<AssetResolver> resolver) {
resolvers_.push_back(std::move(resolver));
}

// |blink::AssetResolver|
// |flutter::AssetResolver|
std::unique_ptr<fml::Mapping> AssetManager::GetAsMapping(
const std::string& asset_name) const {
if (asset_name.size() == 0) {
Expand All @@ -47,9 +47,9 @@ std::unique_ptr<fml::Mapping> AssetManager::GetAsMapping(
return nullptr;
}

// |blink::AssetResolver|
// |flutter::AssetResolver|
bool AssetManager::IsValid() const {
return resolvers_.size() > 0;
}

} // namespace blink
} // namespace flutter
8 changes: 4 additions & 4 deletions assets/asset_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "flutter/fml/macros.h"
#include "flutter/fml/memory/ref_counted.h"

namespace blink {
namespace flutter {

class AssetManager final : public AssetResolver {
public:
Expand All @@ -25,10 +25,10 @@ class AssetManager final : public AssetResolver {

void PushBack(std::unique_ptr<AssetResolver> resolver);

// |blink::AssetResolver|
// |flutter::AssetResolver|
bool IsValid() const override;

// |blink::AssetResolver|
// |flutter::AssetResolver|
std::unique_ptr<fml::Mapping> GetAsMapping(
const std::string& asset_name) const override;

Expand All @@ -38,6 +38,6 @@ class AssetManager final : public AssetResolver {
FML_DISALLOW_COPY_AND_ASSIGN(AssetManager);
};

} // namespace blink
} // namespace flutter

#endif // FLUTTER_ASSETS_ASSET_MANAGER_H_
4 changes: 2 additions & 2 deletions assets/asset_resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "flutter/fml/macros.h"
#include "flutter/fml/mapping.h"

namespace blink {
namespace flutter {

class AssetResolver {
public:
Expand All @@ -29,6 +29,6 @@ class AssetResolver {
FML_DISALLOW_COPY_AND_ASSIGN(AssetResolver);
};

} // namespace blink
} // namespace flutter

#endif // FLUTTER_ASSETS_ASSET_RESOLVER_H_
8 changes: 4 additions & 4 deletions assets/directory_asset_bundle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "flutter/fml/file.h"
#include "flutter/fml/mapping.h"

namespace blink {
namespace flutter {

DirectoryAssetBundle::DirectoryAssetBundle(fml::UniqueFD descriptor)
: descriptor_(std::move(descriptor)) {
Expand All @@ -22,12 +22,12 @@ DirectoryAssetBundle::DirectoryAssetBundle(fml::UniqueFD descriptor)

DirectoryAssetBundle::~DirectoryAssetBundle() = default;

// |blink::AssetResolver|
// |flutter::AssetResolver|
bool DirectoryAssetBundle::IsValid() const {
return is_valid_;
}

// |blink::AssetResolver|
// |flutter::AssetResolver|
std::unique_ptr<fml::Mapping> DirectoryAssetBundle::GetAsMapping(
const std::string& asset_name) const {
if (!is_valid_) {
Expand All @@ -45,4 +45,4 @@ std::unique_ptr<fml::Mapping> DirectoryAssetBundle::GetAsMapping(
return mapping;
}

} // namespace blink
} // namespace flutter
8 changes: 4 additions & 4 deletions assets/directory_asset_bundle.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "flutter/fml/memory/ref_counted.h"
#include "flutter/fml/unique_fd.h"

namespace blink {
namespace flutter {

class DirectoryAssetBundle : public AssetResolver {
public:
Expand All @@ -22,16 +22,16 @@ class DirectoryAssetBundle : public AssetResolver {
const fml::UniqueFD descriptor_;
bool is_valid_ = false;

// |blink::AssetResolver|
// |flutter::AssetResolver|
bool IsValid() const override;

// |blink::AssetResolver|
// |flutter::AssetResolver|
std::unique_ptr<fml::Mapping> GetAsMapping(
const std::string& asset_name) const override;

FML_DISALLOW_COPY_AND_ASSIGN(DirectoryAssetBundle);
};

} // namespace blink
} // namespace flutter

#endif // FLUTTER_ASSETS_DIRECTORY_ASSET_BUNDLE_H_
8 changes: 4 additions & 4 deletions assets/zip_asset_store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include "flutter/fml/trace_event.h"

namespace blink {
namespace flutter {

void UniqueUnzipperTraits::Free(void* file) {
unzClose(file);
Expand All @@ -33,12 +33,12 @@ UniqueUnzipper ZipAssetStore::CreateUnzipper() const {
return UniqueUnzipper{::unzOpen2(file_path_.c_str(), nullptr)};
}

// |blink::AssetResolver|
// |flutter::AssetResolver|
bool ZipAssetStore::IsValid() const {
return stat_cache_.size() > 0;
}

// |blink::AssetResolver|
// |flutter::AssetResolver|
std::unique_ptr<fml::Mapping> ZipAssetStore::GetAsMapping(
const std::string& asset_name) const {
TRACE_EVENT1("flutter", "ZipAssetStore::GetAsMapping", "name",
Expand Down Expand Up @@ -126,4 +126,4 @@ void ZipAssetStore::BuildStatCache() {
} while (unzGoToNextFile(unzipper.get()) == UNZ_OK);
}

} // namespace blink
} // namespace flutter
8 changes: 4 additions & 4 deletions assets/zip_asset_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "flutter/fml/macros.h"
#include "third_party/zlib/contrib/minizip/unzip.h"

namespace blink {
namespace flutter {

struct UniqueUnzipperTraits {
static inline void* InvalidValue() { return nullptr; }
Expand Down Expand Up @@ -40,10 +40,10 @@ class ZipAssetStore final : public AssetResolver {

mutable std::map<std::string, CacheEntry> stat_cache_;

// |blink::AssetResolver|
// |flutter::AssetResolver|
bool IsValid() const override;

// |blink::AssetResolver|
// |flutter::AssetResolver|
std::unique_ptr<fml::Mapping> GetAsMapping(
const std::string& asset_name) const override;

Expand All @@ -54,6 +54,6 @@ class ZipAssetStore final : public AssetResolver {
FML_DISALLOW_COPY_AND_ASSIGN(ZipAssetStore);
};

} // namespace blink
} // namespace flutter

#endif // FLUTTER_ASSETS_ZIP_ASSET_STORE_H_
4 changes: 2 additions & 2 deletions common/settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <sstream>

namespace blink {
namespace flutter {

Settings::Settings() = default;

Expand Down Expand Up @@ -54,4 +54,4 @@ std::string Settings::ToString() const {
return stream.str();
}

} // namespace blink
} // namespace flutter
4 changes: 2 additions & 2 deletions common/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "flutter/fml/mapping.h"
#include "flutter/fml/unique_fd.h"

namespace blink {
namespace flutter {

using TaskObserverAdd =
std::function<void(intptr_t /* key */, fml::closure /* callback */)>;
Expand Down Expand Up @@ -145,6 +145,6 @@ struct Settings {
std::string ToString() const;
};

} // namespace blink
} // namespace flutter

#endif // FLUTTER_COMMON_SETTINGS_H_
4 changes: 2 additions & 2 deletions common/task_runners.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <utility>

namespace blink {
namespace flutter {

TaskRunners::TaskRunners(std::string label,
fml::RefPtr<fml::TaskRunner> platform,
Expand Down Expand Up @@ -47,4 +47,4 @@ bool TaskRunners::IsValid() const {
return platform_ && gpu_ && ui_ && io_;
}

} // namespace blink
} // namespace flutter
4 changes: 2 additions & 2 deletions common/task_runners.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "flutter/fml/macros.h"
#include "flutter/fml/task_runner.h"

namespace blink {
namespace flutter {

class TaskRunners {
public:
Expand Down Expand Up @@ -44,6 +44,6 @@ class TaskRunners {
fml::RefPtr<fml::TaskRunner> io_;
};

} // namespace blink
} // namespace flutter

#endif // FLUTTER_COMMON_TASK_RUNNERS_H_
4 changes: 2 additions & 2 deletions common/version/version.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "flutter/common/version/version.h"

namespace blink {
namespace flutter {

const char* GetFlutterEngineVersion() {
return FLUTTER_ENGINE_VERSION;
Expand All @@ -18,4 +18,4 @@ const char* GetDartVersion() {
return DART_VERSION;
}

} // namespace blink
} // namespace flutter
4 changes: 2 additions & 2 deletions common/version/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
#ifndef FLUTTER_COMMON_VERSION_VERSION_H_
#define FLUTTER_COMMON_VERSION_VERSION_H_

namespace blink {
namespace flutter {

const char* GetFlutterEngineVersion();

const char* GetSkiaVersion();

const char* GetDartVersion();

} // namespace blink
} // namespace flutter

#endif // FLUTTER_COMMON_VERSION_VERSION_H_
4 changes: 2 additions & 2 deletions lib/io/dart_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

using tonic::ToDart;

namespace blink {
namespace flutter {

void DartIO::InitForIsolate() {
Dart_Handle result = Dart_SetNativeResolver(
Expand All @@ -25,4 +25,4 @@ bool DartIO::EntropySource(uint8_t* buffer, intptr_t length) {
return dart::bin::GetEntropy(buffer, length);
}

} // namespace blink
} // namespace flutter
4 changes: 2 additions & 2 deletions lib/io/dart_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "flutter/fml/macros.h"

namespace blink {
namespace flutter {

class DartIO {
public:
Expand All @@ -20,6 +20,6 @@ class DartIO {
FML_DISALLOW_IMPLICIT_CONSTRUCTORS(DartIO);
};

} // namespace blink
} // namespace flutter

#endif // FLUTTER_LIB_IO_DART_IO_H_
4 changes: 2 additions & 2 deletions lib/ui/compositing/scene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "third_party/tonic/dart_binding_macros.h"
#include "third_party/tonic/dart_library_natives.h"

namespace blink {
namespace flutter {

IMPLEMENT_WRAPPERTYPEINFO(ui, Scene);

Expand Down Expand Up @@ -72,4 +72,4 @@ std::unique_ptr<flow::LayerTree> Scene::takeLayerTree() {
return std::move(m_layerTree);
}

} // namespace blink
} // namespace flutter
4 changes: 2 additions & 2 deletions lib/ui/compositing/scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic

namespace blink {
namespace flutter {

class Scene : public RefCountedDartWrappable<Scene> {
DEFINE_WRAPPERTYPEINFO();
Expand Down Expand Up @@ -48,6 +48,6 @@ class Scene : public RefCountedDartWrappable<Scene> {
std::unique_ptr<flow::LayerTree> m_layerTree;
};

} // namespace blink
} // namespace flutter

#endif // FLUTTER_LIB_UI_COMPOSITING_SCENE_H_
4 changes: 2 additions & 2 deletions lib/ui/compositing/scene_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "flutter/flow/layers/child_scene_layer.h"
#endif

namespace blink {
namespace flutter {

static void SceneBuilder_constructor(Dart_NativeArguments args) {
DartCallConstructor(&SceneBuilder::create, args);
Expand Down Expand Up @@ -327,4 +327,4 @@ void SceneBuilder::PushLayer(std::shared_ptr<flow::ContainerLayer> layer) {
current_layer_ = newLayer;
}

} // namespace blink
} // namespace flutter
4 changes: 2 additions & 2 deletions lib/ui/compositing/scene_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "flutter/lib/ui/compositing/scene_host.h"
#endif

namespace blink {
namespace flutter {

class SceneBuilder : public RefCountedDartWrappable<SceneBuilder> {
DEFINE_WRAPPERTYPEINFO();
Expand Down Expand Up @@ -120,6 +120,6 @@ class SceneBuilder : public RefCountedDartWrappable<SceneBuilder> {
FML_DISALLOW_COPY_AND_ASSIGN(SceneBuilder);
};

} // namespace blink
} // namespace flutter

#endif // FLUTTER_LIB_UI_COMPOSITING_SCENE_BUILDER_H_
Loading

0 comments on commit eec74e5

Please sign in to comment.