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

Unified Diff: chrome/browser/ui/views/app_list/app_list_dialog/app_list_dialog_non_client_view.h

Issue 306023011: Add new DialogDelegate for dialogs in the App List (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Split into separate files, fixed unittest and removed no-longer-needed overlay from AppList Created 6 years, 6 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
Index: chrome/browser/ui/views/app_list/app_list_dialog/app_list_dialog_non_client_view.h
diff --git a/chrome/browser/ui/views/app_list/app_list_dialog/app_list_dialog_non_client_view.h b/chrome/browser/ui/views/app_list/app_list_dialog/app_list_dialog_non_client_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..2f89b72186c5a58789991e2b31852460970af03f
--- /dev/null
+++ b/chrome/browser/ui/views/app_list/app_list_dialog/app_list_dialog_non_client_view.h
@@ -0,0 +1,58 @@
+// Copyright 2014 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 CHROME_BROWSER_UI_VIEWS_APP_LIST_APP_LIST_DIALOG_APP_LIST_DIALOG_NON_CLIENT_VIEW_H_
+#define CHROME_BROWSER_UI_VIEWS_APP_LIST_APP_LIST_DIALOG_APP_LIST_DIALOG_NON_CLIENT_VIEW_H_
+
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/views/controls/button/button.h"
+#include "ui/views/window/non_client_view.h"
+
+namespace gfx {
+class Path;
+class Point;
+}
+
+namespace ui {
+class Event;
+}
+
+namespace views {
+class LabelButton;
+}
+
+// The non-client view of a dialog that covers the App List, which consists of
+// a background overlay and close button.
+class AppListDialogNonClientView : public views::NonClientFrameView,
+ public views::ButtonListener {
+ public:
+ AppListDialogNonClientView();
+ virtual ~AppListDialogNonClientView();
+
+ // Overridden from views::NonClientFrameView:
+ 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;
+
+ // Overridden from views::View:
+ virtual void Layout() OVERRIDE;
+
+ // Overridden from views::ButtonListener:
+ virtual void ButtonPressed(views::Button* sender,
+ const ui::Event& event) OVERRIDE;
+
+ private:
+ views::LabelButton* close_;
tapted 2014/06/11 08:35:00 nit: close_ -> close_button_
sashab 2014/06/12 00:13:43 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(AppListDialogNonClientView);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_APP_LIST_APP_LIST_DIALOG_APP_LIST_DIALOG_NON_CLIENT_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698