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; | |
177 | 174 |
178 // The owning BrowserActionsController; weak. | 175 // The owning BrowserActionsController; weak. |
179 BrowserActionsController* controller_; | 176 BrowserActionsController* controller_; |
180 | 177 |
181 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBarBridge); | 178 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBarBridge); |
182 }; | 179 }; |
183 | 180 |
184 ToolbarActionsBarBridge::ToolbarActionsBarBridge( | 181 ToolbarActionsBarBridge::ToolbarActionsBarBridge( |
185 BrowserActionsController* controller) | 182 BrowserActionsController* controller) |
186 : controller_(controller) { | 183 : controller_(controller) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 bool ToolbarActionsBarBridge::IsPopupRunning() const { | 241 bool ToolbarActionsBarBridge::IsPopupRunning() const { |
245 return [ExtensionPopupController popup] != nil; | 242 return [ExtensionPopupController popup] != nil; |
246 } | 243 } |
247 | 244 |
248 void ToolbarActionsBarBridge::OnOverflowedActionWantsToRunChanged( | 245 void ToolbarActionsBarBridge::OnOverflowedActionWantsToRunChanged( |
249 bool overflowed_action_wants_to_run) { | 246 bool overflowed_action_wants_to_run) { |
250 [[controller_ toolbarController] | 247 [[controller_ toolbarController] |
251 setOverflowedToolbarActionWantsToRun:overflowed_action_wants_to_run]; | 248 setOverflowedToolbarActionWantsToRun:overflowed_action_wants_to_run]; |
252 } | 249 } |
253 | 250 |
254 void ToolbarActionsBarBridge::ShowExtensionMessageBubble( | |
255 scoped_ptr<extensions::ExtensionMessageBubbleController> controller) { | |
256 NOTREACHED(); // Not yet implemented on Mac. | |
257 } | |
258 | |
259 } // namespace | 251 } // namespace |
260 | 252 |
261 @implementation BrowserActionsController | 253 @implementation BrowserActionsController |
262 | 254 |
263 @synthesize containerView = containerView_; | 255 @synthesize containerView = containerView_; |
264 @synthesize browser = browser_; | 256 @synthesize browser = browser_; |
265 @synthesize isOverflow = isOverflow_; | 257 @synthesize isOverflow = isOverflow_; |
266 | 258 |
267 #pragma mark - | 259 #pragma mark - |
268 #pragma mark Public Methods | 260 #pragma mark Public Methods |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 - (ToolbarActionsBar*)toolbarActionsBar { | 871 - (ToolbarActionsBar*)toolbarActionsBar { |
880 return toolbarActionsBar_.get(); | 872 return toolbarActionsBar_.get(); |
881 } | 873 } |
882 | 874 |
883 + (BrowserActionsController*)fromToolbarActionsBarDelegate: | 875 + (BrowserActionsController*)fromToolbarActionsBarDelegate: |
884 (ToolbarActionsBarDelegate*)delegate { | 876 (ToolbarActionsBarDelegate*)delegate { |
885 return static_cast<ToolbarActionsBarBridge*>(delegate)->controller_for_test(); | 877 return static_cast<ToolbarActionsBarBridge*>(delegate)->controller_for_test(); |
886 } | 878 } |
887 | 879 |
888 @end | 880 @end |
OLD | NEW |