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

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

Issue 229343004: Revert 262516 "Remove title and icon from chrome apps native style title bars." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/app_window_frame_view.h ('k') | apps/ui/views/native_app_window_views.h » ('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.cc
diff --git a/apps/ui/views/app_window_frame_view.cc b/apps/ui/views/app_window_frame_view.cc
index ef4302cc8759e639d0d72e0b225e1e1f00374175..5fcef4209af13c9869017bb71595b742a8bbcdbe 100644
--- a/apps/ui/views/app_window_frame_view.cc
+++ b/apps/ui/views/app_window_frame_view.cc
@@ -29,11 +29,8 @@
#endif
namespace {
-
-const int kDefaultResizeInsideBoundsSize = 5;
-const int kDefaultResizeAreaCornerSize = 16;
+// Height of the chrome-style caption, in pixels.
const int kCaptionHeight = 25;
-
} // namespace
namespace apps {
@@ -41,26 +38,36 @@ namespace apps {
const char AppWindowFrameView::kViewClassName[] =
"browser/ui/views/extensions/AppWindowFrameView";
-AppWindowFrameView::AppWindowFrameView(views::Widget* widget,
- NativeAppWindow* window,
- bool draw_frame,
- const SkColor& frame_color)
- : widget_(widget),
- window_(window),
- draw_frame_(draw_frame),
- frame_color_(frame_color),
+AppWindowFrameView::AppWindowFrameView()
+ : widget_(NULL),
+ window_(NULL),
close_button_(NULL),
maximize_button_(NULL),
restore_button_(NULL),
minimize_button_(NULL),
- resize_inside_bounds_size_(kDefaultResizeInsideBoundsSize),
+ resize_inside_bounds_size_(0),
resize_outside_bounds_size_(0),
- resize_area_corner_size_(kDefaultResizeAreaCornerSize) {}
+ resize_area_corner_size_(0) {}
AppWindowFrameView::~AppWindowFrameView() {}
-void AppWindowFrameView::Init() {
- if (draw_frame_) {
+void AppWindowFrameView::Init(views::Widget* widget,
+ NativeAppWindow* window,
+ bool draw_frame,
+ const SkColor& frame_color,
+ int resize_inside_bounds_size,
+ int resize_outside_bounds_size,
+ int resize_outside_scale_for_touch,
+ int resize_area_corner_size) {
+ widget_ = widget;
+ window_ = window;
+ draw_frame_ = draw_frame;
+ frame_color_ = frame_color;
+ resize_inside_bounds_size_ = resize_inside_bounds_size;
+ resize_outside_bounds_size_ = resize_outside_bounds_size;
+ resize_area_corner_size_ = resize_area_corner_size;
+
+ if (draw_frame) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
close_button_ = new views::ImageButton(this);
close_button_->SetImage(
@@ -120,14 +127,6 @@ void AppWindowFrameView::Init() {
}
}
-void AppWindowFrameView::SetResizeSizes(int resize_inside_bounds_size,
- int resize_outside_bounds_size,
- int resize_area_corner_size) {
- resize_inside_bounds_size_ = resize_inside_bounds_size;
- resize_outside_bounds_size_ = resize_outside_bounds_size;
- resize_area_corner_size_ = resize_area_corner_size;
-}
-
// views::NonClientFrameView implementation.
gfx::Rect AppWindowFrameView::GetBoundsForClientView() const {
« no previous file with comments | « apps/ui/views/app_window_frame_view.h ('k') | apps/ui/views/native_app_window_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698