Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1249)

Unified Diff: mojo/services/html_viewer/mock_web_blob_registry_impl.h

Issue 1099303002: Move html_viewer from mojo/services to components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/services/html_viewer/mock_web_blob_registry_impl.h
diff --git a/mojo/services/html_viewer/mock_web_blob_registry_impl.h b/mojo/services/html_viewer/mock_web_blob_registry_impl.h
deleted file mode 100644
index feae9d035b6e7edbeec7e8d3058580cba90ebe02..0000000000000000000000000000000000000000
--- a/mojo/services/html_viewer/mock_web_blob_registry_impl.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2015 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.
-
-#ifndef MOJO_SERVICES_HTML_VIEWER_MOCK_WEB_BLOB_REGISTRY_IMPL_H_
-#define MOJO_SERVICES_HTML_VIEWER_MOCK_WEB_BLOB_REGISTRY_IMPL_H_
-
-#include <map>
-
-#include "base/containers/scoped_ptr_hash_map.h"
-#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
-#include "third_party/WebKit/public/platform/WebBlobData.h"
-#include "third_party/WebKit/public/platform/WebBlobRegistry.h"
-#include "third_party/WebKit/public/platform/WebVector.h"
-
-namespace html_viewer {
-
-// TODO(erg): For now, this is a just a copy of content's testing
-// mock. Eventually, this should be turned into a real implementation, but this
-// at least lets us get github working.
-class MockWebBlobRegistryImpl : public blink::WebBlobRegistry {
- public:
- MockWebBlobRegistryImpl();
- virtual ~MockWebBlobRegistryImpl();
-
- virtual void registerBlobData(const blink::WebString& uuid,
- const blink::WebBlobData& data);
- virtual void addBlobDataRef(const blink::WebString& uuid);
- virtual void removeBlobDataRef(const blink::WebString& uuid);
- virtual void registerPublicBlobURL(const blink::WebURL&,
- const blink::WebString& uuid);
- virtual void revokePublicBlobURL(const blink::WebURL&);
-
- // Additional support for Streams.
- virtual void registerStreamURL(const blink::WebURL& url,
- const blink::WebString& content_type);
- virtual void registerStreamURL(const blink::WebURL& url,
- const blink::WebURL& src_url);
- virtual void addDataToStream(const blink::WebURL& url,
- const char* data,
- size_t length);
- virtual void flushStream(const blink::WebURL& url);
- virtual void finalizeStream(const blink::WebURL& url);
- virtual void abortStream(const blink::WebURL& url);
- virtual void unregisterStreamURL(const blink::WebURL& url);
-
- bool GetUUIDForURL(const blink::WebURL& url, blink::WebString* uuid) const;
- bool GetBlobItems(const blink::WebString& uuid,
- blink::WebVector<blink::WebBlobData::Item*>* items) const;
-
- private:
- base::ScopedPtrHashMap<std::string, ScopedVector<blink::WebBlobData::Item>>
- blob_data_items_map_;
- std::map<std::string, int> blob_ref_count_map_;
-
- std::map<std::string, blink::WebString> public_url_to_uuid_;
-
- DISALLOW_COPY_AND_ASSIGN(MockWebBlobRegistryImpl);
-};
-
-} // namespace html_viewer
-
-#endif // MOJO_SERVICES_HTML_VIEWER_MOCK_WEB_BLOB_REGISTRY_IMPL_H_
« no previous file with comments | « mojo/services/html_viewer/html_viewer_version.rc ('k') | mojo/services/html_viewer/mock_web_blob_registry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698