| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef APPS_UI_VIEWS_APP_WINDOW_FRAME_VIEW_H_ | 5 #ifndef APPS_UI_VIEWS_APP_WINDOW_FRAME_VIEW_H_ |
| 6 #define APPS_UI_VIEWS_APP_WINDOW_FRAME_VIEW_H_ | 6 #define APPS_UI_VIEWS_APP_WINDOW_FRAME_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 virtual void Layout() OVERRIDE; | 81 virtual void Layout() OVERRIDE; |
| 82 virtual const char* GetClassName() const OVERRIDE; | 82 virtual const char* GetClassName() const OVERRIDE; |
| 83 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 83 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 84 virtual gfx::Size GetMinimumSize() OVERRIDE; | 84 virtual gfx::Size GetMinimumSize() OVERRIDE; |
| 85 virtual gfx::Size GetMaximumSize() OVERRIDE; | 85 virtual gfx::Size GetMaximumSize() OVERRIDE; |
| 86 | 86 |
| 87 // views::ButtonListener implementation. | 87 // views::ButtonListener implementation. |
| 88 virtual void ButtonPressed(views::Button* sender, | 88 virtual void ButtonPressed(views::Button* sender, |
| 89 const ui::Event& event) OVERRIDE; | 89 const ui::Event& event) OVERRIDE; |
| 90 | 90 |
| 91 // Some button images we use depend on the color of the frame. This |
| 92 // will set these images based on the color of the frame. |
| 93 void SetButtonImagesForFrame(); |
| 94 |
| 91 views::Widget* widget_; | 95 views::Widget* widget_; |
| 92 NativeAppWindow* window_; | 96 NativeAppWindow* window_; |
| 93 bool draw_frame_; | 97 bool draw_frame_; |
| 94 SkColor active_frame_color_; | 98 SkColor active_frame_color_; |
| 95 SkColor inactive_frame_color_; | 99 SkColor inactive_frame_color_; |
| 96 views::ImageButton* close_button_; | 100 views::ImageButton* close_button_; |
| 97 views::ImageButton* maximize_button_; | 101 views::ImageButton* maximize_button_; |
| 98 views::ImageButton* restore_button_; | 102 views::ImageButton* restore_button_; |
| 99 views::ImageButton* minimize_button_; | 103 views::ImageButton* minimize_button_; |
| 100 | 104 |
| 101 // Allow resize for clicks this many pixels inside the bounds. | 105 // Allow resize for clicks this many pixels inside the bounds. |
| 102 int resize_inside_bounds_size_; | 106 int resize_inside_bounds_size_; |
| 103 | 107 |
| 104 // Allow resize for clicks this many pixels outside the bounds. | 108 // Allow resize for clicks this many pixels outside the bounds. |
| 105 int resize_outside_bounds_size_; | 109 int resize_outside_bounds_size_; |
| 106 | 110 |
| 107 // Size in pixels of the lower-right corner resize handle. | 111 // Size in pixels of the lower-right corner resize handle. |
| 108 int resize_area_corner_size_; | 112 int resize_area_corner_size_; |
| 109 | 113 |
| 110 DISALLOW_COPY_AND_ASSIGN(AppWindowFrameView); | 114 DISALLOW_COPY_AND_ASSIGN(AppWindowFrameView); |
| 111 }; | 115 }; |
| 112 | 116 |
| 113 } // namespace apps | 117 } // namespace apps |
| 114 | 118 |
| 115 #endif // APPS_UI_VIEWS_APP_WINDOW_FRAME_VIEW_H_ | 119 #endif // APPS_UI_VIEWS_APP_WINDOW_FRAME_VIEW_H_ |
| OLD | NEW |