OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/preferences_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/preferences_window_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/l10n_util_mac.h" | 10 #include "app/l10n_util_mac.h" |
11 #include "app/resource_bundle.h" | 11 #include "app/resource_bundle.h" |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 | 526 |
527 // Use one animation so we can stop it if the user clicks quickly, and | 527 // Use one animation so we can stop it if the user clicks quickly, and |
528 // start the new animation. | 528 // start the new animation. |
529 animation_.reset([[NSViewAnimation alloc] init]); | 529 animation_.reset([[NSViewAnimation alloc] init]); |
530 // Make this the delegate so it can remove the old view at the end of the | 530 // Make this the delegate so it can remove the old view at the end of the |
531 // animation (once it is faded out). | 531 // animation (once it is faded out). |
532 [animation_ setDelegate:self]; | 532 [animation_ setDelegate:self]; |
533 [animation_ setAnimationBlockingMode:NSAnimationNonblocking]; | 533 [animation_ setAnimationBlockingMode:NSAnimationNonblocking]; |
534 | 534 |
535 // TODO(akalin): handle incognito profiles? The windows version of this | 535 // TODO(akalin): handle incognito profiles? The windows version of this |
536 // (in chrome/browser/views/options/content_page_view.cc) just does what | 536 // (in chrome/browser/ui/views/options/content_page_view.cc) just does what |
537 // we do below. | 537 // we do below. |
538 syncService_ = profile_->GetProfileSyncService(); | 538 syncService_ = profile_->GetProfileSyncService(); |
539 | 539 |
540 // TODO(akalin): This color is taken from kSyncLabelErrorBgColor in | 540 // TODO(akalin): This color is taken from kSyncLabelErrorBgColor in |
541 // content_page_view.cc. Either decomp that color out into a | 541 // content_page_view.cc. Either decomp that color out into a |
542 // function/variable that is referenced by both this file and | 542 // function/variable that is referenced by both this file and |
543 // content_page_view.cc, or maybe pick a more suitable color. | 543 // content_page_view.cc, or maybe pick a more suitable color. |
544 syncErrorBackgroundColor_.reset( | 544 syncErrorBackgroundColor_.reset( |
545 [[NSColor colorWithDeviceRed:0xff/255.0 | 545 [[NSColor colorWithDeviceRed:0xff/255.0 |
546 green:0x9a/255.0 | 546 green:0x9a/255.0 |
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2163 case OPTIONS_PAGE_ADVANCED: | 2163 case OPTIONS_PAGE_ADVANCED: |
2164 return underTheHoodView_; | 2164 return underTheHoodView_; |
2165 case OPTIONS_PAGE_DEFAULT: | 2165 case OPTIONS_PAGE_DEFAULT: |
2166 case OPTIONS_PAGE_COUNT: | 2166 case OPTIONS_PAGE_COUNT: |
2167 LOG(DFATAL) << "Invalid page value " << page; | 2167 LOG(DFATAL) << "Invalid page value " << page; |
2168 } | 2168 } |
2169 return basicsView_; | 2169 return basicsView_; |
2170 } | 2170 } |
2171 | 2171 |
2172 @end | 2172 @end |
OLD | NEW |