| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/edit_search_engine_cocoa_controller.h" | 5 #import "chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/mac/bundle_locations.h" | 8 #include "base/mac/bundle_locations.h" |
| 9 #import "base/mac/mac_util.h" | 9 #import "base/mac/mac_util.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 11 #include "base/strings/sys_string_conversions.h" | 11 #include "base/strings/sys_string_conversions.h" |
| 12 #include "chrome/browser/search_engines/template_url.h" | 12 #include "chrome/browser/search_engines/template_url.h" |
| 13 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
| 14 #include "grit/theme_resources.h" | 14 #include "grit/theme_resources.h" |
| 15 #include "grit/ui_resources.h" | 15 #include "grit/ui_resources.h" |
| 16 #include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" | 16 #include "third_party/google_toolbox_for_mac/AppKit/GTMUILocalizerAndLayoutTweak
er.h" |
| 17 #include "ui/base/l10n/l10n_util_mac.h" | 17 #include "ui/base/l10n/l10n_util_mac.h" |
| 18 #include "ui/base/resource/resource_bundle.h" | 18 #include "ui/base/resource/resource_bundle.h" |
| 19 #include "ui/gfx/image/image.h" | 19 #include "ui/gfx/image/image.h" |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 void ShiftOriginY(NSView* view, CGFloat amount) { | 23 void ShiftOriginY(NSView* view, CGFloat amount) { |
| 24 NSPoint origin = [view frame].origin; | 24 NSPoint origin = [view frame].origin; |
| 25 origin.y += amount; | 25 origin.y += amount; |
| 26 [view setFrameOrigin:origin]; | 26 [view setFrameOrigin:origin]; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 toolTip:IDS_SEARCH_ENGINES_INVALID_URL_TT | 181 toolTip:IDS_SEARCH_ENGINES_INVALID_URL_TT |
| 182 forImageView:urlImage_ | 182 forImageView:urlImage_ |
| 183 textField:urlField_]; | 183 textField:urlField_]; |
| 184 | 184 |
| 185 BOOL isValid = (titleValid && keywordValid && urlValid); | 185 BOOL isValid = (titleValid && keywordValid && urlValid); |
| 186 [doneButton_ setEnabled:isValid]; | 186 [doneButton_ setEnabled:isValid]; |
| 187 return isValid; | 187 return isValid; |
| 188 } | 188 } |
| 189 | 189 |
| 190 @end | 190 @end |
| OLD | NEW |