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

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

Issue 8887003: Add support for high contrast mode to bubbles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux aura build Created 9 years 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 | « chrome/browser/ui/views/avatar_menu_bubble_view.cc ('k') | no next file » | 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 "ui/views/bubble/bubble_delegate.h" 5 #include "ui/views/bubble/bubble_delegate.h"
6 6
7 #include "ui/base/animation/slide_animation.h" 7 #include "ui/base/animation/slide_animation.h"
8 #include "ui/gfx/color_utils.h"
8 #include "ui/views/bubble/bubble_frame_view.h" 9 #include "ui/views/bubble/bubble_frame_view.h"
9 #include "ui/views/widget/widget.h" 10 #include "ui/views/widget/widget.h"
10 11
11 // The duration of the fade animation in milliseconds. 12 // The duration of the fade animation in milliseconds.
12 static const int kHideFadeDurationMS = 200; 13 static const int kHideFadeDurationMS = 200;
13 14
14 namespace views { 15 namespace views {
15 16
16 namespace { 17 namespace {
17 18
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 border_params.parent_widget = parent; 65 border_params.parent_widget = parent;
65 if (!border_params.parent_widget) 66 if (!border_params.parent_widget)
66 border_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 67 border_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
67 border_widget->Init(border_params); 68 border_widget->Init(border_params);
68 return border_widget; 69 return border_widget;
69 } 70 }
70 #endif 71 #endif
71 72
72 } // namespace 73 } // namespace
73 74
74 // TODO(msw): Use NativeTheme/color_helper (crbug.com/105023). 75 #if defined(OS_WIN) && !defined(USE_AURA)
76 const SkColor BubbleDelegateView::kBackgroundColor =
77 color_utils::GetSysSkColor(COLOR_WINDOW);
78 #else
79 // TODO(beng): source from theme provider.
75 const SkColor BubbleDelegateView::kBackgroundColor = SK_ColorWHITE; 80 const SkColor BubbleDelegateView::kBackgroundColor = SK_ColorWHITE;
81 #endif
76 82
77 BubbleDelegateView::BubbleDelegateView() 83 BubbleDelegateView::BubbleDelegateView()
78 : close_on_esc_(true), 84 : close_on_esc_(true),
79 close_on_deactivate_(true), 85 close_on_deactivate_(true),
80 allow_bubble_offscreen_(false), 86 allow_bubble_offscreen_(false),
81 anchor_view_(NULL), 87 anchor_view_(NULL),
82 arrow_location_(BubbleBorder::TOP_LEFT), 88 arrow_location_(BubbleBorder::TOP_LEFT),
83 color_(kBackgroundColor), 89 color_(kBackgroundColor),
84 original_opacity_(255), 90 original_opacity_(255),
85 border_widget_(NULL), 91 border_widget_(NULL),
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 291
286 #if defined(OS_WIN) && !defined(USE_AURA) 292 #if defined(OS_WIN) && !defined(USE_AURA)
287 gfx::Rect BubbleDelegateView::GetBubbleClientBounds() const { 293 gfx::Rect BubbleDelegateView::GetBubbleClientBounds() const {
288 gfx::Rect client_bounds(GetBubbleFrameView()->GetBoundsForClientView()); 294 gfx::Rect client_bounds(GetBubbleFrameView()->GetBoundsForClientView());
289 client_bounds.Offset(border_widget_->GetWindowScreenBounds().origin()); 295 client_bounds.Offset(border_widget_->GetWindowScreenBounds().origin());
290 return client_bounds; 296 return client_bounds;
291 } 297 }
292 #endif 298 #endif
293 299
294 } // namespace views 300 } // namespace views
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/avatar_menu_bubble_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698