| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "base/mac/mac_util.h" | 7 #include "base/mac/mac_util.h" |
| 8 #include "base/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
| 9 #include "chrome/browser/renderer_host/render_view_host.h" | |
| 10 #include "chrome/browser/tab_contents/tab_contents.h" | |
| 11 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" | 9 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" |
| 12 #import "chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h" | 10 #import "chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h" |
| 13 #import "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" | 11 #import "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" |
| 14 #import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field.h" | 12 #import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field.h" |
| 15 #import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h" | 13 #import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h" |
| 16 #import "chrome/browser/ui/cocoa/find_pasteboard.h" | 14 #import "chrome/browser/ui/cocoa/find_pasteboard.h" |
| 17 #import "chrome/browser/ui/cocoa/focus_tracker.h" | 15 #import "chrome/browser/ui/cocoa/focus_tracker.h" |
| 18 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" | 16 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" |
| 19 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 17 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 20 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 18 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| 21 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 20 #include "content/browser/renderer_host/render_view_host.h" |
| 21 #include "content/browser/tab_contents/tab_contents.h" |
| 22 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" | 22 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 const float kFindBarOpenDuration = 0.2; | 25 const float kFindBarOpenDuration = 0.2; |
| 26 const float kFindBarCloseDuration = 0.15; | 26 const float kFindBarCloseDuration = 0.15; |
| 27 } | 27 } |
| 28 | 28 |
| 29 @interface FindBarCocoaController (PrivateMethods) | 29 @interface FindBarCocoaController (PrivateMethods) |
| 30 // Returns the appropriate frame for a hidden find bar. | 30 // Returns the appropriate frame for a hidden find bar. |
| 31 - (NSRect)hiddenFindBarFrame; | 31 - (NSRect)hiddenFindBarFrame; |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 } | 387 } |
| 388 } | 388 } |
| 389 | 389 |
| 390 // Has to happen after |ClearResults()| above. | 390 // Has to happen after |ClearResults()| above. |
| 391 BOOL buttonsEnabled = [text length] > 0 ? YES : NO; | 391 BOOL buttonsEnabled = [text length] > 0 ? YES : NO; |
| 392 [previousButton_ setEnabled:buttonsEnabled]; | 392 [previousButton_ setEnabled:buttonsEnabled]; |
| 393 [nextButton_ setEnabled:buttonsEnabled]; | 393 [nextButton_ setEnabled:buttonsEnabled]; |
| 394 } | 394 } |
| 395 | 395 |
| 396 @end | 396 @end |
| OLD | NEW |