| 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 "ui/app_list/views/app_list_view.h" | 5 #include "ui/app_list/views/app_list_view.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/win/windows_version.h" |
| 9 #include "ui/app_list/app_list_constants.h" | 10 #include "ui/app_list/app_list_constants.h" |
| 10 #include "ui/app_list/app_list_model.h" | 11 #include "ui/app_list/app_list_model.h" |
| 11 #include "ui/app_list/app_list_view_delegate.h" | 12 #include "ui/app_list/app_list_view_delegate.h" |
| 12 #include "ui/app_list/pagination_model.h" | 13 #include "ui/app_list/pagination_model.h" |
| 13 #include "ui/app_list/signin_delegate.h" | 14 #include "ui/app_list/signin_delegate.h" |
| 14 #include "ui/app_list/speech_ui_model.h" | 15 #include "ui/app_list/speech_ui_model.h" |
| 15 #include "ui/app_list/views/app_list_background.h" | 16 #include "ui/app_list/views/app_list_background.h" |
| 16 #include "ui/app_list/views/app_list_main_view.h" | 17 #include "ui/app_list/views/app_list_main_view.h" |
| 17 #include "ui/app_list/views/app_list_view_observer.h" | 18 #include "ui/app_list/views/app_list_view_observer.h" |
| 18 #include "ui/app_list/views/search_box_view.h" | 19 #include "ui/app_list/views/search_box_view.h" |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 #endif | 315 #endif |
| 315 } | 316 } |
| 316 | 317 |
| 317 void AppListView::OnBeforeBubbleWidgetInit( | 318 void AppListView::OnBeforeBubbleWidgetInit( |
| 318 views::Widget::InitParams* params, | 319 views::Widget::InitParams* params, |
| 319 views::Widget* widget) const { | 320 views::Widget* widget) const { |
| 320 #if defined(USE_AURA) && !defined(OS_CHROMEOS) | 321 #if defined(USE_AURA) && !defined(OS_CHROMEOS) |
| 321 if (delegate_ && delegate_->ForceNativeDesktop()) | 322 if (delegate_ && delegate_->ForceNativeDesktop()) |
| 322 params->native_widget = new views::DesktopNativeWidgetAura(widget); | 323 params->native_widget = new views::DesktopNativeWidgetAura(widget); |
| 323 #endif | 324 #endif |
| 324 #if defined(OS_LINUX) | 325 #if defined(OS_WIN) |
| 326 // Windows 7 and higher offer pinning to the taskbar, but we need presence |
| 327 // on the taskbar for the user to be able to pin us. So, show the window on |
| 328 // the taskbar for these versions of Windows. |
| 329 if (base::win::GetVersion() >= base::win::VERSION_WIN7) |
| 330 params->force_show_in_taskbar = true; |
| 331 #elif defined(OS_LINUX) |
| 325 // Set up a custom WM_CLASS for the app launcher window. This allows task | 332 // Set up a custom WM_CLASS for the app launcher window. This allows task |
| 326 // switchers in X11 environments to distinguish it from main browser windows. | 333 // switchers in X11 environments to distinguish it from main browser windows. |
| 327 params->wm_class_name = kAppListWMClass; | 334 params->wm_class_name = kAppListWMClass; |
| 328 // Show the window in the taskbar, even though it is a bubble, which would not | 335 // Show the window in the taskbar, even though it is a bubble, which would not |
| 329 // normally be shown. | 336 // normally be shown. |
| 330 params->force_show_in_taskbar = true; | 337 params->force_show_in_taskbar = true; |
| 331 #endif | 338 #endif |
| 332 } | 339 } |
| 333 | 340 |
| 334 views::View* AppListView::GetInitiallyFocusedView() { | 341 views::View* AppListView::GetInitiallyFocusedView() { |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 #else | 473 #else |
| 467 speech_view_->SetVisible(recognizing); | 474 speech_view_->SetVisible(recognizing); |
| 468 app_list_main_view_->SetVisible(!recognizing); | 475 app_list_main_view_->SetVisible(!recognizing); |
| 469 #endif | 476 #endif |
| 470 | 477 |
| 471 // Needs to schedule paint of AppListView itself, to repaint the background. | 478 // Needs to schedule paint of AppListView itself, to repaint the background. |
| 472 SchedulePaint(); | 479 SchedulePaint(); |
| 473 } | 480 } |
| 474 | 481 |
| 475 } // namespace app_list | 482 } // namespace app_list |
| OLD | NEW |