NaCl: Update revision in DEPS, r12770 -> r12773
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / autofill / autofill_popup_view_bridge.h
blob09119f4a976055835435fa7fcd6b94c2a92298b5
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_
8 #include <vector>
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "chrome/browser/ui/autofill/autofill_popup_view.h"
14 @class AutofillPopupViewCocoa;
15 @class NSWindow;
17 namespace autofill {
19 class AutofillPopupController;
21 // Mac implementation for AutofillPopupView interface.
22 // Serves as a bridge to the Objective-C class AutofillPopupViewCocoa which
23 // actually implements the view.
24 class AutofillPopupViewBridge : public AutofillPopupView {
25 public:
26 explicit AutofillPopupViewBridge(AutofillPopupController* controller);
28 private:
29 virtual ~AutofillPopupViewBridge();
31 // AutofillPopupView implementation.
32 virtual void Hide() OVERRIDE;
33 virtual void Show() OVERRIDE;
34 virtual void InvalidateRow(size_t row) OVERRIDE;
35 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE;
37 // Set the initial bounds of the popup to show, including the placement
38 // of it.
39 void SetInitialBounds();
41 // The controller for this view.
42 AutofillPopupController* controller_; // Weak reference.
44 // The native Cocoa window and view.
45 NSWindow* window_; // Weak reference, owns itself.
46 AutofillPopupViewCocoa* view_; // Weak reference, owned by the |window_|.
48 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewBridge);
51 } // namespace autofill
53 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_VIEW_BRIDGE_H_