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

Unified Diff: ui/views/bubble/bubble_delegate.cc

Issue 12096084: Cleanup BubbleFrameView and BubbleBorder construction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Additional refactoring and cleanup. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/bubble/bubble_delegate.cc
diff --git a/ui/views/bubble/bubble_delegate.cc b/ui/views/bubble/bubble_delegate.cc
index 844598e86ef956741b177b98eaaa0feea16ef37f..ac03d4a7a77e41b318d0acbc6865296bb69f5fa1 100644
--- a/ui/views/bubble/bubble_delegate.cc
+++ b/ui/views/bubble/bubble_delegate.cc
@@ -184,14 +184,11 @@ View* BubbleDelegateView::GetContentsView() {
NonClientFrameView* BubbleDelegateView::CreateNonClientFrameView(
Widget* widget) {
- BubbleBorder::ArrowLocation arrow_loc = arrow_location();
- if (base::i18n::IsRTL())
- arrow_loc = BubbleBorder::horizontal_mirror(arrow_loc);
- BubbleBorder* border = new BubbleBorder(arrow_loc, shadow_);
- border->set_background_color(color());
- BubbleFrameView* frame_view = new BubbleFrameView(margins(), border);
- frame_view->set_background(new BubbleBackground(border));
- return frame_view;
+ BubbleFrameView* frame = new BubbleFrameView(margins());
+ BubbleBorder::ArrowLocation arrow = base::i18n::IsRTL() ?
+ BubbleBorder::horizontal_mirror(arrow_location()) : arrow_location();
+ frame->SetBubbleBorder(new BubbleBorder(arrow, shadow(), color()));
+ return frame;
}
void BubbleDelegateView::OnWidgetClosing(Widget* widget) {

Powered by Google App Engine
This is Rietveld 408576698