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

Side by Side Diff: content/public/common/content_client.cc

Issue 9188056: Start splitting out WebUI into an implementation class and an interface that each page implements... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
« no previous file with comments | « content/public/common/content_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/public/common/content_client.h" 5 #include "content/public/common/content_client.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_piece.h" 8 #include "base/string_piece.h"
9 #include "webkit/glue/webkit_glue.h" 9 #include "webkit/glue/webkit_glue.h"
10 #include "webkit/plugins/ppapi/host_globals.h"
10 11
11 namespace content { 12 namespace content {
12 13
13 static ContentClient* g_client; 14 static ContentClient* g_client;
14 15
15 void SetContentClient(ContentClient* client) { 16 void SetContentClient(ContentClient* client) {
16 g_client = client; 17 g_client = client;
17 18
18 // TODO(dpranke): Doing real work (calling webkit_glue::SetUserAgent) 19 // TODO(dpranke): Doing real work (calling webkit_glue::SetUserAgent)
19 // inside what looks like a function that initializes a global is a 20 // inside what looks like a function that initializes a global is a
(...skipping 11 matching lines...) Expand all
31 32
32 ContentClient* GetContentClient() { 33 ContentClient* GetContentClient() {
33 return g_client; 34 return g_client;
34 } 35 }
35 36
36 const std::string& GetUserAgent(const GURL& url) { 37 const std::string& GetUserAgent(const GURL& url) {
37 DCHECK(g_client); 38 DCHECK(g_client);
38 return webkit_glue::GetUserAgent(url); 39 return webkit_glue::GetUserAgent(url);
39 } 40 }
40 41
42 webkit::ppapi::HostGlobals* GetHostGlobals() {
43 return webkit::ppapi::HostGlobals::Get();
44 }
45
41 ContentClient::ContentClient() 46 ContentClient::ContentClient()
42 : browser_(NULL), plugin_(NULL), renderer_(NULL), utility_(NULL) { 47 : browser_(NULL), plugin_(NULL), renderer_(NULL), utility_(NULL) {
43 } 48 }
44 49
45 ContentClient::~ContentClient() { 50 ContentClient::~ContentClient() {
46 } 51 }
47 52
48 } // namespace content 53 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698