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

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

Issue 1403293003: Introduce AndroidFocusRules and NativeWidgetAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reviews Created 5 years, 1 month 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #if defined(USE_AURA) && !defined(OS_CHROMEOS) 45 #if defined(USE_AURA) && !defined(OS_CHROMEOS)
46 #include "chrome/browser/ui/host_desktop.h" 46 #include "chrome/browser/ui/host_desktop.h"
47 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" 47 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
48 #include "ui/views/widget/native_widget_aura.h" 48 #include "ui/views/widget/native_widget_aura.h"
49 #endif 49 #endif
50 50
51 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 51 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
52 #include "ui/views/linux_ui/linux_ui.h" 52 #include "ui/views/linux_ui/linux_ui.h"
53 #endif 53 #endif
54 54
55 #if defined(OS_ANDROID)
56 #include "ui/views/widget/android/native_widget_android.h"
57 #endif
58
55 #if defined(USE_ASH) 59 #if defined(USE_ASH)
56 #include "ash/accelerators/accelerator_controller.h" 60 #include "ash/accelerators/accelerator_controller.h"
57 #include "ash/shell.h" 61 #include "ash/shell.h"
58 #include "ash/wm/window_state.h" 62 #include "ash/wm/window_state.h"
59 #include "chrome/browser/ui/ash/ash_init.h" 63 #include "chrome/browser/ui/ash/ash_init.h"
60 #include "chrome/browser/ui/ash/ash_util.h" 64 #include "chrome/browser/ui/ash/ash_util.h"
61 #endif 65 #endif
62 66
63 67
64 // Helpers -------------------------------------------------------------------- 68 // Helpers --------------------------------------------------------------------
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 parent_profile); 401 parent_profile);
398 } 402 }
399 params->native_widget = native_widget; 403 params->native_widget = native_widget;
400 } else { 404 } else {
401 // TODO(erg): Once we've threaded context to everywhere that needs it, we 405 // TODO(erg): Once we've threaded context to everywhere that needs it, we
402 // should remove this check here. 406 // should remove this check here.
403 gfx::NativeView to_check = 407 gfx::NativeView to_check =
404 params->context ? params->context : params->parent; 408 params->context ? params->context : params->parent;
405 if (chrome::GetHostDesktopTypeForNativeView(to_check) == 409 if (chrome::GetHostDesktopTypeForNativeView(to_check) ==
406 chrome::HOST_DESKTOP_TYPE_NATIVE) { 410 chrome::HOST_DESKTOP_TYPE_NATIVE) {
411 #if defined(OS_ANDROID)
412 params->native_widget = new views::NativeWidgetAndroid(delegate);
413 #else
407 params->native_widget = new views::DesktopNativeWidgetAura(delegate); 414 params->native_widget = new views::DesktopNativeWidgetAura(delegate);
415 #endif
408 } 416 }
409 } 417 }
410 #endif 418 #endif
411 } 419 }
412 420
413 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 421 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
414 bool ChromeViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) { 422 bool ChromeViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) {
415 // On Ubuntu Unity, the system always provides a title bar for maximized 423 // On Ubuntu Unity, the system always provides a title bar for maximized
416 // windows. 424 // windows.
417 views::LinuxUI* ui = views::LinuxUI::instance(); 425 views::LinuxUI* ui = views::LinuxUI::instance();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 return content::BrowserThread::GetBlockingPool(); 480 return content::BrowserThread::GetBlockingPool();
473 } 481 }
474 482
475 #if !defined(USE_AURA) && !defined(USE_CHROMEOS) 483 #if !defined(USE_AURA) && !defined(USE_CHROMEOS)
476 views::Widget::InitParams::WindowOpacity 484 views::Widget::InitParams::WindowOpacity
477 ChromeViewsDelegate::GetOpacityForInitParams( 485 ChromeViewsDelegate::GetOpacityForInitParams(
478 const views::Widget::InitParams& params) { 486 const views::Widget::InitParams& params) {
479 return views::Widget::InitParams::OPAQUE_WINDOW; 487 return views::Widget::InitParams::OPAQUE_WINDOW;
480 } 488 }
481 #endif 489 #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