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

Side by Side Diff: athena/activity/activity_frame_view.h

Issue 863033002: Delete athena/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « athena/activity/activity_factory.cc ('k') | athena/activity/activity_frame_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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 #ifndef ATHENA_ACTIVITY_ACTIVITY_FRAME_VIEW_H_
6 #define ATHENA_ACTIVITY_ACTIVITY_FRAME_VIEW_H_
7
8 #include "athena/activity/public/activity_view.h"
9 #include "athena/wm/public/window_manager_observer.h"
10 #include "ui/gfx/geometry/insets.h"
11 #include "ui/views/window/non_client_view.h"
12
13 namespace views {
14 class ImageView;
15 class Label;
16 class Widget;
17 }
18
19 namespace athena {
20
21 class ActivityViewModel;
22
23 // A NonClientFrameView used for activity.
24 class ActivityFrameView : public views::NonClientFrameView,
25 public WindowManagerObserver,
26 public ActivityView {
27 public:
28 // The frame class name.
29 static const char kViewClassName[];
30
31 ActivityFrameView(views::Widget* frame, ActivityViewModel* view_model);
32 ~ActivityFrameView() override;
33
34 // views::NonClientFrameView:
35 gfx::Rect GetBoundsForClientView() const override;
36 gfx::Rect GetWindowBoundsForClientBounds(
37 const gfx::Rect& client_bounds) const override;
38 int NonClientHitTest(const gfx::Point& point) override;
39 void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override;
40 void ResetWindowControls() override;
41 void UpdateWindowIcon() override;
42 void UpdateWindowTitle() override;
43 void SizeConstraintsChanged() override;
44
45 // views::View:
46 gfx::Size GetPreferredSize() const override;
47 const char* GetClassName() const override;
48 void Layout() override;
49 void OnPaintBackground(gfx::Canvas* canvas) override;
50
51 private:
52 // ActivityView:
53 void UpdateTitle() override;
54 void UpdateIcon() override;
55 void UpdateRepresentativeColor() override;
56
57 // WindowManagerObserver:
58 void OnOverviewModeEnter() override;
59 void OnOverviewModeExit() override;
60 void OnSplitViewModeEnter() override;
61 void OnSplitViewModeExit() override;
62
63 gfx::Insets NonClientBorderInsets() const;
64 int NonClientBorderThickness() const;
65 int NonClientTopBorderHeight() const;
66
67 // Not owned.
68 views::Widget* frame_;
69 ActivityViewModel* view_model_;
70 views::Label* title_;
71 views::ImageView* icon_;
72
73 // Whether overview mode is active.
74 bool in_overview_;
75
76 DISALLOW_COPY_AND_ASSIGN(ActivityFrameView);
77 };
78
79 } // namespace athena
80
81 #endif // ATHENA_ACTIVITY_ACTIVITY_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « athena/activity/activity_factory.cc ('k') | athena/activity/activity_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698