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 #ifndef CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_COCOA2_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_COCOA2_H_ |
6 #define CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_COCOA2_H_ | 6 #define CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_COCOA2_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/memory/scoped_nsobject.h" | 10 #include "base/memory/scoped_nsobject.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 virtual void OnExtensionIconChanged(WebIntentPickerModel* model, | 66 virtual void OnExtensionIconChanged(WebIntentPickerModel* model, |
67 const std::string& extension_id) OVERRIDE; | 67 const std::string& extension_id) OVERRIDE; |
68 virtual void OnInlineDisposition(const string16& title, | 68 virtual void OnInlineDisposition(const string16& title, |
69 const GURL& url) OVERRIDE; | 69 const GURL& url) OVERRIDE; |
70 | 70 |
71 // ConstrainedWindowMacDelegate2 implementation. | 71 // ConstrainedWindowMacDelegate2 implementation. |
72 virtual void OnConstrainedWindowClosed( | 72 virtual void OnConstrainedWindowClosed( |
73 ConstrainedWindowMac2* window) OVERRIDE; | 73 ConstrainedWindowMac2* window) OVERRIDE; |
74 | 74 |
75 private: | 75 private: |
| 76 void ScheduleUpdate(); |
| 77 void PerformUpdate(); |
| 78 |
76 content::WebContents* const web_contents_; | 79 content::WebContents* const web_contents_; |
77 WebIntentPickerDelegate* delegate_; | 80 WebIntentPickerDelegate* delegate_; |
78 WebIntentPickerModel* model_; | 81 WebIntentPickerModel* model_; |
79 scoped_nsobject<WebIntentPickerViewController> view_controller_; | 82 scoped_nsobject<WebIntentPickerViewController> view_controller_; |
80 scoped_ptr<ConstrainedWindowMac2> constrained_window_; | 83 scoped_ptr<ConstrainedWindowMac2> constrained_window_; |
| 84 bool update_pending_; |
| 85 base::WeakPtrFactory<WebIntentPickerCocoa2> weak_ptr_factory_; |
81 }; | 86 }; |
82 | 87 |
83 #endif // CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_COCOA2_H_ | 88 #endif // CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_COCOA2_H_ |
OLD | NEW |