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

Unified Diff: ui/views_content_client/views_content_client_main_parts.cc

Issue 288313012: Revert of Repurpose views+content example into a generic multiprocess views runtime (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: ui/views_content_client/views_content_client_main_parts.cc
diff --git a/ui/views_content_client/views_content_client_main_parts.cc b/ui/views_content_client/views_content_client_main_parts.cc
deleted file mode 100644
index b4fea47ffcd3f822c21ea5c19b369a2161f1f989..0000000000000000000000000000000000000000
--- a/ui/views_content_client/views_content_client_main_parts.cc
+++ /dev/null
@@ -1,89 +0,0 @@
-// 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_content_client/views_content_client_main_parts.h"
-
-#include "base/bind.h"
-#include "base/command_line.h"
-#include "base/message_loop/message_loop.h"
-#include "base/run_loop.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/threading/thread.h"
-#include "base/threading/thread_restrictions.h"
-#include "content/public/browser/context_factory.h"
-#include "content/public/common/content_switches.h"
-#include "content/shell/browser/shell_browser_context.h"
-#include "ui/aura/env.h"
-#include "ui/base/ime/input_method_initializer.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/test/desktop_test_views_delegate.h"
-#include "ui/views/widget/native_widget_aura.h"
-#include "ui/views_content_client/views_content_client.h"
-#include "ui/wm/core/wm_state.h"
-
-#if defined(OS_CHROMEOS)
-#include "ui/aura/test/test_screen.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_event_dispatcher.h"
-#include "ui/wm/test/wm_test_helper.h"
-#else // !defined(OS_CHROMEOS)
-#include "ui/views/widget/desktop_aura/desktop_screen.h"
-#endif
-
-namespace ui {
-
-ViewsContentClientMainParts::ViewsContentClientMainParts(
- const content::MainFunctionParams& content_params,
- ViewsContentClient* views_content_client)
- : views_content_client_(views_content_client) {
-}
-
-ViewsContentClientMainParts::~ViewsContentClientMainParts() {
-}
-
-void ViewsContentClientMainParts::ToolkitInitialized() {
- wm_state_.reset(new ::wm::WMState);
-}
-
-void ViewsContentClientMainParts::PreMainMessageLoopRun() {
- ui::InitializeInputMethodForTesting();
- browser_context_.reset(new content::ShellBrowserContext(false, NULL));
-
- gfx::NativeView window_context = NULL;
-#if defined(OS_CHROMEOS)
- gfx::Screen::SetScreenInstance(
- gfx::SCREEN_TYPE_NATIVE, aura::TestScreen::Create());
- // Set up basic pieces of views::corewm.
- wm_test_helper_.reset(new ::wm::WMTestHelper(gfx::Size(800, 600),
- content::GetContextFactory()));
- // Ensure the X window gets mapped.
- wm_test_helper_->host()->Show();
- // Ensure Aura knows where to open new windows.
- window_context = wm_test_helper_->host()->window();
-#else
- aura::Env::CreateInstance(true);
- gfx::Screen::SetScreenInstance(
- gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen());
-#endif
- views_delegate_.reset(new views::DesktopTestViewsDelegate);
-
- views_content_client_->task().Run(browser_context_.get(), window_context);
-}
-
-void ViewsContentClientMainParts::PostMainMessageLoopRun() {
- browser_context_.reset();
-#if defined(OS_CHROMEOS)
- wm_test_helper_.reset();
-#endif
- views_delegate_.reset();
- aura::Env::DeleteInstance();
-}
-
-bool ViewsContentClientMainParts::MainMessageLoopRun(int* result_code) {
- base::RunLoop run_loop;
- run_loop.Run();
- return true;
-}
-
-} // namespace ui
« no previous file with comments | « ui/views_content_client/views_content_client_main_parts.h ('k') | ui/views_content_client/views_content_main_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698