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

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

Issue 1308293002: [Mac] Refactor bookmark pulsing into BookmarkBubbleObserverCocoa. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmarkeditor
Patch Set: Address comments Created 5 years, 4 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
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 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
7 7
8 // A class acting as the Objective-C controller for the Browser 8 // A class acting as the Objective-C controller for the Browser
9 // object. Handles interactions between Cocoa and the cross-platform 9 // object. Handles interactions between Cocoa and the cross-platform
10 // code. Each window has a single toolbar and, by virtue of being a 10 // code. Each window has a single toolbar and, by virtue of being a
(...skipping 10 matching lines...) Expand all
21 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" 21 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
22 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" 22 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h"
23 #import "chrome/browser/ui/cocoa/themed_window.h" 23 #import "chrome/browser/ui/cocoa/themed_window.h"
24 #import "chrome/browser/ui/cocoa/url_drop_target.h" 24 #import "chrome/browser/ui/cocoa/url_drop_target.h"
25 #import "chrome/browser/ui/cocoa/view_resizer.h" 25 #import "chrome/browser/ui/cocoa/view_resizer.h"
26 #include "components/translate/core/common/translate_errors.h" 26 #include "components/translate/core/common/translate_errors.h"
27 #include "ui/base/accelerators/accelerator_manager.h" 27 #include "ui/base/accelerators/accelerator_manager.h"
28 #include "ui/gfx/geometry/rect.h" 28 #include "ui/gfx/geometry/rect.h"
29 29
30 @class AvatarBaseController; 30 @class AvatarBaseController;
31 class BookmarkBubbleObserverCocoa;
31 class Browser; 32 class Browser;
32 class BrowserWindow; 33 class BrowserWindow;
33 class BrowserWindowCocoa; 34 class BrowserWindowCocoa;
34 @class BrowserWindowFullscreenTransition; 35 @class BrowserWindowFullscreenTransition;
35 @class DevToolsController; 36 @class DevToolsController;
36 @class DownloadShelfController; 37 @class DownloadShelfController;
37 class ExtensionKeybindingRegistryCocoa; 38 class ExtensionKeybindingRegistryCocoa;
38 @class FindBarCocoaController; 39 @class FindBarCocoaController;
39 @class FullscreenModeController; 40 @class FullscreenModeController;
40 @class FullscreenWindow; 41 @class FullscreenWindow;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 exclusiveAccessBubbleWindowController_; 85 exclusiveAccessBubbleWindowController_;
85 base::scoped_nsobject<BrowserWindowFullscreenTransition> 86 base::scoped_nsobject<BrowserWindowFullscreenTransition>
86 fullscreenTransition_; 87 fullscreenTransition_;
87 88
88 // Strong. StatusBubble is a special case of a strong reference that 89 // Strong. StatusBubble is a special case of a strong reference that
89 // we don't wrap in a scoped_ptr because it is acting the same 90 // we don't wrap in a scoped_ptr because it is acting the same
90 // as an NSWindowController in that it wraps a window that must 91 // as an NSWindowController in that it wraps a window that must
91 // be shut down before our destructors are called. 92 // be shut down before our destructors are called.
92 StatusBubbleMac* statusBubble_; 93 StatusBubbleMac* statusBubble_;
93 94
95 scoped_ptr<BookmarkBubbleObserverCocoa> bookmarkBubbleObserver_;
94 BookmarkBubbleController* bookmarkBubbleController_; // Weak. 96 BookmarkBubbleController* bookmarkBubbleController_; // Weak.
95 BOOL initializing_; // YES while we are currently in initWithBrowser: 97 BOOL initializing_; // YES while we are currently in initWithBrowser:
96 BOOL ownsBrowser_; // Only ever NO when testing 98 BOOL ownsBrowser_; // Only ever NO when testing
97 99
98 TranslateBubbleController* translateBubbleController_; // Weak. 100 TranslateBubbleController* translateBubbleController_; // Weak.
99 101
100 // The total amount by which we've grown the window up or down (to display a 102 // The total amount by which we've grown the window up or down (to display a
101 // bookmark bar and/or download shelf), respectively; reset to 0 when moved 103 // bookmark bar and/or download shelf), respectively; reset to 0 when moved
102 // away from the bottom/top or resized (or zoomed). 104 // away from the bottom/top or resized (or zoomed).
103 CGFloat windowTopGrowth_; 105 CGFloat windowTopGrowth_;
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 // image with |alignment| should be painted at. If the window does not have a 355 // image with |alignment| should be painted at. If the window does not have a
354 // tab strip, the offset for THEME_IMAGE_ALIGN_WITH_FRAME is always returned. 356 // tab strip, the offset for THEME_IMAGE_ALIGN_WITH_FRAME is always returned.
355 // The result of this method can be used in conjunction with 357 // The result of this method can be used in conjunction with
356 // [NSGraphicsContext cr_setPatternPhase:] to set the offset of pattern colors. 358 // [NSGraphicsContext cr_setPatternPhase:] to set the offset of pattern colors.
357 - (NSPoint)themeImagePositionForAlignment:(ThemeImageAlignment)alignment; 359 - (NSPoint)themeImagePositionForAlignment:(ThemeImageAlignment)alignment;
358 360
359 // Return the point to which a bubble window's arrow should point, in window 361 // Return the point to which a bubble window's arrow should point, in window
360 // coordinates. 362 // coordinates.
361 - (NSPoint)bookmarkBubblePoint; 363 - (NSPoint)bookmarkBubblePoint;
362 364
365 // Called by BookmarkBubbleObserverCocoa when the bubble is closed.
366 - (void)bookmarkBubbleClosed;
367
363 // Called when the Add Search Engine dialog is closed. 368 // Called when the Add Search Engine dialog is closed.
364 - (void)sheetDidEnd:(NSWindow*)sheet 369 - (void)sheetDidEnd:(NSWindow*)sheet
365 returnCode:(NSInteger)code 370 returnCode:(NSInteger)code
366 context:(void*)context; 371 context:(void*)context;
367 372
368 // Executes the command registered by the extension that has the given id. 373 // Executes the command registered by the extension that has the given id.
369 - (void)executeExtensionCommand:(const std::string&)extension_id 374 - (void)executeExtensionCommand:(const std::string&)extension_id
370 command:(const extensions::Command&)command; 375 command:(const extensions::Command&)command;
371 376
372 @end // @interface BrowserWindowController 377 @end // @interface BrowserWindowController
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 - (ExclusiveAccessBubbleWindowController*)exclusiveAccessBubbleWindowController; 611 - (ExclusiveAccessBubbleWindowController*)exclusiveAccessBubbleWindowController;
607 612
608 // Gets the rect, in window base coordinates, that the omnibox popup should be 613 // Gets the rect, in window base coordinates, that the omnibox popup should be
609 // positioned relative to. 614 // positioned relative to.
610 - (NSRect)omniboxPopupAnchorRect; 615 - (NSRect)omniboxPopupAnchorRect;
611 616
612 @end // @interface BrowserWindowController (TestingAPI) 617 @end // @interface BrowserWindowController (TestingAPI)
613 618
614 619
615 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 620 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698