Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm

Issue 10383239: Move NativeWebKeyboardEvent to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/nsview_additions.h" 15 #import "chrome/browser/ui/cocoa/nsview_additions.h"
16 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" 16 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
17 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 17 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
18 #include "chrome/browser/ui/find_bar/find_tab_helper.h" 18 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
20 #include "content/public/browser/render_view_host.h" 20 #include "content/public/browser/render_view_host.h"
21 #include "content/public/browser/web_contents.h" 21 #include "content/public/browser/web_contents.h"
22 #include "content/public/browser/web_contents_view.h" 22 #include "content/public/browser/web_contents_view.h"
23 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" 23 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
24 #import "ui/base/cocoa/find_pasteboard.h" 24 #import "ui/base/cocoa/find_pasteboard.h"
25 #import "ui/base/cocoa/focus_tracker.h" 25 #import "ui/base/cocoa/focus_tracker.h"
26 26
27 using content::NativeWebKeyboardEvent;
28
27 const float kFindBarOpenDuration = 0.2; 29 const float kFindBarOpenDuration = 0.2;
28 const float kFindBarCloseDuration = 0.15; 30 const float kFindBarCloseDuration = 0.15;
29 const float kFindBarMoveDuration = 0.15; 31 const float kFindBarMoveDuration = 0.15;
30 const float kRightEdgeOffset = 25; 32 const float kRightEdgeOffset = 25;
31 33
32 @interface FindBarCocoaController (PrivateMethods) <NSAnimationDelegate> 34 @interface FindBarCocoaController (PrivateMethods) <NSAnimationDelegate>
33 // Returns the appropriate frame for a hidden find bar. 35 // Returns the appropriate frame for a hidden find bar.
34 - (NSRect)hiddenFindBarFrame; 36 - (NSRect)hiddenFindBarFrame;
35 37
36 // Animates the given |view| to the given |endFrame| within |duration| seconds. 38 // Animates the given |view| to the given |endFrame| within |duration| seconds.
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 } 537 }
536 } 538 }
537 539
538 // Has to happen after |ClearResults()| above. 540 // Has to happen after |ClearResults()| above.
539 BOOL buttonsEnabled = [text length] > 0 ? YES : NO; 541 BOOL buttonsEnabled = [text length] > 0 ? YES : NO;
540 [previousButton_ setEnabled:buttonsEnabled]; 542 [previousButton_ setEnabled:buttonsEnabled];
541 [nextButton_ setEnabled:buttonsEnabled]; 543 [nextButton_ setEnabled:buttonsEnabled];
542 } 544 }
543 545
544 @end 546 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_utils.mm ('k') | chrome/browser/ui/cocoa/web_dialog_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698