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

Side by Side Diff: content/common/content_client.h

Issue 6713082: Move WebUIFactory to chrome/browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ContentWebUIClient Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_COMMON_CONTENT_CLIENT_H_ 5 #ifndef CONTENT_COMMON_CONTENT_CLIENT_H_
6 #define CONTENT_COMMON_CONTENT_CLIENT_H_ 6 #define CONTENT_COMMON_CONTENT_CLIENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 10
11 class GURL; 11 class GURL;
12 12
13 namespace content { 13 namespace content {
14 14
15 class ContentBrowserClient; 15 class ContentBrowserClient;
16 class ContentClient; 16 class ContentClient;
17 class ContentGpuClient; 17 class ContentGpuClient;
18 class ContentPluginClient; 18 class ContentPluginClient;
19 class ContentRendererClient; 19 class ContentRendererClient;
20 class ContentWebUIClient;
20 21
21 // Setter and getter for the client. The client should be set early, before any 22 // Setter and getter for the client. The client should be set early, before any
22 // content code is called. 23 // content code is called.
23 void SetContentClient(ContentClient* client); 24 void SetContentClient(ContentClient* client);
24 ContentClient* GetContentClient(); 25 ContentClient* GetContentClient();
25 26
26 // Interface that the embedder implements. 27 // Interface that the embedder implements.
27 class ContentClient { 28 class ContentClient {
28 public: 29 public:
29 ContentClient(); 30 ContentClient();
30 ~ContentClient(); 31 ~ContentClient();
31 32
32 ContentBrowserClient* browser() { return browser_; } 33 ContentBrowserClient* browser() { return browser_; }
33 void set_browser(ContentBrowserClient* c) { browser_ = c; } 34 void set_browser(ContentBrowserClient* c) { browser_ = c; }
34 ContentGpuClient* gpu() { return gpu_; } 35 ContentGpuClient* gpu() { return gpu_; }
35 void set_gpu(ContentGpuClient* g) { gpu_ = g; } 36 void set_gpu(ContentGpuClient* g) { gpu_ = g; }
36 ContentPluginClient* plugin() { return plugin_; } 37 ContentPluginClient* plugin() { return plugin_; }
37 void set_plugin(ContentPluginClient* r) { plugin_ = r; } 38 void set_plugin(ContentPluginClient* r) { plugin_ = r; }
38 ContentRendererClient* renderer() { return renderer_; } 39 ContentRendererClient* renderer() { return renderer_; }
39 void set_renderer(ContentRendererClient* r) { renderer_ = r; } 40 void set_renderer(ContentRendererClient* r) { renderer_ = r; }
41 ContentWebUIClient* web_ui() { return web_ui_; }
42 void set_web_ui(ContentWebUIClient* w) { web_ui_ = w; }
40 43
41 // Sets the URL that is logged if the child process crashes. Use GURL() to 44 // Sets the URL that is logged if the child process crashes. Use GURL() to
42 // clear the URL. 45 // clear the URL.
43 virtual void SetActiveURL(const GURL& url) {} 46 virtual void SetActiveURL(const GURL& url) {}
44 47
45 private: 48 private:
46 // The embedder API for participating in browser logic. 49 // The embedder API for participating in browser logic.
47 ContentBrowserClient* browser_; 50 ContentBrowserClient* browser_;
48 // The embedder API for participating in gpu logic. 51 // The embedder API for participating in gpu logic.
49 ContentGpuClient* gpu_; 52 ContentGpuClient* gpu_;
50 // The embedder API for participating in plugin logic. 53 // The embedder API for participating in plugin logic.
51 ContentPluginClient* plugin_; 54 ContentPluginClient* plugin_;
52 // The embedder API for participating in renderer logic. 55 // The embedder API for participating in renderer logic.
53 ContentRendererClient* renderer_; 56 ContentRendererClient* renderer_;
57 // The embedder API for participating in WebUI logic.
58 ContentWebUIClient* web_ui_;
54 }; 59 };
55 60
56 } // namespace content 61 } // namespace content
57 62
58 #endif // CONTENT_COMMON_CONTENT_CLIENT_H_ 63 #endif // CONTENT_COMMON_CONTENT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698