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

Unified Diff: headless/lib/headless_content_client.h

Issue 1674263002: headless: Initial headless embedder API implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fine, no console logging Mr. Presubmit. Created 4 years, 10 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
« no previous file with comments | « headless/lib/headless_browser_browsertest.cc ('k') | headless/lib/headless_content_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/lib/headless_content_client.h
diff --git a/headless/lib/headless_content_client.h b/headless/lib/headless_content_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..2fc816353890c9d650e054cfc5528c7cbcdc4411
--- /dev/null
+++ b/headless/lib/headless_content_client.h
@@ -0,0 +1,36 @@
+// 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 HEADLESS_LIB_HEADLESS_CONTENT_CLIENT_H_
+#define HEADLESS_LIB_HEADLESS_CONTENT_CLIENT_H_
+
+#include "content/public/common/content_client.h"
+#include "headless/public/headless_browser.h"
+
+namespace headless {
+
+class HeadlessContentClient : public content::ContentClient {
+ public:
+ explicit HeadlessContentClient(const HeadlessBrowser::Options& options);
+ ~HeadlessContentClient() override;
+
+ // content::ContentClient implementation:
+ std::string GetUserAgent() const override;
+ base::string16 GetLocalizedString(int message_id) const override;
+ base::StringPiece GetDataResource(
+ int resource_id,
+ ui::ScaleFactor scale_factor) const override;
+ base::RefCountedStaticMemory* GetDataResourceBytes(
+ int resource_id) const override;
+ gfx::Image& GetNativeImageNamed(int resource_id) const override;
+
+ private:
+ HeadlessBrowser::Options options_;
+
+ DISALLOW_COPY_AND_ASSIGN(HeadlessContentClient);
+};
+
+} // namespace headless
+
+#endif // HEADLESS_LIB_HEADLESS_CONTENT_CLIENT_H_
« no previous file with comments | « headless/lib/headless_browser_browsertest.cc ('k') | headless/lib/headless_content_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698