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

Unified Diff: content/shell/shell_content_browser_client.cc

Issue 13409003: Hide ContentClient getters from embedders so that they they don't reuse content's embedder API. The… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/shell_content_browser_client.h ('k') | content/shell/shell_content_renderer_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_content_browser_client.cc
===================================================================
--- content/shell/shell_content_browser_client.cc (revision 192622)
+++ content/shell/shell_content_browser_client.cc (working copy)
@@ -37,6 +37,8 @@
namespace {
+ShellContentBrowserClient* g_browser_client;
+
base::FilePath GetWebKitRootDirFilePath() {
base::FilePath base_path;
PathService::Get(base::DIR_SOURCE_ROOT, &base_path);
@@ -72,9 +74,15 @@
} // namespace
+ShellContentBrowserClient* ShellContentBrowserClient::Get() {
+ return g_browser_client;
+}
+
ShellContentBrowserClient::ShellContentBrowserClient()
: hyphen_dictionary_file_(base::kInvalidPlatformFileValue),
shell_browser_main_parts_(NULL) {
+ DCHECK(!g_browser_client);
+ g_browser_client = this;
if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
return;
webkit_source_dir_ = GetWebKitRootDirFilePath();
@@ -89,6 +97,7 @@
}
ShellContentBrowserClient::~ShellContentBrowserClient() {
+ g_browser_client = NULL;
}
BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts(
« no previous file with comments | « content/shell/shell_content_browser_client.h ('k') | content/shell/shell_content_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698