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

Side by Side Diff: apps/shell/app_shell_browser_main_parts.cc

Issue 72503002: Remove some pass-thrus on RootWindow API in favor of exposing the RootWindowHost again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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 | « no previous file | ash/accelerators/accelerator_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "apps/shell/app_shell_browser_main_parts.h" 5 #include "apps/shell/app_shell_browser_main_parts.h"
6 6
7 #include "apps/shell/web_view_window.h" 7 #include "apps/shell/web_view_window.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "content/public/common/result_codes.h" 9 #include "content/public/common/result_codes.h"
10 #include "content/shell/browser/shell_browser_context.h" 10 #include "content/shell/browser/shell_browser_context.h"
(...skipping 26 matching lines...) Expand all
37 // networking stack. 37 // networking stack.
38 // TODO(jamescook): Should this be an off-the-record context? 38 // TODO(jamescook): Should this be an off-the-record context?
39 browser_context_.reset(new content::ShellBrowserContext(false, NULL)); 39 browser_context_.reset(new content::ShellBrowserContext(false, NULL));
40 40
41 // TODO(jamescook): Replace this with a real Screen implementation. 41 // TODO(jamescook): Replace this with a real Screen implementation.
42 gfx::Screen::SetScreenInstance( 42 gfx::Screen::SetScreenInstance(
43 gfx::SCREEN_TYPE_NATIVE, aura::TestScreen::Create()); 43 gfx::SCREEN_TYPE_NATIVE, aura::TestScreen::Create());
44 // Set up basic pieces of views::corewm. 44 // Set up basic pieces of views::corewm.
45 minimal_shell_.reset(new shell::MinimalShell(gfx::Size(800, 600))); 45 minimal_shell_.reset(new shell::MinimalShell(gfx::Size(800, 600)));
46 // Ensure the X window gets mapped. 46 // Ensure the X window gets mapped.
47 minimal_shell_->root_window()->ShowRootWindow(); 47 minimal_shell_->root_window()->host()->Show();
48 48
49 // TODO(jamescook): Create an apps::ShellWindow here. For now, create a 49 // TODO(jamescook): Create an apps::ShellWindow here. For now, create a
50 // window with a WebView just to ensure that the content module is properly 50 // window with a WebView just to ensure that the content module is properly
51 // initialized. 51 // initialized.
52 ShowWebViewWindow(browser_context_.get(), 52 ShowWebViewWindow(browser_context_.get(),
53 minimal_shell_->root_window()->window()); 53 minimal_shell_->root_window()->window());
54 } 54 }
55 55
56 bool AppShellBrowserMainParts::MainMessageLoopRun(int* result_code) { 56 bool AppShellBrowserMainParts::MainMessageLoopRun(int* result_code) {
57 base::RunLoop run_loop; 57 base::RunLoop run_loop;
58 run_loop.Run(); 58 run_loop.Run();
59 *result_code = content::RESULT_CODE_NORMAL_EXIT; 59 *result_code = content::RESULT_CODE_NORMAL_EXIT;
60 return true; 60 return true;
61 } 61 }
62 62
63 void AppShellBrowserMainParts::PostMainMessageLoopRun() { 63 void AppShellBrowserMainParts::PostMainMessageLoopRun() {
64 browser_context_.reset(); 64 browser_context_.reset();
65 minimal_shell_.reset(); 65 minimal_shell_.reset();
66 aura::Env::DeleteInstance(); 66 aura::Env::DeleteInstance();
67 } 67 }
68 68
69 } // namespace apps 69 } // namespace apps
OLDNEW
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698