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

Side by Side Diff: views/bubble/border_contents_view.cc

Issue 8565034: Add a drop shadow to the fullscreen exit bubble on windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 1 month 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/resources/ui_resources_standard.grd ('k') | views/bubble/bubble_border.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/bubble/border_contents_view.h" 5 #include "views/bubble/border_contents_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/gfx/screen.h" 9 #include "ui/gfx/screen.h"
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 BorderContentsView::~BorderContentsView() {} 71 BorderContentsView::~BorderContentsView() {}
72 72
73 void BorderContentsView::Init() { 73 void BorderContentsView::Init() {
74 // Default arrow location. 74 // Default arrow location.
75 BubbleBorder::ArrowLocation arrow_location = 75 BubbleBorder::ArrowLocation arrow_location =
76 BubbleBorder::TOP_LEFT; 76 BubbleBorder::TOP_LEFT;
77 if (base::i18n::IsRTL()) 77 if (base::i18n::IsRTL())
78 arrow_location = BubbleBorder::horizontal_mirror(arrow_location); 78 arrow_location = BubbleBorder::horizontal_mirror(arrow_location);
79 DCHECK(!bubble_border_); 79 DCHECK(!bubble_border_);
80 80
81 bubble_border_ = new BubbleBorder(arrow_location); 81 // TODO(alicet): Expose the shadow option in BorderContentsView when we make
82 // the fullscreen exit bubble use the new bubble code.
83 bubble_border_ = new BubbleBorder(arrow_location,
84 views::BubbleBorder::NO_SHADOW);
82 set_border(bubble_border_); 85 set_border(bubble_border_);
83 set_background(new BubbleBackground(bubble_border_)); 86 set_background(new BubbleBackground(bubble_border_));
84 } 87 }
85 88
86 void BorderContentsView::SetBackgroundColor(SkColor color) { 89 void BorderContentsView::SetBackgroundColor(SkColor color) {
87 bubble_border_->set_background_color(color); 90 bubble_border_->set_background_color(color);
88 } 91 }
89 92
90 void BorderContentsView::SetAlignment( 93 void BorderContentsView::SetAlignment(
91 views::BubbleBorder::BubbleAlignment alignment) { 94 views::BubbleBorder::BubbleAlignment alignment) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 GetInsetsLength(offscreen_insets, vertical)) { 176 GetInsetsLength(offscreen_insets, vertical)) {
174 *arrow_location = original_arrow_location; 177 *arrow_location = original_arrow_location;
175 bubble_border_->set_arrow_location(*arrow_location); 178 bubble_border_->set_arrow_location(*arrow_location);
176 *window_bounds = bubble_border_->GetBounds(position_relative_to, 179 *window_bounds = bubble_border_->GetBounds(position_relative_to,
177 local_contents_size); 180 local_contents_size);
178 } 181 }
179 } 182 }
180 } 183 }
181 184
182 } // namespace views 185 } // namespace views
OLDNEW
« no previous file with comments | « ui/resources/ui_resources_standard.grd ('k') | views/bubble/bubble_border.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698