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

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

Issue 210363004: Linux: App windows with frame: chrome and no color are now native. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't need not IsFrameless(); that is implied by has_frame_color_. Created 6 years, 9 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/app_window_browsertest.cc ('k') | apps/ui/views/app_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/app_window_frame_view.h
diff --git a/apps/ui/views/app_window_frame_view.h b/apps/ui/views/app_window_frame_view.h
index 69e84e99598caf36dac4a8a74528ca3ed97be53e..64379f80f8e25396d24a117e58d03260ca086fdc 100644
--- a/apps/ui/views/app_window_frame_view.h
+++ b/apps/ui/views/app_window_frame_view.h
@@ -7,12 +7,15 @@
#include <string>
+#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/path.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/window/non_client_view.h"
+class SkRegion;
+
namespace gfx {
class Canvas;
class Point;
@@ -29,22 +32,24 @@ class Widget;
namespace apps {
-class NativeAppWindow;
-
// A frameless or non-Ash, non-panel NonClientFrameView for app windows.
class AppWindowFrameView : public views::NonClientFrameView,
public views::ButtonListener {
public:
static const char kViewClassName[];
- explicit AppWindowFrameView(NativeAppWindow* window);
+ explicit AppWindowFrameView();
virtual ~AppWindowFrameView();
// Initializes this for |widget|. 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.
+ // and the lower-right corner resize handle. If |draw_frame|, the view draws
+ // its own window title area and controls, using |frame_color| (otherwise
+ // |frame_color| is ignored). |draggable_region| may be NULL.
void Init(views::Widget* widget,
+ bool draw_frame,
const SkColor& frame_color,
+ const SkRegion* draggable_region,
int resize_inside_bounds_size,
int resize_outside_bounds_size,
int resize_outside_scale_for_touch,
@@ -74,9 +79,10 @@ class AppWindowFrameView : public views::NonClientFrameView,
virtual void ButtonPressed(views::Button* sender,
const ui::Event& event) OVERRIDE;
- NativeAppWindow* window_;
views::Widget* widget_;
+ bool draw_frame_;
SkColor frame_color_;
+ const SkRegion* draggable_region_;
views::ImageButton* close_button_;
views::ImageButton* maximize_button_;
views::ImageButton* restore_button_;
« no previous file with comments | « apps/app_window_browsertest.cc ('k') | apps/ui/views/app_window_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698