| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ui/app_list/cocoa/apps_search_box_controller.h" | 5 #import "ui/app_list/cocoa/apps_search_box_controller.h" |
| 6 | 6 |
| 7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
| 8 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
| 9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
| 10 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSBezierPath+RoundRect
.h" | 10 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSBezierPath+RoundRect
.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 namespace app_list { | 46 namespace app_list { |
| 47 | 47 |
| 48 class SearchBoxModelObserverBridge : public SearchBoxModelObserver { | 48 class SearchBoxModelObserverBridge : public SearchBoxModelObserver { |
| 49 public: | 49 public: |
| 50 SearchBoxModelObserverBridge(AppsSearchBoxController* parent); | 50 SearchBoxModelObserverBridge(AppsSearchBoxController* parent); |
| 51 virtual ~SearchBoxModelObserverBridge(); | 51 virtual ~SearchBoxModelObserverBridge(); |
| 52 | 52 |
| 53 void SetSearchText(const base::string16& text); | 53 void SetSearchText(const base::string16& text); |
| 54 | 54 |
| 55 virtual void IconChanged() OVERRIDE; | 55 virtual void IconChanged() override; |
| 56 virtual void SpeechRecognitionButtonPropChanged() OVERRIDE; | 56 virtual void SpeechRecognitionButtonPropChanged() override; |
| 57 virtual void HintTextChanged() OVERRIDE; | 57 virtual void HintTextChanged() override; |
| 58 virtual void SelectionModelChanged() OVERRIDE; | 58 virtual void SelectionModelChanged() override; |
| 59 virtual void TextChanged() OVERRIDE; | 59 virtual void TextChanged() override; |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 SearchBoxModel* GetModel(); | 62 SearchBoxModel* GetModel(); |
| 63 | 63 |
| 64 AppsSearchBoxController* parent_; // Weak. Owns us. | 64 AppsSearchBoxController* parent_; // Weak. Owns us. |
| 65 | 65 |
| 66 DISALLOW_COPY_AND_ASSIGN(SearchBoxModelObserverBridge); | 66 DISALLOW_COPY_AND_ASSIGN(SearchBoxModelObserverBridge); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 SearchBoxModelObserverBridge::SearchBoxModelObserverBridge( | 69 SearchBoxModelObserverBridge::SearchBoxModelObserverBridge( |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 NSPoint anchorPoint = [[menuButton window] convertBaseToScreen:NSMakePoint( | 387 NSPoint anchorPoint = [[menuButton window] convertBaseToScreen:NSMakePoint( |
| 388 NSMaxX(anchorRect) + kMenuXOffsetFromButton, | 388 NSMaxX(anchorRect) + kMenuXOffsetFromButton, |
| 389 NSMinY(anchorRect) - kMenuYOffsetFromButton)]; | 389 NSMinY(anchorRect) - kMenuYOffsetFromButton)]; |
| 390 NSRect confinementRect = [[menuButton window] frame]; | 390 NSRect confinementRect = [[menuButton window] frame]; |
| 391 confinementRect.size = NSMakeSize(anchorPoint.x - NSMinX(confinementRect), | 391 confinementRect.size = NSMakeSize(anchorPoint.x - NSMinX(confinementRect), |
| 392 anchorPoint.y - NSMinY(confinementRect)); | 392 anchorPoint.y - NSMinY(confinementRect)); |
| 393 return confinementRect; | 393 return confinementRect; |
| 394 } | 394 } |
| 395 | 395 |
| 396 @end | 396 @end |
| OLD | NEW |