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

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: nits fixed 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 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 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 1897
1897 webContents_.reset(content::WebContents::Create( 1898 webContents_.reset(content::WebContents::Create(
1898 content::WebContents::CreateParams(browser_->profile()))); 1899 content::WebContents::CreateParams(browser_->profile())));
1899 webContents_->GetController().LoadURL(url, 1900 webContents_->GetController().LoadURL(url,
1900 content::Referrer(), 1901 content::Referrer(),
1901 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, 1902 ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
1902 std::string()); 1903 std::string());
1903 NSView* webview = webContents_->GetNativeView(); 1904 NSView* webview = webContents_->GetNativeView();
1904 [webview setFrameSize:NSMakeSize(kFixedGaiaViewWidth, kFixedGaiaViewHeight)]; 1905 [webview setFrameSize:NSMakeSize(kFixedGaiaViewWidth, kFixedGaiaViewHeight)];
1905 [container addSubview:webview]; 1906 [container addSubview:webview];
1907 content::RenderWidgetHostView* rwhv = webContents_->GetRenderWidgetHostView();
1908 if (rwhv)
1909 rwhv->SetBackgroundColor(profiles::kAvatarBubbleGaiaBackgroundColor);
1906 yOffset = NSMaxY([webview frame]); 1910 yOffset = NSMaxY([webview frame]);
1907 1911
1908 // Adds the title card. 1912 // Adds the title card.
1909 NSBox* separator = [self horizontalSeparatorWithFrame: 1913 NSBox* separator = [self horizontalSeparatorWithFrame:
1910 NSMakeRect(0, yOffset, kFixedGaiaViewWidth, 0)]; 1914 NSMakeRect(0, yOffset, kFixedGaiaViewWidth, 0)];
1911 [container addSubview:separator]; 1915 [container addSubview:separator];
1912 yOffset = NSMaxY([separator frame]) + kVerticalSpacing; 1916 yOffset = NSMaxY([separator frame]) + kVerticalSpacing;
1913 1917
1914 NSView* titleView = BuildTitleCard( 1918 NSView* titleView = BuildTitleCard(
1915 NSMakeRect(0, yOffset, kFixedGaiaViewWidth, 0), 1919 NSMakeRect(0, yOffset, kFixedGaiaViewWidth, 0),
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
2192 } 2196 }
2193 2197
2194 - (bool)shouldShowGoIncognito { 2198 - (bool)shouldShowGoIncognito {
2195 bool incognitoAvailable = 2199 bool incognitoAvailable =
2196 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 2200 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
2197 IncognitoModePrefs::DISABLED; 2201 IncognitoModePrefs::DISABLED;
2198 return incognitoAvailable && !browser_->profile()->IsGuestSession(); 2202 return incognitoAvailable && !browser_->profile()->IsGuestSession();
2199 } 2203 }
2200 2204
2201 @end 2205 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698