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_grid_view_item.h" | 5 #import "ui/app_list/cocoa/apps_grid_view_item.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/mac/scoped_nsobject.h" | 9 #include "base/mac/scoped_nsobject.h" |
10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 namespace app_list { | 62 namespace app_list { |
63 | 63 |
64 class ItemModelObserverBridge : public app_list::AppListItemObserver { | 64 class ItemModelObserverBridge : public app_list::AppListItemObserver { |
65 public: | 65 public: |
66 ItemModelObserverBridge(AppsGridViewItem* parent, AppListItem* model); | 66 ItemModelObserverBridge(AppsGridViewItem* parent, AppListItem* model); |
67 virtual ~ItemModelObserverBridge(); | 67 virtual ~ItemModelObserverBridge(); |
68 | 68 |
69 AppListItem* model() { return model_; } | 69 AppListItem* model() { return model_; } |
70 NSMenu* GetContextMenu(); | 70 NSMenu* GetContextMenu(); |
71 | 71 |
72 virtual void ItemIconChanged() OVERRIDE; | 72 virtual void ItemIconChanged() override; |
73 virtual void ItemNameChanged() OVERRIDE; | 73 virtual void ItemNameChanged() override; |
74 virtual void ItemIsInstallingChanged() OVERRIDE; | 74 virtual void ItemIsInstallingChanged() override; |
75 virtual void ItemPercentDownloadedChanged() OVERRIDE; | 75 virtual void ItemPercentDownloadedChanged() override; |
76 | 76 |
77 private: | 77 private: |
78 AppsGridViewItem* parent_; // Weak. Owns us. | 78 AppsGridViewItem* parent_; // Weak. Owns us. |
79 AppListItem* model_; // Weak. Owned by AppListModel. | 79 AppListItem* model_; // Weak. Owned by AppListModel. |
80 base::scoped_nsobject<MenuController> context_menu_controller_; | 80 base::scoped_nsobject<MenuController> context_menu_controller_; |
81 | 81 |
82 DISALLOW_COPY_AND_ASSIGN(ItemModelObserverBridge); | 82 DISALLOW_COPY_AND_ASSIGN(ItemModelObserverBridge); |
83 }; | 83 }; |
84 | 84 |
85 ItemModelObserverBridge::ItemModelObserverBridge(AppsGridViewItem* parent, | 85 ItemModelObserverBridge::ItemModelObserverBridge(AppsGridViewItem* parent, |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 } | 446 } |
447 | 447 |
448 // Workaround for http://crbug.com/324365: AppKit in Mavericks tries to call | 448 // Workaround for http://crbug.com/324365: AppKit in Mavericks tries to call |
449 // - [NSButtonCell item] when inspecting accessibility. Without this, an | 449 // - [NSButtonCell item] when inspecting accessibility. Without this, an |
450 // unrecognized selector exception is thrown inside AppKit, crashing Chrome. | 450 // unrecognized selector exception is thrown inside AppKit, crashing Chrome. |
451 - (id)item { | 451 - (id)item { |
452 return nil; | 452 return nil; |
453 } | 453 } |
454 | 454 |
455 @end | 455 @end |
OLD | NEW |