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

Side by Side Diff: chrome/browser/ui/views/status_bubble_views.cc

Issue 2578893003: Converts chrome to aura-mus (Closed)
Patch Set: merge again Created 4 years 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 "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"
11 #include "base/location.h" 11 #include "base/location.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
14 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "base/threading/thread_task_runner_handle.h" 16 #include "base/threading/thread_task_runner_handle.h"
17 #include "build/build_config.h" 17 #include "build/build_config.h"
18 #include "chrome/browser/themes/theme_properties.h" 18 #include "chrome/browser/themes/theme_properties.h"
19 #include "components/url_formatter/elide_url.h" 19 #include "components/url_formatter/elide_url.h"
20 #include "components/url_formatter/url_formatter.h" 20 #include "components/url_formatter/url_formatter.h"
21 #include "services/service_manager/runner/common/client_util.h"
21 #include "third_party/skia/include/core/SkPaint.h" 22 #include "third_party/skia/include/core/SkPaint.h"
22 #include "third_party/skia/include/core/SkPath.h" 23 #include "third_party/skia/include/core/SkPath.h"
23 #include "third_party/skia/include/pathops/SkPathOps.h" 24 #include "third_party/skia/include/pathops/SkPathOps.h"
24 #include "ui/base/theme_provider.h" 25 #include "ui/base/theme_provider.h"
25 #include "ui/display/display.h" 26 #include "ui/display/display.h"
26 #include "ui/display/screen.h" 27 #include "ui/display/screen.h"
27 #include "ui/gfx/animation/animation_delegate.h" 28 #include "ui/gfx/animation/animation_delegate.h"
28 #include "ui/gfx/animation/linear_animation.h" 29 #include "ui/gfx/animation/linear_animation.h"
29 #include "ui/gfx/canvas.h" 30 #include "ui/gfx/canvas.h"
30 #include "ui/gfx/font_list.h" 31 #include "ui/gfx/font_list.h"
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 params.mus_properties 657 params.mus_properties
657 [ui::mojom::WindowManager::kWindowIgnoredByShelf_Property] = 658 [ui::mojom::WindowManager::kWindowIgnoredByShelf_Property] =
658 mojo::ConvertTo<std::vector<uint8_t>>(true); 659 mojo::ConvertTo<std::vector<uint8_t>>(true);
659 #endif 660 #endif
660 popup_->Init(params); 661 popup_->Init(params);
661 // We do our own animation and don't want any from the system. 662 // We do our own animation and don't want any from the system.
662 popup_->SetVisibilityChangedAnimationsEnabled(false); 663 popup_->SetVisibilityChangedAnimationsEnabled(false);
663 popup_->SetOpacity(0.f); 664 popup_->SetOpacity(0.f);
664 popup_->SetContentsView(view_); 665 popup_->SetContentsView(view_);
665 #if defined(USE_ASH) 666 #if defined(USE_ASH)
666 ash::wm::GetWindowState(popup_->GetNativeWindow())-> 667 // TODO: http://crbug.com/671729 convert to WindowProperty (and then can
667 set_ignored_by_shelf(true); 668 // remove explicit kWindowIgnoredByShelf_Property above and make this ifdef
669 // USE_AURA).
670 if (!service_manager::ServiceManagerIsRemote()) {
671 ash::wm::GetWindowState(popup_->GetNativeWindow())
672 ->set_ignored_by_shelf(true);
673 }
668 #endif 674 #endif
669 RepositionPopup(); 675 RepositionPopup();
670 } 676 }
671 } 677 }
672 678
673 void StatusBubbleViews::Reposition() { 679 void StatusBubbleViews::Reposition() {
674 // Overlap the client edge that's shown in restored mode, or when there is no 680 // Overlap the client edge that's shown in restored mode, or when there is no
675 // client edge this makes the bubble snug with the corner of the window. 681 // client edge this makes the bubble snug with the corner of the window.
676 int overlap = kShadowThickness; 682 int overlap = kShadowThickness;
677 int height = GetPreferredSize().height(); 683 int height = GetPreferredSize().height();
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 void StatusBubbleViews::SetBubbleWidth(int width) { 951 void StatusBubbleViews::SetBubbleWidth(int width) {
946 size_.set_width(width); 952 size_.set_width(width);
947 SetBounds(original_position_.x(), original_position_.y(), 953 SetBounds(original_position_.x(), original_position_.y(),
948 size_.width(), size_.height()); 954 size_.width(), size_.height());
949 } 955 }
950 956
951 void StatusBubbleViews::CancelExpandTimer() { 957 void StatusBubbleViews::CancelExpandTimer() {
952 if (expand_timer_factory_.HasWeakPtrs()) 958 if (expand_timer_factory_.HasWeakPtrs())
953 expand_timer_factory_.InvalidateWeakPtrs(); 959 expand_timer_factory_.InvalidateWeakPtrs();
954 } 960 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698