Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 1639003002: Revert of Introduce AndroidFocusRules and NativeWidgetAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase plus removing menu_config_android.cc Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/views/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #if defined(USE_AURA) && !defined(OS_CHROMEOS) 46 #if defined(USE_AURA) && !defined(OS_CHROMEOS)
47 #include "chrome/browser/ui/host_desktop.h" 47 #include "chrome/browser/ui/host_desktop.h"
48 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" 48 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
49 #include "ui/views/widget/native_widget_aura.h" 49 #include "ui/views/widget/native_widget_aura.h"
50 #endif 50 #endif
51 51
52 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 52 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
53 #include "ui/views/linux_ui/linux_ui.h" 53 #include "ui/views/linux_ui/linux_ui.h"
54 #endif 54 #endif
55 55
56 #if defined(OS_ANDROID)
57 #include "ui/views/widget/android/native_widget_android.h"
58 #endif
59
60 #if defined(USE_ASH) 56 #if defined(USE_ASH)
61 #include "ash/accelerators/accelerator_controller.h" 57 #include "ash/accelerators/accelerator_controller.h"
62 #include "ash/shell.h" 58 #include "ash/shell.h"
63 #include "ash/wm/window_state.h" 59 #include "ash/wm/window_state.h"
64 #include "chrome/browser/ui/ash/ash_init.h" 60 #include "chrome/browser/ui/ash/ash_init.h"
65 #include "chrome/browser/ui/ash/ash_util.h" 61 #include "chrome/browser/ui/ash/ash_util.h"
66 #endif 62 #endif
67 63
68 // Helpers -------------------------------------------------------------------- 64 // Helpers --------------------------------------------------------------------
69 65
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 parent_profile); 426 parent_profile);
431 } 427 }
432 params->native_widget = native_widget; 428 params->native_widget = native_widget;
433 } else { 429 } else {
434 // TODO(erg): Once we've threaded context to everywhere that needs it, we 430 // TODO(erg): Once we've threaded context to everywhere that needs it, we
435 // should remove this check here. 431 // should remove this check here.
436 gfx::NativeView to_check = 432 gfx::NativeView to_check =
437 params->context ? params->context : params->parent; 433 params->context ? params->context : params->parent;
438 if (chrome::GetHostDesktopTypeForNativeView(to_check) == 434 if (chrome::GetHostDesktopTypeForNativeView(to_check) ==
439 chrome::HOST_DESKTOP_TYPE_NATIVE) { 435 chrome::HOST_DESKTOP_TYPE_NATIVE) {
440 #if defined(OS_ANDROID)
441 params->native_widget = new views::NativeWidgetAndroid(delegate);
442 #else
443 params->native_widget = new views::DesktopNativeWidgetAura(delegate); 436 params->native_widget = new views::DesktopNativeWidgetAura(delegate);
444 #endif
445 } 437 }
446 } 438 }
447 #endif 439 #endif
448 } 440 }
449 441
450 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 442 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
451 bool ChromeViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) { 443 bool ChromeViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) {
452 // On Ubuntu Unity, the system always provides a title bar for maximized 444 // On Ubuntu Unity, the system always provides a title bar for maximized
453 // windows. 445 // windows.
454 views::LinuxUI* ui = views::LinuxUI::instance(); 446 views::LinuxUI* ui = views::LinuxUI::instance();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 return content::BrowserThread::GetBlockingPool(); 501 return content::BrowserThread::GetBlockingPool();
510 } 502 }
511 503
512 #if !defined(USE_ASH) 504 #if !defined(USE_ASH)
513 views::Widget::InitParams::WindowOpacity 505 views::Widget::InitParams::WindowOpacity
514 ChromeViewsDelegate::GetOpacityForInitParams( 506 ChromeViewsDelegate::GetOpacityForInitParams(
515 const views::Widget::InitParams& params) { 507 const views::Widget::InitParams& params) {
516 return views::Widget::InitParams::OPAQUE_WINDOW; 508 return views::Widget::InitParams::OPAQUE_WINDOW;
517 } 509 }
518 #endif 510 #endif
OLDNEW
« no previous file with comments | « no previous file | ui/views/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698