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

Unified Diff: athena/activity/activity_frame_view.h

Issue 375143002: Use Widget frame and WidgetDelegate in ActvityWidget (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | athena/activity/activity_frame_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/activity/activity_frame_view.h
diff --git a/athena/activity/activity_frame_view.h b/athena/activity/activity_frame_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..82e300468cefec9f4906bb16bbe558f5b4bb3c87
--- /dev/null
+++ b/athena/activity/activity_frame_view.h
@@ -0,0 +1,58 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ATHENA_ACTIVITY_ACTIVITY_FRAME_VIEW_H_
+#define ATHENA_ACTIVITY_ACTIVITY_FRAME_VIEW_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "ui/views/window/non_client_view.h"
+
+namespace views {
+class Label;
+class Widget;
+}
+
+namespace athena {
+
+class ActivityViewModel;
+
+// A NonClientFrameView used for activity.
+class ActivityFrameView : public views::NonClientFrameView {
+ public:
+ // Internal class name.
+ static const char kViewClassName[];
+
+ ActivityFrameView(views::Widget* frame, ActivityViewModel* view_model);
+ virtual ~ActivityFrameView();
+
+ // views::NonClientFrameView overrides:
+ virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
+ virtual gfx::Rect GetWindowBoundsForClientBounds(
+ const gfx::Rect& client_bounds) const OVERRIDE;
+ virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
+ virtual void GetWindowMask(const gfx::Size& size,
+ gfx::Path* window_mask) OVERRIDE;
+ virtual void ResetWindowControls() OVERRIDE;
+ virtual void UpdateWindowIcon() OVERRIDE;
+ virtual void UpdateWindowTitle() OVERRIDE;
+
+ // views::View overrides:
+ virtual gfx::Size GetPreferredSize() const OVERRIDE;
+ virtual const char* GetClassName() const OVERRIDE;
+ virtual void Layout() OVERRIDE;
+
+ private:
+ int NonClientTopBorderHeight() const;
+
+ // Not owned.
+ views::Widget* frame_;
+ ActivityViewModel* view_model_;
+ views::Label* title_;
+
+ DISALLOW_COPY_AND_ASSIGN(ActivityFrameView);
+};
+
+} // namespace athena
+
+#endif // ATHENA_ACTIVITY_ACTIVITY_FRAME_VIEW_H_
« no previous file with comments | « no previous file | athena/activity/activity_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698