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

Side by Side Diff: chrome/browser/ui/views/message_center/message_center_frame_view.cc

Issue 18003003: Message center re-organized (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/views/message_center/message_center_frame_view.h"
6
7 #include "ui/base/hit_test.h"
8 #include "ui/message_center/message_center_style.h"
9 #include "ui/views/shadow_border.h"
10 #include "ui/views/widget/widget.h"
11
12 namespace {
13
14 const int kBorderWidth = 1;
15 const int kShadowBlur = 8;
16
17 } // namepspace
18
19 namespace message_center {
20
21 MessageCenterFrameView::MessageCenterFrameView() {
22 #if defined(OS_WIN)
dewittj 2013/07/16 18:24:01 I'd prefer if the condition were opposite, so that
sidharthms 2013/07/16 21:31:23 Done.
23 set_border(new views::ShadowBorder(kShadowBlur,
24 message_center::kMessageCenterShadowColor,
25 0, // Vertical offset
26 0)); // Horizontal offset
27 #else
28 set_border(views::Border::CreateSolidBorder(
29 kBorderWidth, message_center::kMessageCenterBorderColor));
30 #endif
31 }
32
33 MessageCenterFrameView::~MessageCenterFrameView() {}
34
35 gfx::Rect MessageCenterFrameView::GetBoundsForClientView() const {
36 gfx::Rect client_bounds = GetLocalBounds();
37 client_bounds.Inset(GetInsets());
38 return client_bounds;
39 }
40
41 gfx::Rect MessageCenterFrameView::GetWindowBoundsForClientBounds(
42 const gfx::Rect& client_bounds) const {
43 gfx::Rect window_bounds = client_bounds;
44 window_bounds.Inset(GetInsets());
45 return window_bounds;
46 }
47
48 int MessageCenterFrameView::NonClientHitTest(const gfx::Point& point) {
49 gfx::Rect frame_bounds = bounds();
50 frame_bounds.Inset(GetInsets());
51 if (!frame_bounds.Contains(point))
52 return HTNOWHERE;
53
54 return GetWidget()->client_view()->NonClientHitTest(point);
55 }
56
57 void MessageCenterFrameView::GetWindowMask(const gfx::Size& size,
58 gfx::Path* window_mask) {}
dewittj 2013/07/16 18:24:01 Make this match the style of the others, put the }
sidharthms 2013/07/16 21:31:23 Done. Missed that one. cl-format always puts empty
59
60 void MessageCenterFrameView::ResetWindowControls() {
61 }
62
63 void MessageCenterFrameView::UpdateWindowIcon() {
64 }
65
66 void MessageCenterFrameView::UpdateWindowTitle() {
67 }
68
69 gfx::Insets MessageCenterFrameView::GetInsets() const {
70 return border()->GetInsets();
71 }
72
73 const char* MessageCenterFrameView::GetClassName() const {
74 return "MessageCenterFrameView";
75 }
76
77 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698