| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #import "chrome/browser/ui/cocoa/panels/panel_titlebar_view_cocoa.h" | 5 #import "chrome/browser/ui/cocoa/panels/panel_titlebar_view_cocoa.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/mac/scoped_nsautorelease_pool.h" | 10 #include "base/mac/scoped_nsautorelease_pool.h" |
| 11 #include "chrome/browser/themes/theme_service.h" | 11 #include "chrome/browser/themes/theme_service.h" |
| 12 #import "chrome/browser/ui/cocoa/hover_image_button.h" | 12 #import "chrome/browser/ui/cocoa/hover_image_button.h" |
| 13 #import "chrome/browser/ui/cocoa/nsview_additions.h" | 13 #import "chrome/browser/ui/cocoa/nsview_additions.h" |
| 14 #import "chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h" | 14 #import "chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h" |
| 15 #import "chrome/browser/ui/cocoa/themed_window.h" | 15 #import "chrome/browser/ui/cocoa/themed_window.h" |
| 16 #import "chrome/browser/ui/cocoa/tracking_area.h" | 16 #import "chrome/browser/ui/cocoa/tracking_area.h" |
| 17 #import "chrome/browser/ui/panels/panel_constants.h" | 17 #import "chrome/browser/ui/panels/panel_constants.h" |
| 18 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
| 19 #include "grit/theme_resources.h" | 19 #include "grit/theme_resources.h" |
| 20 #import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h" | 20 #import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h" |
| 21 #import "third_party/GTM/AppKit/GTMNSColor+Luminance.h" | 21 #import "third_party/GTM/AppKit/GTMNSColor+Luminance.h" |
| 22 #include "ui/base/l10n/l10n_util_mac.h" | 22 #include "ui/base/l10n/l10n_util_mac.h" |
| 23 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
| 24 #include "ui/gfx/mac/nsimage_cache.h" | |
| 25 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" | 24 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
| 26 #include "ui/gfx/image/image.h" | 25 #include "ui/gfx/image/image.h" |
| 27 | 26 |
| 28 const int kButtonPadding = 8; | 27 const int kButtonPadding = 8; |
| 29 const int kIconAndTextPadding = 5; | 28 const int kIconAndTextPadding = 5; |
| 30 | 29 |
| 31 // 'Glint' is a speck of light that moves across the titlebar to attract a bit | 30 // 'Glint' is a speck of light that moves across the titlebar to attract a bit |
| 32 // more attention using movement in addition to color of the titlebar. | 31 // more attention using movement in addition to color of the titlebar. |
| 33 // It initially moves fast, then starts to slow down to avoid being annoying | 32 // It initially moves fast, then starts to slow down to avoid being annoying |
| 34 // if the user chooses not to react on it. | 33 // if the user chooses not to react on it. |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 - (NSButton*)minimizeButton { | 624 - (NSButton*)minimizeButton { |
| 626 return minimizeButton_; | 625 return minimizeButton_; |
| 627 } | 626 } |
| 628 | 627 |
| 629 - (NSButton*)restoreButton { | 628 - (NSButton*)restoreButton { |
| 630 return restoreButton_; | 629 return restoreButton_; |
| 631 } | 630 } |
| 632 | 631 |
| 633 @end | 632 @end |
| 634 | 633 |
| OLD | NEW |