Commit 6d7d17d7 authored by kkania@chromium.org's avatar kkania@chromium.org

Revert 134740 - Root window wasn't shown in browser_test.

Broke browser_tests on ChromiumOS bots.

BUG=115967
TEST=none

Review URL: http://codereview.chromium.org/10273023

TBR=oshima@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10268027

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134756 0039d316-1c4b-4281-b951-d872f2087c98
parent 04194063
...@@ -182,6 +182,14 @@ ...@@ -182,6 +182,14 @@
#include "chrome/browser/chrome_browser_main_x11.h" #include "chrome/browser/chrome_browser_main_x11.h"
#endif #endif
#if defined(USE_AURA)
#include "ui/aura/root_window.h"
#endif
#if defined(USE_ASH)
#include "ash/shell.h"
#endif
using content::BrowserThread; using content::BrowserThread;
namespace { namespace {
...@@ -1889,6 +1897,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { ...@@ -1889,6 +1897,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
bool ChromeBrowserMainParts::MainMessageLoopRun(int* result_code) { bool ChromeBrowserMainParts::MainMessageLoopRun(int* result_code) {
// Set the result code set in PreMainMessageLoopRun or set above. // Set the result code set in PreMainMessageLoopRun or set above.
*result_code = result_code_; *result_code = result_code_;
if (!run_message_loop_) if (!run_message_loop_)
return true; // Don't run the default message loop. return true; // Don't run the default message loop.
...@@ -1896,7 +1905,11 @@ bool ChromeBrowserMainParts::MainMessageLoopRun(int* result_code) { ...@@ -1896,7 +1905,11 @@ bool ChromeBrowserMainParts::MainMessageLoopRun(int* result_code) {
// UI thread message loop as possible to get a stable measurement // UI thread message loop as possible to get a stable measurement
// across versions. // across versions.
RecordBrowserStartupTime(); RecordBrowserStartupTime();
#if defined(USE_AURA) #if defined(USE_AURA)
#if defined(USE_ASH)
ash::Shell::GetRootWindow()->ShowRootWindow();
#endif
MessageLoopForUI::current()->Run(); MessageLoopForUI::current()->Run();
#elif defined(TOOLKIT_VIEWS) #elif defined(TOOLKIT_VIEWS)
views::AcceleratorHandler accelerator_handler; views::AcceleratorHandler accelerator_handler;
......
...@@ -88,10 +88,6 @@ void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { ...@@ -88,10 +88,6 @@ void ChromeBrowserMainExtraPartsAsh::PreProfileInit() {
void ChromeBrowserMainExtraPartsAsh::PostProfileInit() { void ChromeBrowserMainExtraPartsAsh::PostProfileInit() {
} }
void ChromeBrowserMainExtraPartsAsh::PreMainMessageLoopStart() {
ash::Shell::GetRootWindow()->ShowRootWindow();
}
void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
ash::Shell::DeleteInstance(); ash::Shell::DeleteInstance();
} }
...@@ -19,7 +19,6 @@ class ChromeBrowserMainExtraPartsAsh : public ChromeBrowserMainExtraParts { ...@@ -19,7 +19,6 @@ class ChromeBrowserMainExtraPartsAsh : public ChromeBrowserMainExtraParts {
virtual void PreProfileInit() OVERRIDE; virtual void PreProfileInit() OVERRIDE;
virtual void PostProfileInit() OVERRIDE; virtual void PostProfileInit() OVERRIDE;
virtual void PreMainMessageLoopStart() OVERRIDE;
virtual void PostMainMessageLoopRun() OVERRIDE; virtual void PostMainMessageLoopRun() OVERRIDE;
private: private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment