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" |
(...skipping 21 matching lines...) Expand all Loading... |
32 #if defined(USE_AURA) | 32 #if defined(USE_AURA) |
33 #include "ui/aura/root_window.h" | 33 #include "ui/aura/root_window.h" |
34 #endif | 34 #endif |
35 | 35 |
36 #if defined(USE_AURA) && !defined(OS_CHROMEOS) | 36 #if defined(USE_AURA) && !defined(OS_CHROMEOS) |
37 #include "chrome/browser/ui/host_desktop.h" | 37 #include "chrome/browser/ui/host_desktop.h" |
38 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 38 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
39 #include "ui/views/widget/native_widget_aura.h" | 39 #include "ui/views/widget/native_widget_aura.h" |
40 #endif | 40 #endif |
41 | 41 |
| 42 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 43 #include "ui/views/linux_ui/linux_ui.h" |
| 44 #endif |
| 45 |
42 #if defined(USE_ASH) | 46 #if defined(USE_ASH) |
43 #include "ash/shell.h" | 47 #include "ash/shell.h" |
44 #include "ash/wm/window_state.h" | 48 #include "ash/wm/window_state.h" |
45 #include "chrome/browser/ui/ash/ash_init.h" | 49 #include "chrome/browser/ui/ash/ash_init.h" |
46 #include "chrome/browser/ui/ash/ash_util.h" | 50 #include "chrome/browser/ui/ash/ash_util.h" |
47 #endif | 51 #endif |
48 | 52 |
49 namespace { | 53 namespace { |
50 | 54 |
51 // If the given window has a profile associated with it, use that profile's | 55 // If the given window has a profile associated with it, use that profile's |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 } | 299 } |
296 } | 300 } |
297 #endif | 301 #endif |
298 } | 302 } |
299 | 303 |
300 base::TimeDelta | 304 base::TimeDelta |
301 ChromeViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() { | 305 ChromeViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() { |
302 return base::TimeDelta(); | 306 return base::TimeDelta(); |
303 } | 307 } |
304 | 308 |
| 309 bool ChromeViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) { |
| 310 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 311 // On Ubuntu Unity, the system always provides a title bar for maximized |
| 312 // windows. |
| 313 views::LinuxUI* ui = views::LinuxUI::instance(); |
| 314 return maximized && ui && ui->UnityIsRunning(); |
| 315 #endif |
| 316 |
| 317 return false; |
| 318 } |
| 319 |
305 #if !defined(USE_AURA) && !defined(USE_CHROMEOS) | 320 #if !defined(USE_AURA) && !defined(USE_CHROMEOS) |
306 views::Widget::InitParams::WindowOpacity | 321 views::Widget::InitParams::WindowOpacity |
307 ChromeViewsDelegate::GetOpacityForInitParams( | 322 ChromeViewsDelegate::GetOpacityForInitParams( |
308 const views::Widget::InitParams& params) { | 323 const views::Widget::InitParams& params) { |
309 return views::Widget::InitParams::OPAQUE_WINDOW; | 324 return views::Widget::InitParams::OPAQUE_WINDOW; |
310 } | 325 } |
311 #endif | 326 #endif |
OLD | NEW |