OLD | NEW |
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 "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h" | 5 #import "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 int target_width, | 164 int target_width, |
165 bool suppress_chevron) override; | 165 bool suppress_chevron) override; |
166 void SetChevronVisibility(bool chevron_visible) override; | 166 void SetChevronVisibility(bool chevron_visible) override; |
167 int GetWidth() const override; | 167 int GetWidth() const override; |
168 bool IsAnimating() const override; | 168 bool IsAnimating() const override; |
169 void StopAnimating() override; | 169 void StopAnimating() override; |
170 int GetChevronWidth() const override; | 170 int GetChevronWidth() const override; |
171 bool IsPopupRunning() const override; | 171 bool IsPopupRunning() const override; |
172 void OnOverflowedActionWantsToRunChanged(bool overflowed_action_wants_to_run) | 172 void OnOverflowedActionWantsToRunChanged(bool overflowed_action_wants_to_run) |
173 override; | 173 override; |
| 174 void ShowExtensionMessageBubble( |
| 175 scoped_ptr<extensions::ExtensionMessageBubbleController> controller) |
| 176 override; |
174 | 177 |
175 // The owning BrowserActionsController; weak. | 178 // The owning BrowserActionsController; weak. |
176 BrowserActionsController* controller_; | 179 BrowserActionsController* controller_; |
177 | 180 |
178 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBarBridge); | 181 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBarBridge); |
179 }; | 182 }; |
180 | 183 |
181 ToolbarActionsBarBridge::ToolbarActionsBarBridge( | 184 ToolbarActionsBarBridge::ToolbarActionsBarBridge( |
182 BrowserActionsController* controller) | 185 BrowserActionsController* controller) |
183 : controller_(controller) { | 186 : controller_(controller) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 bool ToolbarActionsBarBridge::IsPopupRunning() const { | 244 bool ToolbarActionsBarBridge::IsPopupRunning() const { |
242 return [ExtensionPopupController popup] != nil; | 245 return [ExtensionPopupController popup] != nil; |
243 } | 246 } |
244 | 247 |
245 void ToolbarActionsBarBridge::OnOverflowedActionWantsToRunChanged( | 248 void ToolbarActionsBarBridge::OnOverflowedActionWantsToRunChanged( |
246 bool overflowed_action_wants_to_run) { | 249 bool overflowed_action_wants_to_run) { |
247 [[controller_ toolbarController] | 250 [[controller_ toolbarController] |
248 setOverflowedToolbarActionWantsToRun:overflowed_action_wants_to_run]; | 251 setOverflowedToolbarActionWantsToRun:overflowed_action_wants_to_run]; |
249 } | 252 } |
250 | 253 |
| 254 void ToolbarActionsBarBridge::ShowExtensionMessageBubble( |
| 255 scoped_ptr<extensions::ExtensionMessageBubbleController> controller) { |
| 256 NOTREACHED(); // Not yet implemented on Mac. |
| 257 } |
| 258 |
251 } // namespace | 259 } // namespace |
252 | 260 |
253 @implementation BrowserActionsController | 261 @implementation BrowserActionsController |
254 | 262 |
255 @synthesize containerView = containerView_; | 263 @synthesize containerView = containerView_; |
256 @synthesize browser = browser_; | 264 @synthesize browser = browser_; |
257 @synthesize isOverflow = isOverflow_; | 265 @synthesize isOverflow = isOverflow_; |
258 | 266 |
259 #pragma mark - | 267 #pragma mark - |
260 #pragma mark Public Methods | 268 #pragma mark Public Methods |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 - (ToolbarActionsBar*)toolbarActionsBar { | 879 - (ToolbarActionsBar*)toolbarActionsBar { |
872 return toolbarActionsBar_.get(); | 880 return toolbarActionsBar_.get(); |
873 } | 881 } |
874 | 882 |
875 + (BrowserActionsController*)fromToolbarActionsBarDelegate: | 883 + (BrowserActionsController*)fromToolbarActionsBarDelegate: |
876 (ToolbarActionsBarDelegate*)delegate { | 884 (ToolbarActionsBarDelegate*)delegate { |
877 return static_cast<ToolbarActionsBarBridge*>(delegate)->controller_for_test(); | 885 return static_cast<ToolbarActionsBarBridge*>(delegate)->controller_for_test(); |
878 } | 886 } |
879 | 887 |
880 @end | 888 @end |
OLD | NEW |