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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 parent_profile); | 360 parent_profile); |
361 } | 361 } |
362 params->native_widget = native_widget; | 362 params->native_widget = native_widget; |
363 } else { | 363 } else { |
364 // TODO(erg): Once we've threaded context to everywhere that needs it, we | 364 // TODO(erg): Once we've threaded context to everywhere that needs it, we |
365 // should remove this check here. | 365 // should remove this check here. |
366 gfx::NativeView to_check = | 366 gfx::NativeView to_check = |
367 params->context ? params->context : params->parent; | 367 params->context ? params->context : params->parent; |
368 if (chrome::GetHostDesktopTypeForNativeView(to_check) == | 368 if (chrome::GetHostDesktopTypeForNativeView(to_check) == |
369 chrome::HOST_DESKTOP_TYPE_NATIVE) { | 369 chrome::HOST_DESKTOP_TYPE_NATIVE) { |
| 370 #if defined(OS_ANDROID) |
| 371 params->native_widget = new views::NativeWidgetAura(delegate); |
| 372 #else |
370 params->native_widget = new views::DesktopNativeWidgetAura(delegate); | 373 params->native_widget = new views::DesktopNativeWidgetAura(delegate); |
| 374 #endif |
371 } | 375 } |
372 } | 376 } |
373 #endif | 377 #endif |
374 } | 378 } |
375 | 379 |
376 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 380 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
377 bool ChromeViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) { | 381 bool ChromeViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) { |
378 // On Ubuntu Unity, the system always provides a title bar for maximized | 382 // On Ubuntu Unity, the system always provides a title bar for maximized |
379 // windows. | 383 // windows. |
380 views::LinuxUI* ui = views::LinuxUI::instance(); | 384 views::LinuxUI* ui = views::LinuxUI::instance(); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 return content::BrowserThread::GetBlockingPool(); | 439 return content::BrowserThread::GetBlockingPool(); |
436 } | 440 } |
437 | 441 |
438 #if !defined(USE_AURA) && !defined(USE_CHROMEOS) | 442 #if !defined(USE_AURA) && !defined(USE_CHROMEOS) |
439 views::Widget::InitParams::WindowOpacity | 443 views::Widget::InitParams::WindowOpacity |
440 ChromeViewsDelegate::GetOpacityForInitParams( | 444 ChromeViewsDelegate::GetOpacityForInitParams( |
441 const views::Widget::InitParams& params) { | 445 const views::Widget::InitParams& params) { |
442 return views::Widget::InitParams::OPAQUE_WINDOW; | 446 return views::Widget::InitParams::OPAQUE_WINDOW; |
443 } | 447 } |
444 #endif | 448 #endif |
OLD | NEW |