OLD | NEW |
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 #include "chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
11 #include "chrome/common/url_constants.h" | 11 #include "chrome/common/url_constants.h" |
12 #include "chrome/grit/generated_resources.h" | 12 #include "chrome/grit/generated_resources.h" |
13 #include "components/grit/components_scaled_resources.h" | 13 #include "components/grit/components_scaled_resources.h" |
| 14 #include "components/strings/grit/components_strings.h" |
14 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw
eaker.h" | 15 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw
eaker.h" |
15 #import "ui/base/cocoa/controls/blue_label_button.h" | 16 #import "ui/base/cocoa/controls/blue_label_button.h" |
16 #import "ui/base/cocoa/controls/hyperlink_text_view.h" | 17 #import "ui/base/cocoa/controls/hyperlink_text_view.h" |
17 #import "ui/base/cocoa/nscolor_additions.h" | 18 #import "ui/base/cocoa/nscolor_additions.h" |
18 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
19 #include "ui/base/l10n/l10n_util_mac.h" | 20 #include "ui/base/l10n/l10n_util_mac.h" |
20 #include "ui/base/resource/resource_bundle.h" | 21 #include "ui/base/resource/resource_bundle.h" |
21 #include "ui/gfx/image/image.h" | 22 #include "ui/gfx/image/image.h" |
22 | 23 |
23 // Maximum width used by page contents. | 24 // Maximum width used by page contents. |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 floor((NSWidth(bounds) - frameSize.width) / 2), | 242 floor((NSWidth(bounds) - frameSize.width) / 2), |
242 std::min(kMaxTopMargin, std::max(kTabMargin, | 243 std::min(kMaxTopMargin, std::max(kTabMargin, |
243 NSHeight(bounds) - [container_ contentHeight] - kTabMargin)))]; | 244 NSHeight(bounds) - [container_ contentHeight] - kTabMargin)))]; |
244 } | 245 } |
245 | 246 |
246 - (NSButton*)reloadButton { | 247 - (NSButton*)reloadButton { |
247 return [container_ reloadButton]; | 248 return [container_ reloadButton]; |
248 } | 249 } |
249 | 250 |
250 @end | 251 @end |
OLD | NEW |