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

Unified Diff: chrome/browser/ui/cocoa/status_bubble_mac.mm

Issue 1917973002: mac: Remove IsOSLion(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tapted Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/spinner_view.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/status_bubble_mac.mm
diff --git a/chrome/browser/ui/cocoa/status_bubble_mac.mm b/chrome/browser/ui/cocoa/status_bubble_mac.mm
index a688b6d21ea04721df6d6b43e61e317c7cb138e0..613852f80617c9a9d1ff928389388ea87817f542 100644
--- a/chrome/browser/ui/cocoa/status_bubble_mac.mm
+++ b/chrome/browser/ui/cocoa/status_bubble_mac.mm
@@ -9,7 +9,6 @@
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/debug/stack_trace.h"
-#include "base/mac/mac_util.h"
#include "base/mac/scoped_block.h"
#include "base/mac/sdk_forward_declarations.h"
#include "base/message_loop/message_loop.h"
@@ -750,12 +749,11 @@ void StatusBubbleMac::ExpandBubble() {
return;
// Get the current corner flags and see what needs to change based on the
- // expansion. This is only needed on Lion, which has rounded window bottoms.
- if (base::mac::IsOSLionOrLater()) {
- unsigned long corner_flags = [[window_ contentView] cornerFlags];
- corner_flags |= OSDependentCornerFlags(actual_window_frame);
- [[window_ contentView] setCornerFlags:corner_flags];
- }
+ // expansion.
+ unsigned long corner_flags = [[window_ contentView] cornerFlags];
+ corner_flags |= OSDependentCornerFlags(actual_window_frame);
+ [[window_ contentView] setCornerFlags:corner_flags];
+
[NSAnimationContext beginGrouping];
[[NSAnimationContext currentContext] setDuration:kExpansionDurationSeconds];
@@ -833,27 +831,25 @@ NSRect StatusBubbleMac::CalculateWindowFrame(bool expanded_width) {
unsigned long StatusBubbleMac::OSDependentCornerFlags(NSRect window_frame) {
unsigned long corner_flags = 0;
- if (base::mac::IsOSLionOrLater()) {
- NSRect parent_frame = [parent_ frame];
-
- // Round the bottom corners when they're right up against the
- // corresponding edge of the parent window, or when below the parent
- // window.
- if (NSMinY(window_frame) <= NSMinY(parent_frame)) {
- if (NSMinX(window_frame) == NSMinX(parent_frame)) {
- corner_flags |= kRoundedBottomLeftCorner;
- }
+ NSRect parent_frame = [parent_ frame];
- if (NSMaxX(window_frame) == NSMaxX(parent_frame)) {
- corner_flags |= kRoundedBottomRightCorner;
- }
+ // Round the bottom corners when they're right up against the
+ // corresponding edge of the parent window, or when below the parent
+ // window.
+ if (NSMinY(window_frame) <= NSMinY(parent_frame)) {
+ if (NSMinX(window_frame) == NSMinX(parent_frame)) {
+ corner_flags |= kRoundedBottomLeftCorner;
}
- // Round the top corners when the bubble is below the parent window.
- if (NSMinY(window_frame) < NSMinY(parent_frame)) {
- corner_flags |= kRoundedTopLeftCorner | kRoundedTopRightCorner;
+ if (NSMaxX(window_frame) == NSMaxX(parent_frame)) {
+ corner_flags |= kRoundedBottomRightCorner;
}
}
+ // Round the top corners when the bubble is below the parent window.
+ if (NSMinY(window_frame) < NSMinY(parent_frame)) {
+ corner_flags |= kRoundedTopLeftCorner | kRoundedTopRightCorner;
+ }
+
return corner_flags;
}
« no previous file with comments | « chrome/browser/ui/cocoa/spinner_view.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698