| 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 "chrome/browser/ui/views/status_bubble_views.h" | 5 #include "chrome/browser/ui/views/status_bubble_views.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 // On Windows use the software compositor to ensure that we don't block | 646 // On Windows use the software compositor to ensure that we don't block |
| 647 // the UI thread blocking issue during command buffer creation. We can | 647 // the UI thread blocking issue during command buffer creation. We can |
| 648 // revert this change once http://crbug.com/125248 is fixed. | 648 // revert this change once http://crbug.com/125248 is fixed. |
| 649 params.force_software_compositing = true; | 649 params.force_software_compositing = true; |
| 650 #endif | 650 #endif |
| 651 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 651 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
| 652 params.accept_events = false; | 652 params.accept_events = false; |
| 653 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 653 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 654 params.parent = frame->GetNativeView(); | 654 params.parent = frame->GetNativeView(); |
| 655 params.context = frame->GetNativeWindow(); | 655 params.context = frame->GetNativeWindow(); |
| 656 params.name = "StatusBubble"; |
| 656 #if defined(USE_AURA) | 657 #if defined(USE_AURA) |
| 657 params.mus_properties | 658 params.mus_properties |
| 658 [ui::mojom::WindowManager::kWindowIgnoredByShelf_InitProperty] = | 659 [ui::mojom::WindowManager::kWindowIgnoredByShelf_InitProperty] = |
| 659 mojo::ConvertTo<std::vector<uint8_t>>(true); | 660 mojo::ConvertTo<std::vector<uint8_t>>(true); |
| 660 #endif | 661 #endif |
| 661 popup_->Init(params); | 662 popup_->Init(params); |
| 662 // We do our own animation and don't want any from the system. | 663 // We do our own animation and don't want any from the system. |
| 663 popup_->SetVisibilityChangedAnimationsEnabled(false); | 664 popup_->SetVisibilityChangedAnimationsEnabled(false); |
| 664 popup_->SetOpacity(0.f); | 665 popup_->SetOpacity(0.f); |
| 665 popup_->SetContentsView(view_); | 666 popup_->SetContentsView(view_); |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 948 void StatusBubbleViews::SetBubbleWidth(int width) { | 949 void StatusBubbleViews::SetBubbleWidth(int width) { |
| 949 size_.set_width(width); | 950 size_.set_width(width); |
| 950 SetBounds(original_position_.x(), original_position_.y(), | 951 SetBounds(original_position_.x(), original_position_.y(), |
| 951 size_.width(), size_.height()); | 952 size_.width(), size_.height()); |
| 952 } | 953 } |
| 953 | 954 |
| 954 void StatusBubbleViews::CancelExpandTimer() { | 955 void StatusBubbleViews::CancelExpandTimer() { |
| 955 if (expand_timer_factory_.HasWeakPtrs()) | 956 if (expand_timer_factory_.HasWeakPtrs()) |
| 956 expand_timer_factory_.InvalidateWeakPtrs(); | 957 expand_timer_factory_.InvalidateWeakPtrs(); |
| 957 } | 958 } |
| OLD | NEW |