| OLD | NEW |
| 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/views/chrome_views_delegate.h" | 5 #include "chrome/browser/ui/views/chrome_views_delegate.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/prefs/scoped_user_pref_update.h" | 9 #include "base/prefs/scoped_user_pref_update.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
| 15 #include "chrome/browser/ui/browser_window_state.h" | 15 #include "chrome/browser/ui/browser_window_state.h" |
| 16 #include "chrome/browser/ui/host_desktop.h" |
| 16 #include "components/version_info/version_info.h" | 17 #include "components/version_info/version_info.h" |
| 17 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
| 18 #include "content/public/browser/context_factory.h" | 19 #include "content/public/browser/context_factory.h" |
| 19 #include "grit/chrome_unscaled_resources.h" | 20 #include "grit/chrome_unscaled_resources.h" |
| 20 #include "ui/base/resource/resource_bundle.h" | 21 #include "ui/base/resource/resource_bundle.h" |
| 21 #include "ui/base/ui_base_switches.h" | 22 #include "ui/base/ui_base_switches.h" |
| 22 #include "ui/gfx/geometry/rect.h" | 23 #include "ui/gfx/geometry/rect.h" |
| 23 #include "ui/gfx/screen.h" | 24 #include "ui/gfx/screen.h" |
| 24 #include "ui/views/widget/native_widget.h" | 25 #include "ui/views/widget/native_widget.h" |
| 25 #include "ui/views/widget/widget.h" | 26 #include "ui/views/widget/widget.h" |
| 26 | 27 |
| 27 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
| 28 #include <dwmapi.h> | 29 #include <dwmapi.h> |
| 29 #include <shellapi.h> | 30 #include <shellapi.h> |
| 30 #include "base/profiler/scoped_tracker.h" | 31 #include "base/profiler/scoped_tracker.h" |
| 31 #include "base/task_runner_util.h" | 32 #include "base/task_runner_util.h" |
| 32 #include "base/win/windows_version.h" | 33 #include "base/win/windows_version.h" |
| 33 #include "chrome/browser/app_icon_win.h" | 34 #include "chrome/browser/app_icon_win.h" |
| 34 #include "content/public/browser/browser_thread.h" | 35 #include "content/public/browser/browser_thread.h" |
| 35 #include "ui/base/win/shell.h" | 36 #include "ui/base/win/shell.h" |
| 36 #endif | 37 #endif |
| 37 | 38 |
| 38 #if defined(USE_AURA) | 39 #if defined(USE_AURA) |
| 39 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" | 40 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" |
| 40 #include "ui/aura/window.h" | 41 #include "ui/aura/window.h" |
| 41 #include "ui/aura/window_event_dispatcher.h" | 42 #include "ui/aura/window_event_dispatcher.h" |
| 42 #endif | 43 #endif |
| 43 | 44 |
| 44 #if defined(USE_AURA) && !defined(OS_CHROMEOS) | 45 #if defined(USE_AURA) && !defined(OS_CHROMEOS) |
| 45 #include "chrome/browser/ui/host_desktop.h" | 46 #include "ui/gfx/host_desktop_type.h" |
| 46 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 47 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
| 47 #include "ui/views/widget/native_widget_aura.h" | 48 #include "ui/views/widget/native_widget_aura.h" |
| 48 #endif | 49 #endif |
| 49 | 50 |
| 50 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 51 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 51 #include "ui/views/linux_ui/linux_ui.h" | 52 #include "ui/views/linux_ui/linux_ui.h" |
| 52 #endif | 53 #endif |
| 53 | 54 |
| 54 #if defined(USE_ASH) | 55 #if defined(USE_ASH) |
| 55 #include "ash/shell.h" | 56 #include "ash/shell.h" |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 return content::BrowserThread::GetBlockingPool(); | 436 return content::BrowserThread::GetBlockingPool(); |
| 436 } | 437 } |
| 437 | 438 |
| 438 #if !defined(USE_AURA) && !defined(USE_CHROMEOS) | 439 #if !defined(USE_AURA) && !defined(USE_CHROMEOS) |
| 439 views::Widget::InitParams::WindowOpacity | 440 views::Widget::InitParams::WindowOpacity |
| 440 ChromeViewsDelegate::GetOpacityForInitParams( | 441 ChromeViewsDelegate::GetOpacityForInitParams( |
| 441 const views::Widget::InitParams& params) { | 442 const views::Widget::InitParams& params) { |
| 442 return views::Widget::InitParams::OPAQUE_WINDOW; | 443 return views::Widget::InitParams::OPAQUE_WINDOW; |
| 443 } | 444 } |
| 444 #endif | 445 #endif |
| OLD | NEW |