| 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" |
| 11 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
| 12 #include "content/public/common/context_menu_params.h" | 12 #include "content/public/common/context_menu_params.h" |
| 13 #include "content/shell/browser/shell_platform_data_aura.h" | 13 #include "content/shell/browser/shell_platform_data_aura.h" |
| 14 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 14 #include "ui/aura/client/screen_position_client.h" | 15 #include "ui/aura/client/screen_position_client.h" |
| 15 #include "ui/aura/env.h" | 16 #include "ui/aura/env.h" |
| 16 #include "ui/aura/window.h" | 17 #include "ui/aura/window.h" |
| 17 #include "ui/aura/window_event_dispatcher.h" | 18 #include "ui/aura/window_event_dispatcher.h" |
| 18 #include "ui/base/clipboard/clipboard.h" | 19 #include "ui/base/clipboard/clipboard.h" |
| 19 #include "ui/base/models/simple_menu_model.h" | 20 #include "ui/base/models/simple_menu_model.h" |
| 20 #include "ui/base/resource/resource_bundle.h" | 21 #include "ui/base/resource/resource_bundle.h" |
| 21 #include "ui/events/event.h" | 22 #include "ui/events/event.h" |
| 22 #include "ui/gfx/screen.h" | 23 #include "ui/gfx/screen.h" |
| 23 #include "ui/views/background.h" | 24 #include "ui/views/background.h" |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 wm_test_helper_ = NULL; | 434 wm_test_helper_ = NULL; |
| 434 | 435 |
| 435 delete test_screen_; | 436 delete test_screen_; |
| 436 test_screen_ = NULL; | 437 test_screen_ = NULL; |
| 437 #endif | 438 #endif |
| 438 delete views_delegate_; | 439 delete views_delegate_; |
| 439 views_delegate_ = NULL; | 440 views_delegate_ = NULL; |
| 440 delete platform_; | 441 delete platform_; |
| 441 platform_ = NULL; | 442 platform_ = NULL; |
| 442 #if defined(OS_CHROMEOS) | 443 #if defined(OS_CHROMEOS) |
| 444 device::BluetoothAdapterFactory::Shutdown(); |
| 443 chromeos::DBusThreadManager::Shutdown(); | 445 chromeos::DBusThreadManager::Shutdown(); |
| 444 #endif | 446 #endif |
| 445 aura::Env::DeleteInstance(); | 447 aura::Env::DeleteInstance(); |
| 446 } | 448 } |
| 447 | 449 |
| 448 void Shell::PlatformCleanUp() { | 450 void Shell::PlatformCleanUp() { |
| 449 } | 451 } |
| 450 | 452 |
| 451 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { | 453 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { |
| 452 if (headless_) | 454 if (headless_) |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 | 561 |
| 560 void Shell::PlatformWebContentsFocused(WebContents* contents) { | 562 void Shell::PlatformWebContentsFocused(WebContents* contents) { |
| 561 if (headless_) | 563 if (headless_) |
| 562 return; | 564 return; |
| 563 ShellWindowDelegateView* delegate_view = | 565 ShellWindowDelegateView* delegate_view = |
| 564 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); | 566 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); |
| 565 delegate_view->OnWebContentsFocused(contents); | 567 delegate_view->OnWebContentsFocused(contents); |
| 566 } | 568 } |
| 567 | 569 |
| 568 } // namespace content | 570 } // namespace content |
| OLD | NEW |