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

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

Issue 9600036: Move Render(View|Widget)Host and associated classes to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 years, 9 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"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 NSEvent* event = [NSApp currentEvent]; 227 NSEvent* event = [NSApp currentEvent];
228 if ([event type] != NSKeyDown && [event type] != NSKeyUp) 228 if ([event type] != NSKeyDown && [event type] != NSKeyUp)
229 return NO; 229 return NO;
230 230
231 // Forward the event to the renderer. 231 // Forward the event to the renderer.
232 // TODO(rohitrao): Should this call -[BaseView keyEvent:]? Is there code in 232 // TODO(rohitrao): Should this call -[BaseView keyEvent:]? Is there code in
233 // that function that we want to keep or avoid? Calling 233 // that function that we want to keep or avoid? Calling
234 // |ForwardKeyboardEvent()| directly ignores edit commands, which breaks 234 // |ForwardKeyboardEvent()| directly ignores edit commands, which breaks
235 // cmd-up/down if we ever decide to include |moveToBeginningOfDocument:| in 235 // cmd-up/down if we ever decide to include |moveToBeginningOfDocument:| in
236 // the list above. 236 // the list above.
237 RenderViewHost* render_view_host = 237 content::RenderViewHost* render_view_host =
238 contents->web_contents()->GetRenderViewHost(); 238 contents->web_contents()->GetRenderViewHost();
239 render_view_host->ForwardKeyboardEvent(NativeWebKeyboardEvent(event)); 239 render_view_host->ForwardKeyboardEvent(NativeWebKeyboardEvent(event));
240 return YES; 240 return YES;
241 } 241 }
242 242
243 return NO; 243 return NO;
244 } 244 }
245 245
246 // Methods from FindBar 246 // Methods from FindBar
247 - (void)showFindBar:(BOOL)animate { 247 - (void)showFindBar:(BOOL)animate {
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698