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

Unified Diff: ash/wm/dialog_frame_view.h

Issue 9187061: Preliminary implementation of Google-style dialogs in ash::internal::DialogFrameView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/wm/dialog_frame_view.cc » ('j') | ash/wm/dialog_frame_view.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/dialog_frame_view.h
diff --git a/ash/wm/dialog_frame_view.h b/ash/wm/dialog_frame_view.h
index 1a89f39703dbcf2a7851fe47c1d78e7596d8b2e9..21c9b13bec38a80d8812effb15a17522f6123d56 100644
--- a/ash/wm/dialog_frame_view.h
+++ b/ash/wm/dialog_frame_view.h
@@ -6,17 +6,25 @@
#define ASH_WM_DIALOG_FRAME_VIEW_H_
#pragma once
+#include "ui/views/controls/button/button.h"
#include "ui/views/window/non_client_view.h"
+class SkBitmap;
+
namespace gfx {
class Font;
}
+namespace views {
+class ImageButton;
+}
+
namespace ash {
namespace internal {
// A NonClientFrameView that implements a Google-style for dialogs.
-class DialogFrameView : public views::NonClientFrameView {
+class DialogFrameView : public views::NonClientFrameView,
+ public views::ButtonListener {
public:
// Internal class name.
static const char kViewClassName[];
@@ -38,14 +46,18 @@ class DialogFrameView : public views::NonClientFrameView {
virtual std::string GetClassName() const OVERRIDE;
virtual void Layout() OVERRIDE;
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
+
+ // Overridden from views::ButtonListener:
+ virtual void ButtonPressed(views::Button* sender,
+ const views::Event& event) OVERRIDE;
private:
- int GetNonClientTopHeight() const;
+ gfx::Insets GetPaddingInsets() const;
+ gfx::Insets GetClientInsets() const;
gfx::Rect title_display_rect_;
- gfx::Rect close_button_rect_;
+
+ views::ImageButton* close_button_;
static gfx::Font* title_font_;
« no previous file with comments | « no previous file | ash/wm/dialog_frame_view.cc » ('j') | ash/wm/dialog_frame_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698