| 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 <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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 void AppListView::Close() { | 190 void AppListView::Close() { |
| 191 app_list_main_view_->Close(); | 191 app_list_main_view_->Close(); |
| 192 delegate_->Dismiss(); | 192 delegate_->Dismiss(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 void AppListView::UpdateBounds() { | 195 void AppListView::UpdateBounds() { |
| 196 SizeToContents(); | 196 SizeToContents(); |
| 197 } | 197 } |
| 198 | 198 |
| 199 bool AppListView::ShouldCenterWindow() const { |
| 200 return delegate_->ShouldCenterWindow(); |
| 201 } |
| 202 |
| 199 gfx::Size AppListView::GetPreferredSize() { | 203 gfx::Size AppListView::GetPreferredSize() { |
| 200 return app_list_main_view_->GetPreferredSize(); | 204 return app_list_main_view_->GetPreferredSize(); |
| 201 } | 205 } |
| 202 | 206 |
| 203 void AppListView::Paint(gfx::Canvas* canvas) { | 207 void AppListView::Paint(gfx::Canvas* canvas) { |
| 204 views::BubbleDelegateView::Paint(canvas); | 208 views::BubbleDelegateView::Paint(canvas); |
| 205 if (g_next_paint_callback) { | 209 if (g_next_paint_callback) { |
| 206 g_next_paint_callback(); | 210 g_next_paint_callback(); |
| 207 g_next_paint_callback = NULL; | 211 g_next_paint_callback = NULL; |
| 208 } | 212 } |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 #else | 514 #else |
| 511 speech_view_->SetVisible(recognizing); | 515 speech_view_->SetVisible(recognizing); |
| 512 app_list_main_view_->SetVisible(!recognizing); | 516 app_list_main_view_->SetVisible(!recognizing); |
| 513 | 517 |
| 514 // Needs to schedule paint of AppListView itself, to repaint the background. | 518 // Needs to schedule paint of AppListView itself, to repaint the background. |
| 515 GetBubbleFrameView()->SchedulePaint(); | 519 GetBubbleFrameView()->SchedulePaint(); |
| 516 #endif | 520 #endif |
| 517 } | 521 } |
| 518 | 522 |
| 519 } // namespace app_list | 523 } // namespace app_list |
| OLD | NEW |