blob: eb4d07d41b6406379095a146a3c8cb862093eb80 [file] [log] [blame]
skyostilfe116162016-02-26 20:53:331// Copyright 2015 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef HEADLESS_LIB_HEADLESS_CONTENT_CLIENT_H_
6#define HEADLESS_LIB_HEADLESS_CONTENT_CLIENT_H_
7
8#include "content/public/common/content_client.h"
9#include "headless/public/headless_browser.h"
10
11namespace headless {
12
13class HeadlessContentClient : public content::ContentClient {
14 public:
skyostilb5ee71202016-05-25 11:54:2215 explicit HeadlessContentClient(HeadlessBrowser::Options* options);
skyostilfe116162016-02-26 20:53:3316 ~HeadlessContentClient() override;
17
18 // content::ContentClient implementation:
eseckler38ff88e2017-02-27 11:17:1819 std::string GetProduct() const override;
skyostilfe116162016-02-26 20:53:3320 std::string GetUserAgent() const override;
21 base::string16 GetLocalizedString(int message_id) const override;
22 base::StringPiece GetDataResource(
23 int resource_id,
24 ui::ScaleFactor scale_factor) const override;
smaiera737aa3a2016-05-25 20:17:5725 base::RefCountedMemory* GetDataResourceBytes(
skyostilfe116162016-02-26 20:53:3326 int resource_id) const override;
27 gfx::Image& GetNativeImageNamed(int resource_id) const override;
28
29 private:
skyostilb5ee71202016-05-25 11:54:2230 HeadlessBrowser::Options* options_; // Not owned.
skyostilfe116162016-02-26 20:53:3331
32 DISALLOW_COPY_AND_ASSIGN(HeadlessContentClient);
33};
34
35} // namespace headless
36
37#endif // HEADLESS_LIB_HEADLESS_CONTENT_CLIENT_H_