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/search_result_view.h" | 5 #include "ui/app_list/views/search_result_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ui/app_list/app_list_constants.h" | 9 #include "ui/app_list/app_list_constants.h" |
10 #include "ui/app_list/search_result.h" | 10 #include "ui/app_list/search_result.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 result_ = result; | 92 result_ = result; |
93 if (result_) | 93 if (result_) |
94 result_->AddObserver(this); | 94 result_->AddObserver(this); |
95 | 95 |
96 OnIconChanged(); | 96 OnIconChanged(); |
97 OnActionsChanged(); | 97 OnActionsChanged(); |
98 UpdateTitleText(); | 98 UpdateTitleText(); |
99 UpdateDetailsText(); | 99 UpdateDetailsText(); |
100 OnIsInstallingChanged(); | 100 OnIsInstallingChanged(); |
| 101 OnPercentDownloadedChanged(); |
101 SchedulePaint(); | 102 SchedulePaint(); |
102 } | 103 } |
103 | 104 |
104 void SearchResultView::ClearResultNoRepaint() { | 105 void SearchResultView::ClearResultNoRepaint() { |
105 if (result_) | 106 if (result_) |
106 result_->RemoveObserver(this); | 107 result_->RemoveObserver(this); |
107 result_ = NULL; | 108 result_ = NULL; |
108 } | 109 } |
109 | 110 |
110 void SearchResultView::ClearSelectedAction() { | 111 void SearchResultView::ClearSelectedAction() { |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 if (context_menu_runner_->RunMenuAt(GetWidget(), | 349 if (context_menu_runner_->RunMenuAt(GetWidget(), |
349 NULL, | 350 NULL, |
350 gfx::Rect(point, gfx::Size()), | 351 gfx::Rect(point, gfx::Size()), |
351 views::MENU_ANCHOR_TOPLEFT, | 352 views::MENU_ANCHOR_TOPLEFT, |
352 source_type) == | 353 source_type) == |
353 views::MenuRunner::MENU_DELETED) | 354 views::MenuRunner::MENU_DELETED) |
354 return; | 355 return; |
355 } | 356 } |
356 | 357 |
357 } // namespace app_list | 358 } // namespace app_list |
OLD | NEW |