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

Side by Side Diff: ui/app_list/views/app_list_view.cc

Issue 214423002: Reset the app list when it is shown on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_app_list_folder_drag_for_real
Patch Set: fix nits Created 6 years, 8 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 | « ui/app_list/views/app_list_main_view.cc ('k') | ui/app_list/views/apps_container_view.h » ('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 "ui/app_list/views/app_list_view.h" 5 #include "ui/app_list/views/app_list_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 OnActivationChanged(widget, active)); 432 OnActivationChanged(widget, active));
433 } 433 }
434 434
435 void AppListView::OnWidgetVisibilityChanged(views::Widget* widget, 435 void AppListView::OnWidgetVisibilityChanged(views::Widget* widget,
436 bool visible) { 436 bool visible) {
437 BubbleDelegateView::OnWidgetVisibilityChanged(widget, visible); 437 BubbleDelegateView::OnWidgetVisibilityChanged(widget, visible);
438 438
439 if (widget != GetWidget()) 439 if (widget != GetWidget())
440 return; 440 return;
441 441
442 // We clear the search when hiding so the next time the app list appears it is
443 // not showing search results.
444 if (!visible) 442 if (!visible)
445 app_list_main_view_->search_box_view()->ClearSearch(); 443 app_list_main_view_->ResetForShow();
446 444
447 // Whether we need to signin or not may have changed since last time we were 445 // Whether we need to signin or not may have changed since last time we were
448 // shown. 446 // shown.
449 Layout(); 447 Layout();
450 } 448 }
451 449
452 void AppListView::OnSpeechRecognitionStateChanged( 450 void AppListView::OnSpeechRecognitionStateChanged(
453 SpeechRecognitionState new_state) { 451 SpeechRecognitionState new_state) {
454 if (signin_view_->visible() || !speech_view_) 452 if (signin_view_->visible() || !speech_view_)
455 return; 453 return;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 #else 501 #else
504 speech_view_->SetVisible(recognizing); 502 speech_view_->SetVisible(recognizing);
505 app_list_main_view_->SetVisible(!recognizing); 503 app_list_main_view_->SetVisible(!recognizing);
506 504
507 // Needs to schedule paint of AppListView itself, to repaint the background. 505 // Needs to schedule paint of AppListView itself, to repaint the background.
508 GetBubbleFrameView()->SchedulePaint(); 506 GetBubbleFrameView()->SchedulePaint();
509 #endif 507 #endif
510 } 508 }
511 509
512 } // namespace app_list 510 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_main_view.cc ('k') | ui/app_list/views/apps_container_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698