| 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 "base/win/windows_version.h" |
| 10 #include "ui/app_list/app_list_constants.h" | 10 #include "ui/app_list/app_list_constants.h" |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 gfx::Rect speech_bounds = contents_bounds; | 399 gfx::Rect speech_bounds = contents_bounds; |
| 400 int preferred_height = speech_view_->GetPreferredSize().height(); | 400 int preferred_height = speech_view_->GetPreferredSize().height(); |
| 401 speech_bounds.Inset(kSpeechUIMargin, kSpeechUIMargin); | 401 speech_bounds.Inset(kSpeechUIMargin, kSpeechUIMargin); |
| 402 speech_bounds.set_height(std::min(speech_bounds.height(), | 402 speech_bounds.set_height(std::min(speech_bounds.height(), |
| 403 preferred_height)); | 403 preferred_height)); |
| 404 speech_bounds.Inset(-speech_view_->GetInsets()); | 404 speech_bounds.Inset(-speech_view_->GetInsets()); |
| 405 speech_view_->SetBoundsRect(speech_bounds); | 405 speech_view_->SetBoundsRect(speech_bounds); |
| 406 } | 406 } |
| 407 } | 407 } |
| 408 | 408 |
| 409 void AppListView::SchedulePaintInRect(const gfx::Rect& rect) { |
| 410 BubbleDelegateView::SchedulePaintInRect(rect); |
| 411 if (GetBubbleFrameView()) |
| 412 GetBubbleFrameView()->SchedulePaint(); |
| 413 } |
| 414 |
| 409 void AppListView::OnWidgetDestroying(views::Widget* widget) { | 415 void AppListView::OnWidgetDestroying(views::Widget* widget) { |
| 410 BubbleDelegateView::OnWidgetDestroying(widget); | 416 BubbleDelegateView::OnWidgetDestroying(widget); |
| 411 if (delegate_ && widget == GetWidget()) | 417 if (delegate_ && widget == GetWidget()) |
| 412 delegate_->ViewClosing(); | 418 delegate_->ViewClosing(); |
| 413 } | 419 } |
| 414 | 420 |
| 415 void AppListView::OnWidgetActivationChanged(views::Widget* widget, | 421 void AppListView::OnWidgetActivationChanged(views::Widget* widget, |
| 416 bool active) { | 422 bool active) { |
| 417 // Do not called inherited function as the bubble delegate auto close | 423 // Do not called inherited function as the bubble delegate auto close |
| 418 // functionality is not used. | 424 // functionality is not used. |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 #else | 498 #else |
| 493 speech_view_->SetVisible(recognizing); | 499 speech_view_->SetVisible(recognizing); |
| 494 app_list_main_view_->SetVisible(!recognizing); | 500 app_list_main_view_->SetVisible(!recognizing); |
| 495 | 501 |
| 496 // Needs to schedule paint of AppListView itself, to repaint the background. | 502 // Needs to schedule paint of AppListView itself, to repaint the background. |
| 497 GetBubbleFrameView()->SchedulePaint(); | 503 GetBubbleFrameView()->SchedulePaint(); |
| 498 #endif | 504 #endif |
| 499 } | 505 } |
| 500 | 506 |
| 501 } // namespace app_list | 507 } // namespace app_list |
| OLD | NEW |