| 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/mac/bundle_locations.h" | 7 #include "base/mac/bundle_locations.h" |
| 8 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
| 9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
| 10 #include "chrome/browser/ui/cocoa/browser_window_controller.h" | 10 #include "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 11 #import "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" | 11 #import "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" |
| 12 #import "chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h" | 12 #import "chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h" |
| 13 #import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field.h" | 13 #import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field.h" |
| 14 #import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h" | 14 #import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h" |
| 15 #import "chrome/browser/ui/cocoa/focus_tracker.h" | |
| 16 #import "chrome/browser/ui/cocoa/nsview_additions.h" | 15 #import "chrome/browser/ui/cocoa/nsview_additions.h" |
| 17 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" | 16 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" |
| 18 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 17 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 19 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 18 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| 20 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 21 #import "content/browser/find_pasteboard.h" | 20 #import "content/browser/find_pasteboard.h" |
| 22 #include "content/browser/renderer_host/render_view_host.h" | 21 #include "content/browser/renderer_host/render_view_host.h" |
| 23 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
| 24 #include "content/public/browser/web_contents_view.h" | 23 #include "content/public/browser/web_contents_view.h" |
| 25 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" | 24 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" |
| 25 #import "ui/base/cocoa/focus_tracker.h" |
| 26 | 26 |
| 27 const float kFindBarOpenDuration = 0.2; | 27 const float kFindBarOpenDuration = 0.2; |
| 28 const float kFindBarCloseDuration = 0.15; | 28 const float kFindBarCloseDuration = 0.15; |
| 29 const float kFindBarMoveDuration = 0.15; | 29 const float kFindBarMoveDuration = 0.15; |
| 30 const float kRightEdgeOffset = 25; | 30 const float kRightEdgeOffset = 25; |
| 31 | 31 |
| 32 @interface FindBarCocoaController (PrivateMethods) <NSAnimationDelegate> | 32 @interface FindBarCocoaController (PrivateMethods) <NSAnimationDelegate> |
| 33 // Returns the appropriate frame for a hidden find bar. | 33 // Returns the appropriate frame for a hidden find bar. |
| 34 - (NSRect)hiddenFindBarFrame; | 34 - (NSRect)hiddenFindBarFrame; |
| 35 | 35 |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 } | 533 } |
| 534 } | 534 } |
| 535 | 535 |
| 536 // Has to happen after |ClearResults()| above. | 536 // Has to happen after |ClearResults()| above. |
| 537 BOOL buttonsEnabled = [text length] > 0 ? YES : NO; | 537 BOOL buttonsEnabled = [text length] > 0 ? YES : NO; |
| 538 [previousButton_ setEnabled:buttonsEnabled]; | 538 [previousButton_ setEnabled:buttonsEnabled]; |
| 539 [nextButton_ setEnabled:buttonsEnabled]; | 539 [nextButton_ setEnabled:buttonsEnabled]; |
| 540 } | 540 } |
| 541 | 541 |
| 542 @end | 542 @end |
| OLD | NEW |