Roll DEPS for libelf clang compilation fix.
[chromium-blink-merge.git] / ui / views_content_client / views_content_client_main_parts.cc
blobd51ceb243e9a0365e0419aa307cf8a7d7418b48f
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/views_content_client/views_content_client_main_parts.h"
7 #include "base/run_loop.h"
8 #include "content/shell/browser/shell_browser_context.h"
9 #include "ui/base/ime/input_method_initializer.h"
10 #include "ui/views/test/desktop_test_views_delegate.h"
12 namespace ui {
14 ViewsContentClientMainParts::ViewsContentClientMainParts(
15 const content::MainFunctionParams& content_params,
16 ViewsContentClient* views_content_client)
17 : views_content_client_(views_content_client) {
20 ViewsContentClientMainParts::~ViewsContentClientMainParts() {
23 void ViewsContentClientMainParts::PreMainMessageLoopRun() {
24 ui::InitializeInputMethodForTesting();
25 browser_context_.reset(new content::ShellBrowserContext(false, NULL));
26 views_delegate_.reset(new views::DesktopTestViewsDelegate);
29 void ViewsContentClientMainParts::PostMainMessageLoopRun() {
30 browser_context_.reset();
31 views_delegate_.reset();
34 bool ViewsContentClientMainParts::MainMessageLoopRun(int* result_code) {
35 base::RunLoop run_loop;
36 run_loop.Run();
37 return true;
40 } // namespace ui