OLD | NEW |
(Empty) | |
| 1 // 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 |
| 11 namespace headless { |
| 12 |
| 13 class HeadlessContentClient : public content::ContentClient { |
| 14 public: |
| 15 explicit HeadlessContentClient(const HeadlessBrowser::Options& options); |
| 16 ~HeadlessContentClient() override; |
| 17 |
| 18 // content::ContentClient implementation: |
| 19 std::string GetUserAgent() const override; |
| 20 base::string16 GetLocalizedString(int message_id) const override; |
| 21 base::StringPiece GetDataResource( |
| 22 int resource_id, |
| 23 ui::ScaleFactor scale_factor) const override; |
| 24 base::RefCountedStaticMemory* GetDataResourceBytes( |
| 25 int resource_id) const override; |
| 26 gfx::Image& GetNativeImageNamed(int resource_id) const override; |
| 27 |
| 28 private: |
| 29 HeadlessBrowser::Options options_; |
| 30 |
| 31 DISALLOW_COPY_AND_ASSIGN(HeadlessContentClient); |
| 32 }; |
| 33 |
| 34 } // namespace headless |
| 35 |
| 36 #endif // HEADLESS_LIB_HEADLESS_CONTENT_CLIENT_H_ |
OLD | NEW |