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

Side by Side Diff: chrome/browser/ui/cocoa/base_bubble_controller.h

Issue 13160004: Re-implement form validation message UI with native widgets. (Common and Mac) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adopt new Blink interface Created 7 years, 8 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/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 8
9 @class InfoBubbleView; 9 @class InfoBubbleView;
10 class TabStripModelObserverBridge; 10 class TabStripModelObserverBridge;
(...skipping 17 matching lines...) Expand all
28 // Bridge for tab change notifications. 28 // Bridge for tab change notifications.
29 scoped_ptr<TabStripModelObserverBridge> tabStripObserverBridge_; 29 scoped_ptr<TabStripModelObserverBridge> tabStripObserverBridge_;
30 30
31 // Non-nil only on 10.7+. Both weak, owned by AppKit. 31 // Non-nil only on 10.7+. Both weak, owned by AppKit.
32 // A local event tap that will dismiss the bubble when a click is delivered 32 // A local event tap that will dismiss the bubble when a click is delivered
33 // outside the window. This is needed because the window shares first 33 // outside the window. This is needed because the window shares first
34 // responder with its parent. 34 // responder with its parent.
35 id eventTap_; 35 id eventTap_;
36 // A notification observer that gets triggered when any window resigns key. 36 // A notification observer that gets triggered when any window resigns key.
37 id resignationObserver_; 37 id resignationObserver_;
38 // The controlled window should be the key window when it's opened. True by
39 // default.
40 bool shouldOpenKeyWindow_;
Nico 2013/04/25 22:57:49 shouldOpenAsKeyWindow_
tkent 2013/04/29 22:24:19 Done.
38 } 41 }
39 42
40 @property(nonatomic, readonly) NSWindow* parentWindow; 43 @property(nonatomic, readonly) NSWindow* parentWindow;
41 // The point in base screen coordinates at which the bubble should open and the 44 // The point in base screen coordinates at which the bubble should open and the
42 // arrow tip points. 45 // arrow tip points.
43 @property(nonatomic, assign) NSPoint anchorPoint; 46 @property(nonatomic, assign) NSPoint anchorPoint;
44 @property(nonatomic, readonly) InfoBubbleView* bubble; 47 @property(nonatomic, readonly) InfoBubbleView* bubble;
48 @property(nonatomic, assign) bool shouldOpenKeyWindow;
Nico 2013/04/25 22:57:49 likewise
tkent 2013/04/29 22:24:19 Done.
45 49
46 // Creates a bubble. |nibPath| is just the basename, e.g. @"FirstRunBubble". 50 // Creates a bubble. |nibPath| is just the basename, e.g. @"FirstRunBubble".
47 // |anchoredAt| is in screen space. You need to call -showWindow: to make the 51 // |anchoredAt| is in screen space. You need to call -showWindow: to make the
48 // bubble visible. It will autorelease itself when the user dismisses the 52 // bubble visible. It will autorelease itself when the user dismisses the
49 // bubble. 53 // bubble.
50 // This is the designated initializer. 54 // This is the designated initializer.
51 - (id)initWithWindowNibPath:(NSString*)nibPath 55 - (id)initWithWindowNibPath:(NSString*)nibPath
52 parentWindow:(NSWindow*)parentWindow 56 parentWindow:(NSWindow*)parentWindow
53 anchoredAt:(NSPoint)anchoredAt; 57 anchoredAt:(NSPoint)anchoredAt;
54 58
(...skipping 21 matching lines...) Expand all
76 80
77 @end 81 @end
78 82
79 // Methods for use by subclasses. 83 // Methods for use by subclasses.
80 @interface BaseBubbleController (Protected) 84 @interface BaseBubbleController (Protected)
81 // Registers event taps *after* the window is shown so that the bubble is 85 // Registers event taps *after* the window is shown so that the bubble is
82 // dismissed when it resigns key. This only needs to be called if 86 // dismissed when it resigns key. This only needs to be called if
83 // |-showWindow:| is overriden and does not call super. Noop on OSes <10.7. 87 // |-showWindow:| is overriden and does not call super. Noop on OSes <10.7.
84 - (void)registerKeyStateEventTap; 88 - (void)registerKeyStateEventTap;
85 @end 89 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698