Commit ce028a03 authored by Oscar Johansson's avatar Oscar Johansson Committed by Commit Bot

Resolve include and define issues for jumbo (mac)

When building using jumbo, files get merged and variables,
functions and defines could end up in the same scope and
conflict. This commit solves issues with includes and defines
for the mac specific part of chrome/browser/ui.

Bug: 803406
Change-Id: I55d1f6110a6144bc7ee3037a374d3e33c36a9879
Reviewed-on: https://chromium-review.googlesource.com/1144928Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#577121}
parent 7be01159
......@@ -3154,7 +3154,6 @@ split_static_library("ui") {
"views/bubble_anchor_util_views.cc",
"views/certificate_selector.cc",
"views/certificate_selector.h",
"views/chrome_javascript_native_dialog_factory_views.cc",
"views/chrome_web_dialog_view.cc",
"views/constrained_web_dialog_delegate_views.cc",
"views/download/download_feedback_dialog_view.cc",
......@@ -3923,6 +3922,7 @@ split_static_library("ui") {
}
if (use_aura) {
sources += [
"views/chrome_javascript_native_dialog_factory_views.cc",
"views/extensions/extension_popup_aura.cc",
"views/extensions/extension_popup_aura.h",
]
......
......@@ -12,7 +12,6 @@
#include "chrome/browser/ui/cocoa/spinner_util.h"
#include "skia/ext/skia_utils_mac.h"
#include "ui/base/theme_provider.h"
#include "ui/gfx/geometry/angle_conversions.h"
#include "ui/native_theme/native_theme.h"
using cocoa_spinner_util::kDegrees90;
......
......@@ -11,6 +11,7 @@
#include "base/strings/sys_string_conversions.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/ui/cocoa/cocoa_util.h"
#include "chrome/browser/ui/cocoa/l10n_util.h"
#import "chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.h"
#import "chrome/browser/ui/cocoa/tabs/tab_controller.h"
......@@ -185,12 +186,6 @@ ui::ThreePartImage& GetStrokeImage(bool active, StrokeType stroke_type) {
}
}
CGFloat LineWidthFromContext(CGContextRef context) {
CGRect unitRect = CGRectMake(0.0, 0.0, 1.0, 1.0);
CGRect deviceRect = CGContextConvertRectToDeviceSpace(context, unitRect);
return 1.0 / deviceRect.size.height;
}
} // namespace
@interface TabViewCocoa (Private)
......@@ -930,7 +925,7 @@ CGFloat LineWidthFromContext(CGContextRef context) {
}
// The line width is always 1px.
CGFloat lineWidth = LineWidthFromContext(context);
CGFloat lineWidth = cocoa_util::LineWidthFromContext(context);
[bezierPath setLineWidth:lineWidth];
// Screen pixels lay between integral coordinates in user space. If you draw
......@@ -972,7 +967,7 @@ CGFloat LineWidthFromContext(CGContextRef context) {
CGContextRef context = static_cast<CGContextRef>(
[[NSGraphicsContext currentContext] graphicsPort]);
CGFloat lineWidth = LineWidthFromContext(context);
CGFloat lineWidth = cocoa_util::LineWidthFromContext(context);
// Line width is always 1px.
[middleEdgePath setLineWidth:lineWidth];
......
......@@ -34,9 +34,6 @@
#if defined(IsMinimized)
#undef IsMinimized
#endif
#if defined(CreateWindow)
#undef CreateWindow
#endif
#endif
namespace base {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment