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

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: small change for tapted@ 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
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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 OnActivationChanged(widget, active)); 426 OnActivationChanged(widget, active));
427 } 427 }
428 428
429 void AppListView::OnWidgetVisibilityChanged(views::Widget* widget, 429 void AppListView::OnWidgetVisibilityChanged(views::Widget* widget,
430 bool visible) { 430 bool visible) {
431 BubbleDelegateView::OnWidgetVisibilityChanged(widget, visible); 431 BubbleDelegateView::OnWidgetVisibilityChanged(widget, visible);
432 432
433 if (widget != GetWidget()) 433 if (widget != GetWidget())
434 return; 434 return;
435 435
436 // We clear the search when hiding so the next time the app list appears it is
437 // not showing search results.
438 if (!visible) 436 if (!visible)
439 app_list_main_view_->search_box_view()->ClearSearch(); 437 app_list_main_view_->ResetForShow();
440 438
441 // Whether we need to signin or not may have changed since last time we were 439 // Whether we need to signin or not may have changed since last time we were
442 // shown. 440 // shown.
443 Layout(); 441 Layout();
444 } 442 }
445 443
446 void AppListView::OnSpeechRecognitionStateChanged( 444 void AppListView::OnSpeechRecognitionStateChanged(
447 SpeechRecognitionState new_state) { 445 SpeechRecognitionState new_state) {
448 if (signin_view_->visible() || !speech_view_) 446 if (signin_view_->visible() || !speech_view_)
449 return; 447 return;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 #else 495 #else
498 speech_view_->SetVisible(recognizing); 496 speech_view_->SetVisible(recognizing);
499 app_list_main_view_->SetVisible(!recognizing); 497 app_list_main_view_->SetVisible(!recognizing);
500 498
501 // Needs to schedule paint of AppListView itself, to repaint the background. 499 // Needs to schedule paint of AppListView itself, to repaint the background.
502 GetBubbleFrameView()->SchedulePaint(); 500 GetBubbleFrameView()->SchedulePaint();
503 #endif 501 #endif
504 } 502 }
505 503
506 } // namespace app_list 504 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698