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

Unified Diff: ui/views_content_client/views_content_main_delegate.cc

Issue 284113011: Repurpose views+content example into a generic multiprocess views runtime (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase for horrible copyright header change in revert CL Created 6 years, 7 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 | « ui/views_content_client/views_content_main_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views_content_client/views_content_main_delegate.cc
diff --git a/ui/views/examples/content_client/examples_main_delegate.cc b/ui/views_content_client/views_content_main_delegate.cc
similarity index 61%
rename from ui/views/examples/content_client/examples_main_delegate.cc
rename to ui/views_content_client/views_content_main_delegate.cc
index cf3241fa189940f1e2cccbbb040f51721c354228..4a1e5a00423ae2d9c8975fe29924f27a944b34fb 100644
--- a/ui/views/examples/content_client/examples_main_delegate.cc
+++ b/ui/views_content_client/views_content_main_delegate.cc
@@ -1,8 +1,8 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/views/examples/content_client/examples_main_delegate.h"
+#include "ui/views_content_client/views_content_main_delegate.h"
#include <string>
@@ -13,32 +13,33 @@
#include "content/public/common/content_switches.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
-#include "ui/views/examples/content_client/examples_content_browser_client.h"
+#include "ui/views_content_client/views_content_browser_client.h"
#if defined(OS_WIN)
#include "base/logging_win.h"
#endif
-namespace views {
-namespace examples {
+namespace ui {
namespace {
#if defined(OS_WIN)
// {83FAC8EE-7A0E-4dbb-A3F6-6F500D7CAB1A}
-const GUID kViewsExamplesProviderName =
+const GUID kViewsContentClientProviderName =
{ 0x83fac8ee, 0x7a0e, 0x4dbb,
{ 0xa3, 0xf6, 0x6f, 0x50, 0xd, 0x7c, 0xab, 0x1a } };
#endif
} // namespace
-ExamplesMainDelegate::ExamplesMainDelegate() {
+ViewsContentMainDelegate::ViewsContentMainDelegate(
+ ViewsContentClient* views_content_client)
+ : views_content_client_(views_content_client) {
}
-ExamplesMainDelegate::~ExamplesMainDelegate() {
+ViewsContentMainDelegate::~ViewsContentMainDelegate() {
}
-bool ExamplesMainDelegate::BasicStartupComplete(int* exit_code) {
+bool ViewsContentMainDelegate::BasicStartupComplete(int* exit_code) {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType);
@@ -50,23 +51,22 @@ bool ExamplesMainDelegate::BasicStartupComplete(int* exit_code) {
bool success = logging::InitLogging(settings);
CHECK(success);
#if defined(OS_WIN)
- logging::LogEventProvider::Initialize(kViewsExamplesProviderName);
+ logging::LogEventProvider::Initialize(kViewsContentClientProviderName);
#endif
return false;
}
-void ExamplesMainDelegate::PreSandboxStartup() {
+void ViewsContentMainDelegate::PreSandboxStartup() {
base::FilePath ui_test_pak_path;
DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
}
content::ContentBrowserClient*
- ExamplesMainDelegate::CreateContentBrowserClient() {
- browser_client_.reset(new ExamplesContentBrowserClient);
+ ViewsContentMainDelegate::CreateContentBrowserClient() {
+ browser_client_.reset(new ViewsContentBrowserClient(views_content_client_));
return browser_client_.get();
}
-} // namespace examples
-} // namespace views
+} // namespace ui
« no previous file with comments | « ui/views_content_client/views_content_main_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698