OLD | NEW |
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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "content/public/browser/context_factory.h" | 9 #include "content/public/browser/context_factory.h" |
10 #include "content/public/browser/render_widget_host_view.h" | 10 #include "content/public/browser/render_widget_host_view.h" |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 #else | 430 #else |
431 gfx::Screen::SetScreenInstance( | 431 gfx::Screen::SetScreenInstance( |
432 gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); | 432 gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); |
433 #endif | 433 #endif |
434 views_delegate_ = new ShellViewsDelegateAura(); | 434 views_delegate_ = new ShellViewsDelegateAura(); |
435 } | 435 } |
436 | 436 |
437 void Shell::PlatformExit() { | 437 void Shell::PlatformExit() { |
438 #if defined(OS_CHROMEOS) | 438 #if defined(OS_CHROMEOS) |
439 delete wm_test_helper_; | 439 delete wm_test_helper_; |
| 440 wm_test_helper_ = NULL; |
440 #endif | 441 #endif |
441 delete views_delegate_; | 442 delete views_delegate_; |
442 views_delegate_ = NULL; | 443 views_delegate_ = NULL; |
443 delete platform_; | 444 delete platform_; |
444 platform_ = NULL; | 445 platform_ = NULL; |
445 #if defined(OS_CHROMEOS) | 446 #if defined(OS_CHROMEOS) |
446 chromeos::DBusThreadManager::Shutdown(); | 447 chromeos::DBusThreadManager::Shutdown(); |
447 #endif | 448 #endif |
448 aura::Env::DeleteInstance(); | 449 aura::Env::DeleteInstance(); |
449 } | 450 } |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 | 564 |
564 void Shell::PlatformWebContentsFocused(WebContents* contents) { | 565 void Shell::PlatformWebContentsFocused(WebContents* contents) { |
565 if (headless_) | 566 if (headless_) |
566 return; | 567 return; |
567 ShellWindowDelegateView* delegate_view = | 568 ShellWindowDelegateView* delegate_view = |
568 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); | 569 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); |
569 delegate_view->OnWebContentsFocused(contents); | 570 delegate_view->OnWebContentsFocused(contents); |
570 } | 571 } |
571 | 572 |
572 } // namespace content | 573 } // namespace content |
OLD | NEW |