| 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/global_error_bubble_controller.h" | 5 #import "chrome/browser/ui/cocoa/global_error_bubble_controller.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/search_engines/util.h" | 10 #include "chrome/browser/search_engines/util.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // The vertical offset of the wrench bubble from the wrench menu button. | 29 // The vertical offset of the wrench bubble from the wrench menu button. |
| 30 const CGFloat kWrenchBubblePointOffsetY = 6; | 30 const CGFloat kWrenchBubblePointOffsetY = 6; |
| 31 | 31 |
| 32 } // namespace | 32 } // namespace |
| 33 | 33 |
| 34 namespace GlobalErrorBubbleControllerInternal { | 34 namespace GlobalErrorBubbleControllerInternal { |
| 35 | 35 |
| 36 // This is the bridge to the C++ GlobalErrorBubbleViewBase object. | 36 // This is the bridge to the C++ GlobalErrorBubbleViewBase object. |
| 37 class Bridge : public GlobalErrorBubbleViewBase { | 37 class Bridge : public GlobalErrorBubbleViewBase { |
| 38 public: | 38 public: |
| 39 Bridge(GlobalErrorBubbleController* controller) : controller_(controller) { | 39 explicit Bridge(GlobalErrorBubbleController* controller) |
| 40 : controller_(controller) { |
| 40 } | 41 } |
| 41 | 42 |
| 42 private: | 43 private: |
| 43 virtual void CloseBubbleView() OVERRIDE { | 44 virtual void CloseBubbleView() OVERRIDE { |
| 44 [controller_ close]; | 45 [controller_ close]; |
| 45 } | 46 } |
| 46 | 47 |
| 47 GlobalErrorBubbleController* controller_; // Weak, owns this. | 48 GlobalErrorBubbleController* controller_; // Weak, owns this. |
| 48 }; | 49 }; |
| 49 | 50 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 [self close]; | 143 [self close]; |
| 143 } | 144 } |
| 144 | 145 |
| 145 @end | 146 @end |
| 146 | 147 |
| 147 GlobalErrorBubbleViewBase* GlobalErrorBubbleViewBase::ShowBubbleView( | 148 GlobalErrorBubbleViewBase* GlobalErrorBubbleViewBase::ShowBubbleView( |
| 148 Browser* browser, | 149 Browser* browser, |
| 149 const base::WeakPtr<GlobalError>& error) { | 150 const base::WeakPtr<GlobalError>& error) { |
| 150 return [GlobalErrorBubbleController showForBrowser:browser error:error]; | 151 return [GlobalErrorBubbleController showForBrowser:browser error:error]; |
| 151 } | 152 } |
| OLD | NEW |