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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm

Issue 7621061: Restoring a session should restore window minimization state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing Mark's comments. Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/tabs/tab_strip_controller.h" 5 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
6 6
7 #import <QuartzCore/QuartzCore.h> 7 #import <QuartzCore/QuartzCore.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "grit/ui_resources.h" 60 #include "grit/ui_resources.h"
61 #include "skia/ext/skia_utils_mac.h" 61 #include "skia/ext/skia_utils_mac.h"
62 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" 62 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
63 #include "ui/base/l10n/l10n_util.h" 63 #include "ui/base/l10n/l10n_util.h"
64 #include "ui/base/resource/resource_bundle.h" 64 #include "ui/base/resource/resource_bundle.h"
65 #include "ui/gfx/image/image.h" 65 #include "ui/gfx/image/image.h"
66 #include "ui/gfx/mac/nsimage_cache.h" 66 #include "ui/gfx/mac/nsimage_cache.h"
67 67
68 NSString* const kTabStripNumberOfTabsChanged = @"kTabStripNumberOfTabsChanged"; 68 NSString* const kTabStripNumberOfTabsChanged = @"kTabStripNumberOfTabsChanged";
69 69
70 // 10.7 adds public APIs for full-screen support. Provide the declaration so it
71 // can be called below when building with the 10.5 SDK.
72 #if !defined(MAC_OS_X_VERSION_10_7) || \
73 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
74
75 @interface NSWindow (LionSDKDeclarations)
76 - (void)toggleFullScreen:(id)sender;
77 @end
78
79 enum {
80 NSWindowFullScreenButton = 7
81 };
82
83 #endif // MAC_OS_X_VERSION_10_7
84
85 namespace { 70 namespace {
86 71
87 // A value to indicate tab layout should use the full available width of the 72 // A value to indicate tab layout should use the full available width of the
88 // view. 73 // view.
89 const CGFloat kUseFullAvailableWidth = -1.0; 74 const CGFloat kUseFullAvailableWidth = -1.0;
90 75
91 // The amount by which tabs overlap. 76 // The amount by which tabs overlap.
92 const CGFloat kTabOverlap = 20.0; 77 const CGFloat kTabOverlap = 20.0;
93 78
94 // The width and height for a tab's icon. 79 // The width and height for a tab's icon.
(...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after
2028 NSInteger index = [self indexFromModelIndex:modelIndex]; 2013 NSInteger index = [self indexFromModelIndex:modelIndex];
2029 BrowserWindowController* controller = 2014 BrowserWindowController* controller =
2030 (BrowserWindowController*)[[switchView_ window] windowController]; 2015 (BrowserWindowController*)[[switchView_ window] windowController];
2031 DCHECK(index >= 0); 2016 DCHECK(index >= 0);
2032 if (index >= 0) { 2017 if (index >= 0) {
2033 [controller setTab:[self viewAtIndex:index] isDraggable:YES]; 2018 [controller setTab:[self viewAtIndex:index] isDraggable:YES];
2034 } 2019 }
2035 } 2020 }
2036 2021
2037 @end 2022 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/framed_browser_window.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698