OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/cocoa/preferences_window_controller.h" | 5 #import "chrome/browser/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" |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 [self registerPrefObservers]; | 567 [self registerPrefObservers]; |
568 | 568 |
569 // Use one animation so we can stop it if the user clicks quickly, and | 569 // Use one animation so we can stop it if the user clicks quickly, and |
570 // start the new animation. | 570 // start the new animation. |
571 animation_.reset([[NSViewAnimation alloc] init]); | 571 animation_.reset([[NSViewAnimation alloc] init]); |
572 // Make this the delegate so it can remove the old view at the end of the | 572 // Make this the delegate so it can remove the old view at the end of the |
573 // animation (once it is faded out). | 573 // animation (once it is faded out). |
574 [animation_ setDelegate:self]; | 574 [animation_ setDelegate:self]; |
575 // The default duration is 0.5s, which actually feels slow in here, so speed | 575 // The default duration is 0.5s, which actually feels slow in here, so speed |
576 // it up a bit. | 576 // it up a bit. |
577 [animation_ gtm_setDuration:0.2]; | 577 [animation_ gtm_setDuration:0.2 |
| 578 eventMask:NSLeftMouseDownMask]; |
578 [animation_ setAnimationBlockingMode:NSAnimationNonblocking]; | 579 [animation_ setAnimationBlockingMode:NSAnimationNonblocking]; |
579 | 580 |
580 // TODO(akalin): handle incognito profiles? The windows version of this | 581 // TODO(akalin): handle incognito profiles? The windows version of this |
581 // (in chrome/browser/views/options/content_page_view.cc) just does what | 582 // (in chrome/browser/views/options/content_page_view.cc) just does what |
582 // we do below. | 583 // we do below. |
583 syncService_ = profile_->GetProfileSyncService(); | 584 syncService_ = profile_->GetProfileSyncService(); |
584 | 585 |
585 // TODO(akalin): This color is taken from kSyncLabelErrorBgColor in | 586 // TODO(akalin): This color is taken from kSyncLabelErrorBgColor in |
586 // content_page_view.cc. Either decomp that color out into a | 587 // content_page_view.cc. Either decomp that color out into a |
587 // function/variable that is referenced by both this file and | 588 // function/variable that is referenced by both this file and |
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1934 case OPTIONS_PAGE_ADVANCED: | 1935 case OPTIONS_PAGE_ADVANCED: |
1935 return underTheHoodView_; | 1936 return underTheHoodView_; |
1936 case OPTIONS_PAGE_DEFAULT: | 1937 case OPTIONS_PAGE_DEFAULT: |
1937 case OPTIONS_PAGE_COUNT: | 1938 case OPTIONS_PAGE_COUNT: |
1938 LOG(DFATAL) << "Invalid page value " << page; | 1939 LOG(DFATAL) << "Invalid page value " << page; |
1939 } | 1940 } |
1940 return basicsView_; | 1941 return basicsView_; |
1941 } | 1942 } |
1942 | 1943 |
1943 @end | 1944 @end |
OLD | NEW |