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

Side by Side Diff: headless/lib/headless_content_client.h

Issue 2720673003: [headless] Use version for product name and user agent. (Closed)
Patch Set: use headless/public/version.h instead. Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « headless/lib/browser/headless_devtools.cc ('k') | headless/lib/headless_content_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef HEADLESS_LIB_HEADLESS_CONTENT_CLIENT_H_ 5 #ifndef HEADLESS_LIB_HEADLESS_CONTENT_CLIENT_H_
6 #define HEADLESS_LIB_HEADLESS_CONTENT_CLIENT_H_ 6 #define HEADLESS_LIB_HEADLESS_CONTENT_CLIENT_H_
7 7
8 #include "content/public/common/content_client.h" 8 #include "content/public/common/content_client.h"
9 #include "headless/public/headless_browser.h" 9 #include "headless/public/headless_browser.h"
10 10
11 namespace headless { 11 namespace headless {
12 12
13 class HeadlessContentClient : public content::ContentClient { 13 class HeadlessContentClient : public content::ContentClient {
14 public: 14 public:
15 explicit HeadlessContentClient(HeadlessBrowser::Options* options); 15 explicit HeadlessContentClient(HeadlessBrowser::Options* options);
16 ~HeadlessContentClient() override; 16 ~HeadlessContentClient() override;
17 17
18 // content::ContentClient implementation: 18 // content::ContentClient implementation:
19 std::string GetProduct() const override;
19 std::string GetUserAgent() const override; 20 std::string GetUserAgent() const override;
20 base::string16 GetLocalizedString(int message_id) const override; 21 base::string16 GetLocalizedString(int message_id) const override;
21 base::StringPiece GetDataResource( 22 base::StringPiece GetDataResource(
22 int resource_id, 23 int resource_id,
23 ui::ScaleFactor scale_factor) const override; 24 ui::ScaleFactor scale_factor) const override;
24 base::RefCountedMemory* GetDataResourceBytes( 25 base::RefCountedMemory* GetDataResourceBytes(
25 int resource_id) const override; 26 int resource_id) const override;
26 gfx::Image& GetNativeImageNamed(int resource_id) const override; 27 gfx::Image& GetNativeImageNamed(int resource_id) const override;
27 28
28 private: 29 private:
29 HeadlessBrowser::Options* options_; // Not owned. 30 HeadlessBrowser::Options* options_; // Not owned.
30 31
31 DISALLOW_COPY_AND_ASSIGN(HeadlessContentClient); 32 DISALLOW_COPY_AND_ASSIGN(HeadlessContentClient);
32 }; 33 };
33 34
34 } // namespace headless 35 } // namespace headless
35 36
36 #endif // HEADLESS_LIB_HEADLESS_CONTENT_CLIENT_H_ 37 #endif // HEADLESS_LIB_HEADLESS_CONTENT_CLIENT_H_
OLDNEW
« no previous file with comments | « headless/lib/browser/headless_devtools.cc ('k') | headless/lib/headless_content_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698