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

Side by Side Diff: chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm

Issue 10180011: Support painting panels with chromium themes on GTK. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/panels/panel_titlebar_view_cocoa.h" 5 #import "chrome/browser/ui/panels/panel_titlebar_view_cocoa.h"
6 6
7 #include <Carbon/Carbon.h> // kVK_Escape 7 #include <Carbon/Carbon.h> // kVK_Escape
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 selector:@selector(restartGlintAnimation:) 639 selector:@selector(restartGlintAnimation:)
640 userInfo:nil 640 userInfo:nil
641 repeats:NO] retain]); 641 repeats:NO] retain]);
642 // Gradually reduce the frequency of repeating the animation, 642 // Gradually reduce the frequency of repeating the animation,
643 // calming it down if user decides not to act upon it. 643 // calming it down if user decides not to act upon it.
644 if (glintInterval_ < kFinalGlintRepeatIntervalSeconds) 644 if (glintInterval_ < kFinalGlintRepeatIntervalSeconds)
645 glintInterval_ *= kGlintRepeatIntervalIncreaseFactor; 645 glintInterval_ *= kGlintRepeatIntervalIncreaseFactor;
646 } 646 }
647 } 647 }
648 648
649 - (int)iconOnlyWidthInScreenCoordinates {
650 int width = kIconAndTextPadding * 2;
651 if (!icon_)
652 return width;
653
654 return width + NSWidth([self convertRect:[icon_ frame] toView:nil]);
655 }
656
657 // (Private/TestingAPI) 649 // (Private/TestingAPI)
658 - (PanelWindowControllerCocoa*)controller { 650 - (PanelWindowControllerCocoa*)controller {
659 return controller_; 651 return controller_;
660 } 652 }
661 653
662 - (NSTextField*)title { 654 - (NSTextField*)title {
663 return title_; 655 return title_;
664 } 656 }
665 657
666 - (void)simulateCloseButtonClick { 658 - (void)simulateCloseButtonClick {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 - (NSButton*)minimizeButton { 697 - (NSButton*)minimizeButton {
706 return minimizeButton_; 698 return minimizeButton_;
707 } 699 }
708 700
709 - (NSButton*)restoreButton { 701 - (NSButton*)restoreButton {
710 return restoreButton_; 702 return restoreButton_;
711 } 703 }
712 704
713 @end 705 @end
714 706
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_titlebar_view_cocoa.h ('k') | chrome/browser/ui/panels/panel_window_controller_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698