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

Unified Diff: apps/ui/views/shell_window_frame_view.h

Issue 27029006: apps: Move chrome's ShellWindowFrameView into apps/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 7 years, 2 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 | « apps/ui/views/DEPS ('k') | apps/ui/views/shell_window_frame_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/ui/views/shell_window_frame_view.h
diff --git a/chrome/browser/ui/views/extensions/shell_window_frame_view.h b/apps/ui/views/shell_window_frame_view.h
similarity index 68%
rename from chrome/browser/ui/views/extensions/shell_window_frame_view.h
rename to apps/ui/views/shell_window_frame_view.h
index a244b02a3b55e757364a1d646c36918d80c5ab52..d39410a21eddc1bccb741b50bbf50c97c16226b6 100644
--- a/chrome/browser/ui/views/extensions/shell_window_frame_view.h
+++ b/apps/ui/views/shell_window_frame_view.h
@@ -2,8 +2,8 @@
// 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_EXTENSIONS_SHELL_WINDOW_FRAME_VIEW_H_
-#define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_FRAME_VIEW_H_
+#ifndef APPS_UI_VIEWS_SHELL_WINDOW_FRAME_VIEW_H_
+#define APPS_UI_VIEWS_SHELL_WINDOW_FRAME_VIEW_H_
#include <string>
@@ -27,7 +27,9 @@ class ImageButton;
class Widget;
}
-class NativeAppWindowViews;
+namespace apps {
+
+class NativeAppWindow;
// A frameless or non-Ash, non-panel NonClientFrameView for app windows.
class ShellWindowFrameView : public views::NonClientFrameView,
@@ -35,10 +37,17 @@ class ShellWindowFrameView : public views::NonClientFrameView,
public:
static const char kViewClassName[];
- explicit ShellWindowFrameView(NativeAppWindowViews* window);
+ explicit ShellWindowFrameView(NativeAppWindow* window);
virtual ~ShellWindowFrameView();
- void Init(views::Widget* frame);
+ // Initializes this for the window |frame|. Sets the number of pixels for
+ // which a click is interpreted as a resize for the inner and outer border of
+ // the window and the lower-right corner resize handle.
+ void Init(views::Widget* frame,
+ int resize_inside_bounds_size,
+ int resize_outside_bounds_size,
+ int resize_outside_scale_for_touch,
+ int resize_area_corner_size);
private:
// views::NonClientFrameView implementation.
@@ -64,14 +73,22 @@ class ShellWindowFrameView : public views::NonClientFrameView,
virtual void ButtonPressed(views::Button* sender, const ui::Event& event)
OVERRIDE;
- NativeAppWindowViews* window_;
+ NativeAppWindow* window_;
views::Widget* frame_;
views::ImageButton* close_button_;
views::ImageButton* maximize_button_;
views::ImageButton* restore_button_;
views::ImageButton* minimize_button_;
+ // Allow resize for clicks this many pixels inside the bounds.
+ int resize_inside_bounds_size_;
+
+ // Size in pixels of the lower-right corner resize handle.
+ int resize_area_corner_size_;
+
DISALLOW_COPY_AND_ASSIGN(ShellWindowFrameView);
};
-#endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_FRAME_VIEW_H_
+} // namespace apps
+
+#endif // APPS_UI_VIEWS_SHELL_WINDOW_FRAME_VIEW_H_
« no previous file with comments | « apps/ui/views/DEPS ('k') | apps/ui/views/shell_window_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698