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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 10273023: [Ash] Always show the root window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main_extra_parts_ash.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 #if defined(TOOLKIT_GTK) 175 #if defined(TOOLKIT_GTK)
176 #include "chrome/browser/ui/gtk/gtk_util.h" 176 #include "chrome/browser/ui/gtk/gtk_util.h"
177 #include "ui/gfx/gtk_util.h" 177 #include "ui/gfx/gtk_util.h"
178 #endif 178 #endif
179 179
180 #if defined(USE_X11) 180 #if defined(USE_X11)
181 #include "chrome/browser/chrome_browser_main_x11.h" 181 #include "chrome/browser/chrome_browser_main_x11.h"
182 #endif 182 #endif
183 183
184 #if defined(USE_AURA)
185 #include "ui/aura/root_window.h"
186 #endif
187
188 #if defined(USE_ASH)
189 #include "ash/shell.h"
190 #endif
191
192 using content::BrowserThread; 184 using content::BrowserThread;
193 185
194 namespace { 186 namespace {
195 187
196 // This function provides some ways to test crash and assertion handling 188 // This function provides some ways to test crash and assertion handling
197 // behavior of the program. 189 // behavior of the program.
198 void HandleTestParameters(const CommandLine& command_line) { 190 void HandleTestParameters(const CommandLine& command_line) {
199 // This parameter causes an assertion. 191 // This parameter causes an assertion.
200 if (command_line.HasSwitch(switches::kBrowserAssertTest)) { 192 if (command_line.HasSwitch(switches::kBrowserAssertTest)) {
201 DCHECK(false); 193 DCHECK(false);
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1888 browser_init_.reset(); 1880 browser_init_.reset();
1889 1881
1890 PostBrowserStart(); 1882 PostBrowserStart();
1891 1883
1892 return result_code_; 1884 return result_code_;
1893 } 1885 }
1894 1886
1895 bool ChromeBrowserMainParts::MainMessageLoopRun(int* result_code) { 1887 bool ChromeBrowserMainParts::MainMessageLoopRun(int* result_code) {
1896 // Set the result code set in PreMainMessageLoopRun or set above. 1888 // Set the result code set in PreMainMessageLoopRun or set above.
1897 *result_code = result_code_; 1889 *result_code = result_code_;
1898
1899 if (!run_message_loop_) 1890 if (!run_message_loop_)
1900 return true; // Don't run the default message loop. 1891 return true; // Don't run the default message loop.
1901 1892
1902 // This should be invoked as close to the start of the browser's 1893 // This should be invoked as close to the start of the browser's
1903 // UI thread message loop as possible to get a stable measurement 1894 // UI thread message loop as possible to get a stable measurement
1904 // across versions. 1895 // across versions.
1905 RecordBrowserStartupTime(); 1896 RecordBrowserStartupTime();
1906
1907 #if defined(USE_AURA) 1897 #if defined(USE_AURA)
1908 #if defined(USE_ASH)
1909 ash::Shell::GetRootWindow()->ShowRootWindow();
1910 #endif
1911 MessageLoopForUI::current()->Run(); 1898 MessageLoopForUI::current()->Run();
1912 #elif defined(TOOLKIT_VIEWS) 1899 #elif defined(TOOLKIT_VIEWS)
1913 views::AcceleratorHandler accelerator_handler; 1900 views::AcceleratorHandler accelerator_handler;
1914 MessageLoopForUI::current()->RunWithDispatcher(&accelerator_handler); 1901 MessageLoopForUI::current()->RunWithDispatcher(&accelerator_handler);
1915 #elif defined(USE_X11) 1902 #elif defined(USE_X11)
1916 MessageLoopForUI::current()->RunWithDispatcher(NULL); 1903 MessageLoopForUI::current()->RunWithDispatcher(NULL);
1917 #elif defined(OS_POSIX) 1904 #elif defined(OS_POSIX)
1918 MessageLoopForUI::current()->Run(); 1905 MessageLoopForUI::current()->Run();
1919 #endif 1906 #endif
1920 1907
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
2019 if (base::win::GetVersion() <= base::win::VERSION_XP) 2006 if (base::win::GetVersion() <= base::win::VERSION_XP)
2020 uma_name += "_XP"; 2007 uma_name += "_XP";
2021 2008
2022 uma_name += "_PreRead_"; 2009 uma_name += "_PreRead_";
2023 uma_name += pre_read_percentage; 2010 uma_name += pre_read_percentage;
2024 AddPreReadHistogramTime(uma_name.c_str(), time); 2011 AddPreReadHistogramTime(uma_name.c_str(), time);
2025 } 2012 }
2026 #endif 2013 #endif
2027 #endif 2014 #endif
2028 } 2015 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main_extra_parts_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698