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

Side by Side Diff: ui/views/bubble/bubble_delegate.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 11 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
« no previous file with comments | « ui/views/border.cc ('k') | ui/views/bubble/bubble_frame_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/views/bubble/bubble_delegate.h" 5 #include "ui/views/bubble/bubble_delegate.h"
6 6
7 #include "ui/base/accessibility/accessible_view_state.h" 7 #include "ui/base/accessibility/accessible_view_state.h"
8 #include "ui/gfx/animation/slide_animation.h" 8 #include "ui/gfx/animation/slide_animation.h"
9 #include "ui/gfx/color_utils.h" 9 #include "ui/gfx/color_utils.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 View* BubbleDelegateView::GetContentsView() { 129 View* BubbleDelegateView::GetContentsView() {
130 return this; 130 return this;
131 } 131 }
132 132
133 NonClientFrameView* BubbleDelegateView::CreateNonClientFrameView( 133 NonClientFrameView* BubbleDelegateView::CreateNonClientFrameView(
134 Widget* widget) { 134 Widget* widget) {
135 BubbleFrameView* frame = new BubbleFrameView(margins()); 135 BubbleFrameView* frame = new BubbleFrameView(margins());
136 BubbleBorder::Arrow adjusted_arrow = arrow(); 136 BubbleBorder::Arrow adjusted_arrow = arrow();
137 if (base::i18n::IsRTL()) 137 if (base::i18n::IsRTL())
138 adjusted_arrow = BubbleBorder::horizontal_mirror(adjusted_arrow); 138 adjusted_arrow = BubbleBorder::horizontal_mirror(adjusted_arrow);
139 frame->SetBubbleBorder(new BubbleBorder(adjusted_arrow, shadow(), color())); 139 frame->SetBubbleBorder(scoped_ptr<BubbleBorder>(
140 new BubbleBorder(adjusted_arrow, shadow(), color())));
140 return frame; 141 return frame;
141 } 142 }
142 143
143 void BubbleDelegateView::GetAccessibleState(ui::AccessibleViewState* state) { 144 void BubbleDelegateView::GetAccessibleState(ui::AccessibleViewState* state) {
144 state->role = ui::AccessibilityTypes::ROLE_DIALOG; 145 state->role = ui::AccessibilityTypes::ROLE_DIALOG;
145 } 146 }
146 147
147 void BubbleDelegateView::OnWidgetDestroying(Widget* widget) { 148 void BubbleDelegateView::OnWidgetDestroying(Widget* widget) {
148 if (anchor_widget() == widget) 149 if (anchor_widget() == widget)
149 SetAnchorView(NULL); 150 SetAnchorView(NULL);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 } 342 }
342 343
343 void BubbleDelegateView::HandleVisibilityChanged(Widget* widget, bool visible) { 344 void BubbleDelegateView::HandleVisibilityChanged(Widget* widget, bool visible) {
344 if (widget == GetWidget() && visible && anchor_widget() && 345 if (widget == GetWidget() && visible && anchor_widget() &&
345 anchor_widget()->GetTopLevelWidget()) { 346 anchor_widget()->GetTopLevelWidget()) {
346 anchor_widget()->GetTopLevelWidget()->DisableInactiveRendering(); 347 anchor_widget()->GetTopLevelWidget()->DisableInactiveRendering();
347 } 348 }
348 } 349 }
349 350
350 } // namespace views 351 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/border.cc ('k') | ui/views/bubble/bubble_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698