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

Side by Side Diff: content/shell/browser/shell_views.cc

Issue 2459413002: Fixes possible crash in content shell shutdown (Closed)
Patch Set: Created 4 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
« 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 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 "content/shell/browser/shell.h" 5 #include "content/shell/browser/shell.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 views_delegate_ = new views::DesktopTestViewsDelegate(); 342 views_delegate_ = new views::DesktopTestViewsDelegate();
343 } 343 }
344 344
345 void Shell::PlatformExit() { 345 void Shell::PlatformExit() {
346 #if defined(OS_CHROMEOS) 346 #if defined(OS_CHROMEOS)
347 delete wm_test_helper_; 347 delete wm_test_helper_;
348 wm_test_helper_ = nullptr; 348 wm_test_helper_ = nullptr;
349 349
350 delete test_screen_; 350 delete test_screen_;
351 test_screen_ = nullptr; 351 test_screen_ = nullptr;
352 #elif defined(USE_AURA)
353 delete wm_state_;
354 wm_state_ = nullptr;
355 #endif 352 #endif
356 delete views_delegate_; 353 delete views_delegate_;
357 views_delegate_ = nullptr; 354 views_delegate_ = nullptr;
358 delete platform_; 355 delete platform_;
359 platform_ = nullptr; 356 platform_ = nullptr;
357 #if defined(USE_AURA) && !defined(OS_CHROMEOS)
358 delete wm_state_;
359 wm_state_ = nullptr;
360 #endif
360 } 361 }
361 362
362 void Shell::PlatformCleanUp() { 363 void Shell::PlatformCleanUp() {
363 } 364 }
364 365
365 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { 366 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) {
366 if (headless_) 367 if (headless_)
367 return; 368 return;
368 ShellWindowDelegateView* delegate_view = 369 ShellWindowDelegateView* delegate_view =
369 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); 370 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate());
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 void Shell::PlatformSetTitle(const base::string16& title) { 458 void Shell::PlatformSetTitle(const base::string16& title) {
458 if (headless_) 459 if (headless_)
459 return; 460 return;
460 ShellWindowDelegateView* delegate_view = 461 ShellWindowDelegateView* delegate_view =
461 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); 462 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate());
462 delegate_view->SetWindowTitle(title); 463 delegate_view->SetWindowTitle(title);
463 window_widget_->UpdateWindowTitle(); 464 window_widget_->UpdateWindowTitle();
464 } 465 }
465 466
466 } // namespace content 467 } // namespace content
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