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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm

Issue 637083002: Sets the default background color of inline signin and user manager to grey (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 1 month 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
OLDNEW
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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" 7 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h"
8 8
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" 43 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
44 #include "chrome/common/pref_names.h" 44 #include "chrome/common/pref_names.h"
45 #include "chrome/common/url_constants.h" 45 #include "chrome/common/url_constants.h"
46 #include "chrome/grit/chromium_strings.h" 46 #include "chrome/grit/chromium_strings.h"
47 #include "chrome/grit/generated_resources.h" 47 #include "chrome/grit/generated_resources.h"
48 #include "components/signin/core/browser/mutable_profile_oauth2_token_service.h" 48 #include "components/signin/core/browser/mutable_profile_oauth2_token_service.h"
49 #include "components/signin/core/browser/profile_oauth2_token_service.h" 49 #include "components/signin/core/browser/profile_oauth2_token_service.h"
50 #include "components/signin/core/browser/signin_manager.h" 50 #include "components/signin/core/browser/signin_manager.h"
51 #include "components/signin/core/common/profile_management_switches.h" 51 #include "components/signin/core/common/profile_management_switches.h"
52 #include "content/public/browser/notification_service.h" 52 #include "content/public/browser/notification_service.h"
53 #include "content/public/browser/render_widget_host_view.h"
53 #include "content/public/browser/web_contents.h" 54 #include "content/public/browser/web_contents.h"
54 #include "google_apis/gaia/oauth2_token_service.h" 55 #include "google_apis/gaia/oauth2_token_service.h"
55 #include "grit/theme_resources.h" 56 #include "grit/theme_resources.h"
56 #include "skia/ext/skia_utils_mac.h" 57 #include "skia/ext/skia_utils_mac.h"
57 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw eaker.h" 58 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw eaker.h"
58 #import "ui/base/cocoa/cocoa_base_utils.h" 59 #import "ui/base/cocoa/cocoa_base_utils.h"
59 #import "ui/base/cocoa/controls/blue_label_button.h" 60 #import "ui/base/cocoa/controls/blue_label_button.h"
60 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" 61 #import "ui/base/cocoa/controls/hyperlink_button_cell.h"
61 #import "ui/base/cocoa/controls/hyperlink_text_view.h" 62 #import "ui/base/cocoa/controls/hyperlink_text_view.h"
62 #import "ui/base/cocoa/hover_image_button.h" 63 #import "ui/base/cocoa/hover_image_button.h"
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after
1904 1905
1905 webContents_.reset(content::WebContents::Create( 1906 webContents_.reset(content::WebContents::Create(
1906 content::WebContents::CreateParams(browser_->profile()))); 1907 content::WebContents::CreateParams(browser_->profile())));
1907 webContents_->GetController().LoadURL(url, 1908 webContents_->GetController().LoadURL(url,
1908 content::Referrer(), 1909 content::Referrer(),
1909 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, 1910 ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
1910 std::string()); 1911 std::string());
1911 NSView* webview = webContents_->GetNativeView(); 1912 NSView* webview = webContents_->GetNativeView();
1912 [webview setFrameSize:NSMakeSize(kFixedGaiaViewWidth, kFixedGaiaViewHeight)]; 1913 [webview setFrameSize:NSMakeSize(kFixedGaiaViewWidth, kFixedGaiaViewHeight)];
1913 [container addSubview:webview]; 1914 [container addSubview:webview];
1915 content::RenderWidgetHostView* rwhv = webContents_->GetRenderWidgetHostView();
1916 if (rwhv)
1917 rwhv->SetBackgroundColor(profiles::kAvatarBubbleGaiaBackgroundColor);
1914 yOffset = NSMaxY([webview frame]); 1918 yOffset = NSMaxY([webview frame]);
1915 1919
1916 // Adds the title card. 1920 // Adds the title card.
1917 NSBox* separator = [self horizontalSeparatorWithFrame: 1921 NSBox* separator = [self horizontalSeparatorWithFrame:
1918 NSMakeRect(0, yOffset, kFixedGaiaViewWidth, 0)]; 1922 NSMakeRect(0, yOffset, kFixedGaiaViewWidth, 0)];
1919 [container addSubview:separator]; 1923 [container addSubview:separator];
1920 yOffset = NSMaxY([separator frame]) + kVerticalSpacing; 1924 yOffset = NSMaxY([separator frame]) + kVerticalSpacing;
1921 1925
1922 NSView* titleView = BuildTitleCard( 1926 NSView* titleView = BuildTitleCard(
1923 NSMakeRect(0, yOffset, kFixedGaiaViewWidth, 0), 1927 NSMakeRect(0, yOffset, kFixedGaiaViewWidth, 0),
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
2200 } 2204 }
2201 2205
2202 - (bool)shouldShowGoIncognito { 2206 - (bool)shouldShowGoIncognito {
2203 bool incognitoAvailable = 2207 bool incognitoAvailable =
2204 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 2208 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
2205 IncognitoModePrefs::DISABLED; 2209 IncognitoModePrefs::DISABLED;
2206 return incognitoAvailable && !browser_->profile()->IsGuestSession(); 2210 return incognitoAvailable && !browser_->profile()->IsGuestSession();
2207 } 2211 }
2208 2212
2209 @end 2213 @end
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_avatar_icon_util.cc ('k') | chrome/browser/ui/cocoa/profiles/user_manager_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698