| 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 #include "apps/ui/views/app_window_frame_view.h" | 5 #include "apps/ui/views/app_window_frame_view.h" |
| 6 | 6 |
| 7 #include "apps/ui/native_app_window.h" | 7 #include "apps/ui/native_app_window.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "extensions/common/draggable_region.h" | 9 #include "extensions/common/draggable_region.h" |
| 10 #include "grit/theme_resources.h" | 10 #include "grit/theme_resources.h" |
| 11 #include "grit/ui_strings.h" // Accessibility names | 11 #include "grit/ui_strings.h" // Accessibility names |
| 12 #include "third_party/skia/include/core/SkPaint.h" | 12 #include "third_party/skia/include/core/SkPaint.h" |
| 13 #include "third_party/skia/include/core/SkRegion.h" | 13 #include "third_party/skia/include/core/SkRegion.h" |
| 14 #include "ui/base/hit_test.h" | 14 #include "ui/base/hit_test.h" |
| 15 #include "ui/base/l10n/l10n_util.h" | 15 #include "ui/base/l10n/l10n_util.h" |
| 16 #include "ui/base/resource/resource_bundle.h" | 16 #include "ui/base/resource/resource_bundle.h" |
| 17 #include "ui/gfx/canvas.h" | 17 #include "ui/gfx/canvas.h" |
| 18 #include "ui/gfx/image/image.h" | 18 #include "ui/gfx/image/image.h" |
| 19 #include "ui/gfx/path.h" | 19 #include "ui/gfx/path.h" |
| 20 #include "ui/views/controls/button/image_button.h" | 20 #include "ui/views/controls/button/image_button.h" |
| 21 #include "ui/views/layout/grid_layout.h" | 21 #include "ui/views/layout/grid_layout.h" |
| 22 #include "ui/views/views_delegate.h" | 22 #include "ui/views/views_delegate.h" |
| 23 #include "ui/views/widget/widget.h" | 23 #include "ui/views/widget/widget.h" |
| 24 #include "ui/views/widget/widget_delegate.h" | 24 #include "ui/views/widget/widget_delegate.h" |
| 25 | 25 |
| 26 #if defined(USE_AURA) | |
| 27 #include "ui/aura/env.h" | |
| 28 #include "ui/aura/window.h" | |
| 29 #endif | |
| 30 | |
| 31 namespace { | 26 namespace { |
| 32 // Height of the chrome-style caption, in pixels. | 27 // Height of the chrome-style caption, in pixels. |
| 33 const int kCaptionHeight = 25; | 28 const int kCaptionHeight = 25; |
| 34 } // namespace | 29 } // namespace |
| 35 | 30 |
| 36 namespace apps { | 31 namespace apps { |
| 37 | 32 |
| 38 const char AppWindowFrameView::kViewClassName[] = | 33 const char AppWindowFrameView::kViewClassName[] = |
| 39 "browser/ui/views/extensions/AppWindowFrameView"; | 34 "browser/ui/views/extensions/AppWindowFrameView"; |
| 40 | 35 |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 widget_->Close(); | 357 widget_->Close(); |
| 363 else if (sender == maximize_button_) | 358 else if (sender == maximize_button_) |
| 364 widget_->Maximize(); | 359 widget_->Maximize(); |
| 365 else if (sender == restore_button_) | 360 else if (sender == restore_button_) |
| 366 widget_->Restore(); | 361 widget_->Restore(); |
| 367 else if (sender == minimize_button_) | 362 else if (sender == minimize_button_) |
| 368 widget_->Minimize(); | 363 widget_->Minimize(); |
| 369 } | 364 } |
| 370 | 365 |
| 371 } // namespace apps | 366 } // namespace apps |
| OLD | NEW |