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

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: Comments applied 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/widget/widget.h"
10
11 namespace message_center {
12
13 MessageCenterFrameView::MessageCenterFrameView(int border_width)
14 : border_width_(border_width) {
15 set_border(views::Border::CreateSolidBorder(border_width, kFrameBorderColor));
16 }
17
18 MessageCenterFrameView::~MessageCenterFrameView() {}
19
20 gfx::Rect MessageCenterFrameView::GetBoundsForClientView() const {
21 gfx::Rect client_bounds = GetLocalBounds();
22 client_bounds.Inset(GetInsets());
23 return client_bounds;
24 }
25
26 gfx::Rect MessageCenterFrameView::GetWindowBoundsForClientBounds(
27 const gfx::Rect& client_bounds) const {
28 gfx::Rect window_bounds = client_bounds;
29 window_bounds.Inset(GetInsets());
30 return window_bounds;
31 }
32
33 int MessageCenterFrameView::NonClientHitTest(const gfx::Point& point) {
34 if (!bounds().Contains(point))
35 return HTNOWHERE;
36
37 return GetWidget()->client_view()->NonClientHitTest(point);
38 }
39
40 gfx::Insets MessageCenterFrameView::GetInsets() const {
41 return gfx::Insets(
42 border_width_, border_width_, border_width_, border_width_);
43 }
44
45 const char* MessageCenterFrameView::GetClassName() const {
46 return "MessageCenterFrameView";
47 }
48
49 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698