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

Side by Side Diff: chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc

Issue 258953004: Fix a crash on closing cookies and site info bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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/ui/aura/chrome_browser_main_extra_parts_aura.h" 5 #include "chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "chrome/browser/chrome_browser_main.h" 9 #include "chrome/browser/chrome_browser_main.h"
10 #include "chrome/browser/ui/aura/active_desktop_monitor.h" 10 #include "chrome/browser/ui/aura/active_desktop_monitor.h"
(...skipping 26 matching lines...) Expand all
37 #endif // defined(USE_ASH) 37 #endif // defined(USE_ASH)
38 38
39 #if !defined(OS_CHROMEOS) 39 #if !defined(OS_CHROMEOS)
40 #include "ui/views/widget/desktop_aura/desktop_screen.h" 40 #include "ui/views/widget/desktop_aura/desktop_screen.h"
41 #endif 41 #endif
42 42
43 namespace { 43 namespace {
44 44
45 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 45 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
46 ui::NativeTheme* GetNativeThemeForWindow(aura::Window* window) { 46 ui::NativeTheme* GetNativeThemeForWindow(aura::Window* window) {
47 if (!window)
48 return NULL;
49
47 Profile* profile = NULL; 50 Profile* profile = NULL;
48 if (window->type() == ui::wm::WINDOW_TYPE_NORMAL || 51 if (window->type() == ui::wm::WINDOW_TYPE_NORMAL ||
49 window->type() == ui::wm::WINDOW_TYPE_POPUP) { 52 window->type() == ui::wm::WINDOW_TYPE_POPUP) {
50 profile = reinterpret_cast<Profile*>( 53 profile = reinterpret_cast<Profile*>(
51 window->GetNativeWindowProperty(Profile::kProfileKey)); 54 window->GetNativeWindowProperty(Profile::kProfileKey));
52 } 55 }
53 56
54 if (profile && !profile->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme)) 57 if (profile && !profile->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme))
55 return ui::NativeThemeAura::instance(); 58 return ui::NativeThemeAura::instance();
56 59
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 chrome::MESSAGE_BOX_TYPE_WARNING); 152 chrome::MESSAGE_BOX_TYPE_WARNING);
150 153
151 // Avoids gpu_process_transport_factory.cc(153)] Check failed: 154 // Avoids gpu_process_transport_factory.cc(153)] Check failed:
152 // per_compositor_data_.empty() when quit is chosen. 155 // per_compositor_data_.empty() when quit is chosen.
153 base::RunLoop().RunUntilIdle(); 156 base::RunLoop().RunUntilIdle();
154 157
155 exit(EXIT_FAILURE); 158 exit(EXIT_FAILURE);
156 } 159 }
157 } 160 }
158 #endif 161 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698