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

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

Issue 654123004: Revert of 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: Created 6 years, 2 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 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" 44 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
45 #include "chrome/common/pref_names.h" 45 #include "chrome/common/pref_names.h"
46 #include "chrome/common/url_constants.h" 46 #include "chrome/common/url_constants.h"
47 #include "chrome/grit/chromium_strings.h" 47 #include "chrome/grit/chromium_strings.h"
48 #include "chrome/grit/generated_resources.h" 48 #include "chrome/grit/generated_resources.h"
49 #include "components/signin/core/browser/mutable_profile_oauth2_token_service.h" 49 #include "components/signin/core/browser/mutable_profile_oauth2_token_service.h"
50 #include "components/signin/core/browser/profile_oauth2_token_service.h" 50 #include "components/signin/core/browser/profile_oauth2_token_service.h"
51 #include "components/signin/core/browser/signin_manager.h" 51 #include "components/signin/core/browser/signin_manager.h"
52 #include "components/signin/core/common/profile_management_switches.h" 52 #include "components/signin/core/common/profile_management_switches.h"
53 #include "content/public/browser/notification_service.h" 53 #include "content/public/browser/notification_service.h"
54 #include "content/public/browser/render_widget_host_view.h"
55 #include "content/public/browser/web_contents.h" 54 #include "content/public/browser/web_contents.h"
56 #include "google_apis/gaia/oauth2_token_service.h" 55 #include "google_apis/gaia/oauth2_token_service.h"
57 #include "grit/theme_resources.h" 56 #include "grit/theme_resources.h"
58 #include "skia/ext/skia_utils_mac.h" 57 #include "skia/ext/skia_utils_mac.h"
59 #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"
60 #import "ui/base/cocoa/cocoa_base_utils.h" 59 #import "ui/base/cocoa/cocoa_base_utils.h"
61 #import "ui/base/cocoa/controls/blue_label_button.h" 60 #import "ui/base/cocoa/controls/blue_label_button.h"
62 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" 61 #import "ui/base/cocoa/controls/hyperlink_button_cell.h"
63 #import "ui/base/cocoa/controls/hyperlink_text_view.h" 62 #import "ui/base/cocoa/controls/hyperlink_text_view.h"
64 #import "ui/base/cocoa/hover_image_button.h" 63 #import "ui/base/cocoa/hover_image_button.h"
(...skipping 1839 matching lines...) Expand 10 before | Expand all | Expand 10 after
1904 1903
1905 webContents_.reset(content::WebContents::Create( 1904 webContents_.reset(content::WebContents::Create(
1906 content::WebContents::CreateParams(browser_->profile()))); 1905 content::WebContents::CreateParams(browser_->profile())));
1907 webContents_->GetController().LoadURL(url, 1906 webContents_->GetController().LoadURL(url,
1908 content::Referrer(), 1907 content::Referrer(),
1909 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, 1908 ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
1910 std::string()); 1909 std::string());
1911 NSView* webview = webContents_->GetNativeView(); 1910 NSView* webview = webContents_->GetNativeView();
1912 [webview setFrameSize:NSMakeSize(kFixedGaiaViewWidth, kFixedGaiaViewHeight)]; 1911 [webview setFrameSize:NSMakeSize(kFixedGaiaViewWidth, kFixedGaiaViewHeight)];
1913 [container addSubview:webview]; 1912 [container addSubview:webview];
1914 content::RenderWidgetHostView* rwhv = webContents_->GetRenderWidgetHostView();
1915 if (rwhv)
1916 rwhv->SetBackgroundColor(profiles::kAvatarBubbleGaiaBackgroundColor);
1917 yOffset = NSMaxY([webview frame]); 1913 yOffset = NSMaxY([webview frame]);
1918 1914
1919 // Adds the title card. 1915 // Adds the title card.
1920 NSBox* separator = [self horizontalSeparatorWithFrame: 1916 NSBox* separator = [self horizontalSeparatorWithFrame:
1921 NSMakeRect(0, yOffset, kFixedGaiaViewWidth, 0)]; 1917 NSMakeRect(0, yOffset, kFixedGaiaViewWidth, 0)];
1922 [container addSubview:separator]; 1918 [container addSubview:separator];
1923 yOffset = NSMaxY([separator frame]) + kVerticalSpacing; 1919 yOffset = NSMaxY([separator frame]) + kVerticalSpacing;
1924 1920
1925 NSView* titleView = BuildTitleCard( 1921 NSView* titleView = BuildTitleCard(
1926 NSMakeRect(0, yOffset, kFixedGaiaViewWidth, 0), 1922 NSMakeRect(0, yOffset, kFixedGaiaViewWidth, 0),
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
2204 } 2200 }
2205 2201
2206 - (bool)shouldShowGoIncognito { 2202 - (bool)shouldShowGoIncognito {
2207 bool incognitoAvailable = 2203 bool incognitoAvailable =
2208 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 2204 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
2209 IncognitoModePrefs::DISABLED; 2205 IncognitoModePrefs::DISABLED;
2210 return incognitoAvailable && !browser_->profile()->IsGuestSession(); 2206 return incognitoAvailable && !browser_->profile()->IsGuestSession();
2211 } 2207 }
2212 2208
2213 @end 2209 @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