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

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

Issue 10905311: Consolidate bubble border code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove USE_AURA ifdef for kBigShadowImages and kSmalleShadowImages Created 8 years, 3 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
« no previous file with comments | « ui/views/bubble/bubble_delegate.h ('k') | ui/views/bubble/bubble_frame_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/bubble_delegate.cc
diff --git a/ui/views/bubble/bubble_delegate.cc b/ui/views/bubble/bubble_delegate.cc
index fa3a7b92118d9ca494d297de61059962a4b18c47..12c3798185a9d7a4a101c7b045c09c5d87023359 100644
--- a/ui/views/bubble/bubble_delegate.cc
+++ b/ui/views/bubble/bubble_delegate.cc
@@ -111,13 +111,14 @@ BubbleDelegateView::BubbleDelegateView()
anchor_widget_(NULL),
move_with_anchor_(false),
arrow_location_(BubbleBorder::TOP_LEFT),
+ shadow_(BubbleBorder::NO_SHADOW),
color_(kBackgroundColor),
margins_(kDefaultMargin, kDefaultMargin, kDefaultMargin, kDefaultMargin),
original_opacity_(255),
border_widget_(NULL),
use_focusless_(false),
accept_events_(true),
- try_mirroring_arrow_(true),
+ adjust_if_offscreen_(true),
parent_window_(NULL) {
set_background(Background::CreateSolidBackground(color_));
AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE, ui::EF_NONE));
@@ -132,13 +133,14 @@ BubbleDelegateView::BubbleDelegateView(
anchor_widget_(NULL),
move_with_anchor_(false),
arrow_location_(arrow_location),
+ shadow_(BubbleBorder::NO_SHADOW),
color_(kBackgroundColor),
margins_(kDefaultMargin, kDefaultMargin, kDefaultMargin, kDefaultMargin),
original_opacity_(255),
border_widget_(NULL),
use_focusless_(false),
accept_events_(true),
- try_mirroring_arrow_(true),
+ adjust_if_offscreen_(true),
parent_window_(NULL) {
set_background(Background::CreateSolidBackground(color_));
AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE, ui::EF_NONE));
@@ -194,9 +196,7 @@ NonClientFrameView* BubbleDelegateView::CreateNonClientFrameView(
BubbleBorder::ArrowLocation arrow_loc = arrow_location();
if (base::i18n::IsRTL())
arrow_loc = BubbleBorder::horizontal_mirror(arrow_loc);
- // TODO(alicet): Expose the shadow option in BorderContentsView when we make
- // the fullscreen exit bubble use the new bubble code.
- BubbleBorder* border = new BubbleBorder(arrow_loc, BubbleBorder::NO_SHADOW);
+ 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));
@@ -350,7 +350,7 @@ gfx::Rect BubbleDelegateView::GetBubbleBounds() {
// The argument rect has its origin at the bubble's arrow anchor point;
// its size is the preferred size of the bubble's client view (this view).
return GetBubbleFrameView()->GetUpdatedWindowBounds(GetAnchorRect(),
- GetPreferredSize(), try_mirroring_arrow_);
+ GetPreferredSize(), adjust_if_offscreen_);
}
#if defined(OS_WIN) && !defined(USE_AURA)
« no previous file with comments | « ui/views/bubble/bubble_delegate.h ('k') | ui/views/bubble/bubble_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698