Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: ios/chrome/browser/ui/omnibox/page_info_view_controller.h

Issue 2707963002: [ObjC ARC] Converts ios/chrome/browser/ui/omnibox:omnibox_internal to ARC. (Closed)
Patch Set: weaks Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef IOS_CHROME_BROWSER_UI_OMNIBOX_PAGE_INFO_VIEW_CONTROLLER_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_OMNIBOX_PAGE_INFO_VIEW_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_UI_OMNIBOX_PAGE_INFO_VIEW_CONTROLLER_H_ 6 #define IOS_CHROME_BROWSER_UI_OMNIBOX_PAGE_INFO_VIEW_CONTROLLER_H_
7 7
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 // PageInfoModelObserver implementation. 47 // PageInfoModelObserver implementation.
48 void OnPageInfoModelChanged() override; 48 void OnPageInfoModelChanged() override;
49 49
50 // Sets the controller. 50 // Sets the controller.
51 void set_controller(PageInfoViewController* controller) { 51 void set_controller(PageInfoViewController* controller) {
52 controller_ = controller; 52 controller_ = controller;
53 } 53 }
54 54
55 private: 55 private:
56 void PerformLayout() { 56 void PerformLayout() {
rohitrao (ping after 24h) 2017/02/24 13:40:32 Should we move the body of this method into the .m
stkhapugin 2017/03/01 17:43:59 Done.
57 // If the window is animating closed when this is called, the 57 // If the window is animating closed when this is called, the
58 // animation could be holding the last reference to |controller_| 58 // animation could be holding the last reference to |controller_|
59 // (and thus |this|). Pin it until the task is completed. 59 // (and thus |this|). Pin it until the task is completed.
60 base::scoped_nsobject<PageInfoViewController> keep_alive( 60 base::scoped_nsobject<PageInfoViewController> keep_alive(controller_);
61 [controller_ retain]);
62 [controller_ performLayout]; 61 [controller_ performLayout];
63 } 62 }
64 63
65 PageInfoViewController* controller_; // weak 64 PageInfoViewController* controller_; // weak
rohitrao (ping after 24h) 2017/02/24 13:40:32 This is an objc class. Does it need to be annotat
stkhapugin 2017/03/01 17:43:59 Done.
66 65
67 base::WeakPtrFactory<PageInfoModelBubbleBridge> weak_ptr_factory_; 66 base::WeakPtrFactory<PageInfoModelBubbleBridge> weak_ptr_factory_;
68 67
69 DISALLOW_COPY_AND_ASSIGN(PageInfoModelBubbleBridge); 68 DISALLOW_COPY_AND_ASSIGN(PageInfoModelBubbleBridge);
70 }; 69 };
71 70
72 #endif // IOS_CHROME_BROWSER_UI_OMNIBOX_PAGE_INFO_VIEW_CONTROLLER_H_ 71 #endif // IOS_CHROME_BROWSER_UI_OMNIBOX_PAGE_INFO_VIEW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698