OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/profiles/avatar_icon_controller.h" | 5 #import "chrome/browser/ui/cocoa/profiles/avatar_icon_controller.h" |
6 | 6 |
7 #include "base/strings/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 10 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
11 #include "chrome/browser/profiles/profile_info_cache.h" | 11 #include "chrome/browser/profiles/profile_info_cache.h" |
12 #include "chrome/browser/profiles/profile_manager.h" | 12 #include "chrome/browser/profiles/profile_manager.h" |
13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/browser/ui/browser_window.h" | 14 #include "chrome/browser/ui/browser_window.h" |
15 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 15 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
16 #import "chrome/browser/ui/cocoa/profiles/avatar_label_button.h" | 16 #import "chrome/browser/ui/cocoa/profiles/avatar_label_button.h" |
17 #include "grit/generated_resources.h" | 17 #include "chrome/grit/generated_resources.h" |
18 #include "grit/theme_resources.h" | 18 #include "grit/theme_resources.h" |
19 #include "ui/base/l10n/l10n_util_mac.h" | 19 #include "ui/base/l10n/l10n_util_mac.h" |
20 #include "ui/base/resource/resource_bundle.h" | 20 #include "ui/base/resource/resource_bundle.h" |
21 #include "ui/gfx/image/image.h" | 21 #include "ui/gfx/image/image.h" |
22 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" | 22 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 // Space between the avatar label and the left edge of the container containing | 26 // Space between the avatar label and the left edge of the container containing |
27 // the label and the icon. | 27 // the label and the icon. |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // needs to be adjusted. Since the fullscreen button is positioned by | 232 // needs to be adjusted. Since the fullscreen button is positioned by |
233 // FramedBrowserWindow using private APIs, the easiest way to update the | 233 // FramedBrowserWindow using private APIs, the easiest way to update the |
234 // position of the button is through this private API. Resizing the window | 234 // position of the button is through this private API. Resizing the window |
235 // also works, but invoking |-display| does not. | 235 // also works, but invoking |-display| does not. |
236 NSView* themeFrame = [[[wc window] contentView] superview]; | 236 NSView* themeFrame = [[[wc window] contentView] superview]; |
237 if ([themeFrame respondsToSelector:@selector(_tileTitlebarAndRedisplay:)]) | 237 if ([themeFrame respondsToSelector:@selector(_tileTitlebarAndRedisplay:)]) |
238 [themeFrame _tileTitlebarAndRedisplay:YES]; | 238 [themeFrame _tileTitlebarAndRedisplay:YES]; |
239 } | 239 } |
240 | 240 |
241 @end | 241 @end |
OLD | NEW |