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

Side by Side Diff: chrome/browser/cocoa/browser_window_cocoa.mm

Issue 46078: Mac bookmark work. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "base/gfx/rect.h" 5 #include "base/gfx/rect.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "chrome/browser/cocoa/browser_window_cocoa.h" 7 #include "chrome/browser/cocoa/browser_window_cocoa.h"
8 #include "chrome/browser/cocoa/browser_window_controller.h" 8 #include "chrome/browser/cocoa/browser_window_controller.h"
9 #include "chrome/browser/browser.h"
9 #include "chrome/browser/cocoa/status_bubble_mac.h" 10 #include "chrome/browser/cocoa/status_bubble_mac.h"
10 11
11 BrowserWindowCocoa::BrowserWindowCocoa(BrowserWindowController* controller, 12 BrowserWindowCocoa::BrowserWindowCocoa(Browser* browser,
13 BrowserWindowController* controller,
12 NSWindow* window) 14 NSWindow* window)
13 : controller_(controller), window_(window) { 15 : browser_(browser), controller_(controller), window_(window),
16 bookmark_menu_bridge_(browser) {
14 status_bubble_.reset(new StatusBubbleMac(window_)); 17 status_bubble_.reset(new StatusBubbleMac(window_));
15 } 18 }
16 19
17 BrowserWindowCocoa::~BrowserWindowCocoa() { 20 BrowserWindowCocoa::~BrowserWindowCocoa() {
18 } 21 }
19 22
20 void BrowserWindowCocoa::Init() { 23 void BrowserWindowCocoa::Init() {
21 // Remember, no code here. This doesn't get called on the Mac. Put code into 24 // Remember, no code here. This doesn't get called on the Mac. Put code into
22 // the constructor, above, instead. 25 // the constructor, above, instead.
23 } 26 }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 bool should_restore_state) { 132 bool should_restore_state) {
130 [controller_ updateToolbarWithContents:contents 133 [controller_ updateToolbarWithContents:contents
131 shouldRestoreState:should_restore_state ? YES : NO]; 134 shouldRestoreState:should_restore_state ? YES : NO];
132 } 135 }
133 136
134 void BrowserWindowCocoa::FocusToolbar() { 137 void BrowserWindowCocoa::FocusToolbar() {
135 NOTIMPLEMENTED(); 138 NOTIMPLEMENTED();
136 } 139 }
137 140
138 bool BrowserWindowCocoa::IsBookmarkBarVisible() const { 141 bool BrowserWindowCocoa::IsBookmarkBarVisible() const {
139 NOTIMPLEMENTED(); 142 // Conversion from ObjC BOOL to C++ bool.
140 return true; 143 return [controller_ isBookmarkBarVisible] ? true : false;
141 } 144 }
142 145
146 // This is a little awkward. Internal to Chrome, V and C (in the MVC
147 // sense) tend to smear together. Thus, we have a call chain of
148 // C(browser_window)-->
149 // V(me;right here)-->
150 // C(BrowserWindowController)-->
151 // C(TabStripController) --> ...
143 void BrowserWindowCocoa::ToggleBookmarkBar() { 152 void BrowserWindowCocoa::ToggleBookmarkBar() {
144 NOTIMPLEMENTED(); 153 [controller_ toggleBookmarkBar];
145 } 154 }
146 155
147 void BrowserWindowCocoa::ShowFindBar() { 156 void BrowserWindowCocoa::ShowFindBar() {
148 NOTIMPLEMENTED(); 157 NOTIMPLEMENTED();
149 } 158 }
150 159
151 void BrowserWindowCocoa::ShowAboutChromeDialog() { 160 void BrowserWindowCocoa::ShowAboutChromeDialog() {
152 NOTIMPLEMENTED(); 161 NOTIMPLEMENTED();
153 } 162 }
154 163
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 void* parent_window) { 202 void* parent_window) {
194 NOTIMPLEMENTED(); 203 NOTIMPLEMENTED();
195 } 204 }
196 205
197 void BrowserWindowCocoa::DestroyBrowser() { 206 void BrowserWindowCocoa::DestroyBrowser() {
198 [controller_ destroyBrowser]; 207 [controller_ destroyBrowser];
199 208
200 // at this point the controller is dead (autoreleased), so 209 // at this point the controller is dead (autoreleased), so
201 // make sure we don't try to reference it any more. 210 // make sure we don't try to reference it any more.
202 } 211 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/browser_window_cocoa.h ('k') | chrome/browser/cocoa/browser_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698