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

Side by Side Diff: content/public/renderer/render_frame_observer.h

Issue 614343002: Allow override of user agent depending on url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_
6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ 6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "ipc/ipc_listener.h" 12 #include "ipc/ipc_listener.h"
13 #include "ipc/ipc_sender.h" 13 #include "ipc/ipc_sender.h"
14 #include "url/gurl.h"
jochen (gone - plz use gerrit) 2014/10/02 09:24:03 should be enough to forward declare GURL, no?
14 #include "v8/include/v8.h" 15 #include "v8/include/v8.h"
15 16
16 namespace blink { 17 namespace blink {
17 class WebFrame; 18 class WebFrame;
18 struct WebURLError; 19 struct WebURLError;
19 } 20 }
20 21
21 namespace content { 22 namespace content {
22 23
23 class RendererPpapiHost; 24 class RendererPpapiHost;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // "\n at function_name (source:line_number:column_number)"). 68 // "\n at function_name (source:line_number:column_number)").
68 virtual void DetailedConsoleMessageAdded(const base::string16& message, 69 virtual void DetailedConsoleMessageAdded(const base::string16& message,
69 const base::string16& source, 70 const base::string16& source,
70 const base::string16& stack_trace, 71 const base::string16& stack_trace,
71 int32 line_number, 72 int32 line_number,
72 int32 severity_level) {} 73 int32 severity_level) {}
73 74
74 // Called when a compositor frame has committed. 75 // Called when a compositor frame has committed.
75 virtual void DidCommitCompositorFrame() {} 76 virtual void DidCommitCompositorFrame() {}
76 77
78 // Returns a user agent override specific for |url|, or empty string if
79 // default user agent should be used.
80 virtual std::string GetUserAgentOverrideForURL(const GURL& url);
81
77 // IPC::Listener implementation. 82 // IPC::Listener implementation.
78 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 83 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
79 84
80 // IPC::Sender implementation. 85 // IPC::Sender implementation.
81 virtual bool Send(IPC::Message* message) OVERRIDE; 86 virtual bool Send(IPC::Message* message) OVERRIDE;
82 87
83 RenderFrame* render_frame() const; 88 RenderFrame* render_frame() const;
84 int routing_id() const { return routing_id_; } 89 int routing_id() const { return routing_id_; }
85 90
86 protected: 91 protected:
(...skipping 10 matching lines...) Expand all
97 RenderFrame* render_frame_; 102 RenderFrame* render_frame_;
98 // The routing ID of the associated RenderFrame. 103 // The routing ID of the associated RenderFrame.
99 int routing_id_; 104 int routing_id_;
100 105
101 DISALLOW_COPY_AND_ASSIGN(RenderFrameObserver); 106 DISALLOW_COPY_AND_ASSIGN(RenderFrameObserver);
102 }; 107 };
103 108
104 } // namespace content 109 } // namespace content
105 110
106 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ 111 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_
OLDNEW
« no previous file with comments | « no previous file | content/public/renderer/render_frame_observer.cc » ('j') | content/public/renderer/render_frame_observer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698