| 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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 [self saveSessionStartupWithType:startupType]; | 928 [self saveSessionStartupWithType:startupType]; |
| 929 } | 929 } |
| 930 | 930 |
| 931 // Returns whether or not the +/-/Current buttons should be enabled, based on | 931 // Returns whether or not the +/-/Current buttons should be enabled, based on |
| 932 // the current pref value for the startup urls. | 932 // the current pref value for the startup urls. |
| 933 - (BOOL)enableRestoreButtons { | 933 - (BOOL)enableRestoreButtons { |
| 934 return [self restoreOnStartupIndex] == SessionStartupPref::URLS; | 934 return [self restoreOnStartupIndex] == SessionStartupPref::URLS; |
| 935 } | 935 } |
| 936 | 936 |
| 937 // Getter for the |customPagesSource| property for bindings. | 937 // Getter for the |customPagesSource| property for bindings. |
| 938 - (id)customPagesSource { | 938 - (CustomHomePagesModel*)customPagesSource { |
| 939 return customPagesSource_.get(); | 939 return customPagesSource_.get(); |
| 940 } | 940 } |
| 941 | 941 |
| 942 // Called when the selection in the table changes. If a flag is set indicating | 942 // Called when the selection in the table changes. If a flag is set indicating |
| 943 // that we're waiting for a special select message, edit the cell. Otherwise | 943 // that we're waiting for a special select message, edit the cell. Otherwise |
| 944 // just ignore it, we don't normally care. | 944 // just ignore it, we don't normally care. |
| 945 - (void)tableViewSelectionDidChange:(NSNotification*)aNotification { | 945 - (void)tableViewSelectionDidChange:(NSNotification*)aNotification { |
| 946 if (pendingSelectForEdit_) { | 946 if (pendingSelectForEdit_) { |
| 947 NSTableView* table = [aNotification object]; | 947 NSTableView* table = [aNotification object]; |
| 948 NSUInteger selectedRow = [table selectedRow]; | 948 NSUInteger selectedRow = [table selectedRow]; |
| (...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1954 case OPTIONS_PAGE_ADVANCED: | 1954 case OPTIONS_PAGE_ADVANCED: |
| 1955 return underTheHoodView_; | 1955 return underTheHoodView_; |
| 1956 case OPTIONS_PAGE_DEFAULT: | 1956 case OPTIONS_PAGE_DEFAULT: |
| 1957 case OPTIONS_PAGE_COUNT: | 1957 case OPTIONS_PAGE_COUNT: |
| 1958 LOG(DFATAL) << "Invalid page value " << page; | 1958 LOG(DFATAL) << "Invalid page value " << page; |
| 1959 } | 1959 } |
| 1960 return basicsView_; | 1960 return basicsView_; |
| 1961 } | 1961 } |
| 1962 | 1962 |
| 1963 @end | 1963 @end |
| OLD | NEW |