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

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

Issue 2794001: Notification balloons don't want the WS_EX_LAYOUTRTL style flag, since the di... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: new naming, comment Created 10 years, 6 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/views/status_bubble_views.h" 5 #include "chrome/browser/views/status_bubble_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/linear_animation.h" 9 #include "app/linear_animation.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 StatusBubbleViews::~StatusBubbleViews() { 550 StatusBubbleViews::~StatusBubbleViews() {
551 CancelExpandTimer(); 551 CancelExpandTimer();
552 if (popup_.get()) 552 if (popup_.get())
553 popup_->CloseNow(); 553 popup_->CloseNow();
554 } 554 }
555 555
556 void StatusBubbleViews::Init() { 556 void StatusBubbleViews::Init() {
557 if (!popup_.get()) { 557 if (!popup_.get()) {
558 popup_.reset(Widget::CreatePopupWidget(Widget::Transparent, 558 popup_.reset(Widget::CreatePopupWidget(Widget::Transparent,
559 Widget::NotAcceptEvents, 559 Widget::NotAcceptEvents,
560 Widget::NotDeleteOnDestroy)); 560 Widget::NotDeleteOnDestroy,
561 Widget::MirrorOriginInRTL));
561 if (!view_) 562 if (!view_)
562 view_ = new StatusView(this, popup_.get(), frame_->GetThemeProvider()); 563 view_ = new StatusView(this, popup_.get(), frame_->GetThemeProvider());
563 if (!expand_view_.get()) 564 if (!expand_view_.get())
564 expand_view_.reset(new StatusViewExpander(this, view_)); 565 expand_view_.reset(new StatusViewExpander(this, view_));
565 popup_->SetOpacity(0x00); 566 popup_->SetOpacity(0x00);
566 popup_->Init(frame_->GetNativeView(), gfx::Rect()); 567 popup_->Init(frame_->GetNativeView(), gfx::Rect());
567 popup_->SetContentsView(view_); 568 popup_->SetContentsView(view_);
568 Reposition(); 569 Reposition();
569 popup_->Show(); 570 popup_->Show();
570 } 571 }
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 835
835 void StatusBubbleViews::SetBubbleWidth(int width) { 836 void StatusBubbleViews::SetBubbleWidth(int width) {
836 size_.set_width(width); 837 size_.set_width(width);
837 SetBounds(position_.x(), position_.y(), size_.width(), size_.height()); 838 SetBounds(position_.x(), position_.y(), size_.width(), size_.height());
838 } 839 }
839 840
840 void StatusBubbleViews::CancelExpandTimer() { 841 void StatusBubbleViews::CancelExpandTimer() {
841 if (!expand_timer_factory_.empty()) 842 if (!expand_timer_factory_.empty())
842 expand_timer_factory_.RevokeAll(); 843 expand_timer_factory_.RevokeAll();
843 } 844 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698