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

Unified Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h

Issue 163913011: [OSX, OmniTheatre] Handle OriginChip click properly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h
index 2dbe1c33d5dad5d4f2f85a5e13e0c816a3d54a50..a59dbca1ccefbd6067cbb0681e34d0410b903b89 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h
@@ -6,6 +6,7 @@
#import <Cocoa/Cocoa.h>
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/styled_text_field_cell.h"
@class AutocompleteTextField;
@@ -29,6 +30,9 @@ class LocationBarDecoration;
// YES if this field is shown in a popup window.
BOOL isPopupMode_;
+
+ // Retains the NSEvent that caused the controlView to become firstResponder.
+ base::scoped_nsobject<NSEvent> focusEvent_;
}
@property(assign, nonatomic) BOOL isPopupMode;
@@ -103,4 +107,10 @@ class LocationBarDecoration;
- (void)setHideFocusState:(BOOL)hideFocusState
ofView:(AutocompleteTextField*)controlView;
+// Handles the |event| that caused |controlView| to become firstResponder.
+// If it is a mouse click on a ButtonDecoration, focus notifications are
+// postponed until the ButtonDecoration's OnMousePressed() was invoked.
+// Otherwise, they are called immediately.
+- (void)handleFocusEvent:(NSEvent*)event
+ ofView:(AutocompleteTextField*)controlView;
@end

Powered by Google App Engine
This is Rietveld 408576698