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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 2859903003: [Mac] App Menu Animated Icon (Closed)
Patch Set: Switch to CanvasSkiaPaint Created 3 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
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/cocoa/menu_button.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #include "chrome/browser/ui/cocoa/permission_bubble/permission_bubble_cocoa.h" 70 #include "chrome/browser/ui/cocoa/permission_bubble/permission_bubble_cocoa.h"
71 #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h" 71 #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h"
72 #import "chrome/browser/ui/cocoa/profiles/avatar_button_controller.h" 72 #import "chrome/browser/ui/cocoa/profiles/avatar_button_controller.h"
73 #import "chrome/browser/ui/cocoa/profiles/avatar_icon_controller.h" 73 #import "chrome/browser/ui/cocoa/profiles/avatar_icon_controller.h"
74 #import "chrome/browser/ui/cocoa/status_bubble_mac.h" 74 #import "chrome/browser/ui/cocoa/status_bubble_mac.h"
75 #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h" 75 #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h"
76 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" 76 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h"
77 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" 77 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
78 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" 78 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h"
79 #import "chrome/browser/ui/cocoa/tabs/tab_view.h" 79 #import "chrome/browser/ui/cocoa/tabs/tab_view.h"
80 #import "chrome/browser/ui/cocoa/toolbar/app_toolbar_button.h"
80 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" 81 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
81 #import "chrome/browser/ui/cocoa/translate/translate_bubble_controller.h" 82 #import "chrome/browser/ui/cocoa/translate/translate_bubble_controller.h"
82 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" 83 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
83 #include "chrome/browser/ui/location_bar/location_bar.h" 84 #include "chrome/browser/ui/location_bar/location_bar.h"
84 #include "chrome/browser/ui/tabs/tab_strip_model.h" 85 #include "chrome/browser/ui/tabs/tab_strip_model.h"
85 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h" 86 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h"
86 #include "chrome/browser/ui/translate/translate_bubble_model_impl.h" 87 #include "chrome/browser/ui/translate/translate_bubble_model_impl.h"
87 #include "chrome/browser/ui/window_sizer/window_sizer.h" 88 #include "chrome/browser/ui/window_sizer/window_sizer.h"
88 #include "chrome/common/chrome_switches.h" 89 #include "chrome/common/chrome_switches.h"
89 #include "chrome/common/extensions/command.h" 90 #include "chrome/common/extensions/command.h"
(...skipping 1428 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 } 1519 }
1519 } 1520 }
1520 1521
1521 - (void)onTabDetachedWithContents:(WebContents*)contents { 1522 - (void)onTabDetachedWithContents:(WebContents*)contents {
1522 [infoBarContainerController_ tabDetachedWithContents:contents]; 1523 [infoBarContainerController_ tabDetachedWithContents:contents];
1523 } 1524 }
1524 1525
1525 - (void)onTabInsertedInForeground:(BOOL)inForeground { 1526 - (void)onTabInsertedInForeground:(BOOL)inForeground {
1526 if ([self isInAnyFullscreenMode] && !inForeground) 1527 if ([self isInAnyFullscreenMode] && !inForeground)
1527 [[self fullscreenToolbarController] revealToolbarForTabStripChanges]; 1528 [[self fullscreenToolbarController] revealToolbarForTabStripChanges];
1529
1530 if (inForeground) {
1531 AppToolbarButton* appMenuButton =
1532 static_cast<AppToolbarButton*>([toolbarController_ appMenuButton]);
1533 [appMenuButton onTabInsertedInForeground];
1534 }
1528 } 1535 }
1529 1536
1530 - (void)userChangedTheme { 1537 - (void)userChangedTheme {
1531 NSView* rootView = [[[self window] contentView] superview]; 1538 NSView* rootView = [[[self window] contentView] superview];
1532 [rootView cr_recursivelyInvokeBlock:^(id view) { 1539 [rootView cr_recursivelyInvokeBlock:^(id view) {
1533 if ([view conformsToProtocol:@protocol(ThemedWindowDrawing)]) 1540 if ([view conformsToProtocol:@protocol(ThemedWindowDrawing)])
1534 [view windowDidChangeTheme]; 1541 [view windowDidChangeTheme];
1535 1542
1536 // TODO(andresantoso): Remove this once all themed views respond to 1543 // TODO(andresantoso): Remove this once all themed views respond to
1537 // windowDidChangeTheme above. 1544 // windowDidChangeTheme above.
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
2087 2094
2088 - (NSRect)savedRegularWindowFrame { 2095 - (NSRect)savedRegularWindowFrame {
2089 return savedRegularWindowFrame_; 2096 return savedRegularWindowFrame_;
2090 } 2097 }
2091 2098
2092 - (BOOL)isFullscreenTransitionInProgress { 2099 - (BOOL)isFullscreenTransitionInProgress {
2093 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; 2100 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_;
2094 } 2101 }
2095 2102
2096 @end // @implementation BrowserWindowController(WindowType) 2103 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/cocoa/menu_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698