BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / autofill / password_generation_popup_view_bridge.h
blob829d8f3e81e233157699b6da805b06820222b0f5
1 // Copyright 2014 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_PASSWORD_GENERATION_POPUP_VIEW_BRIDGE_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_BRIDGE_H_
8 #include <vector>
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "base/mac/scoped_nsobject.h"
13 #include "chrome/browser/ui/autofill/password_generation_popup_view.h"
15 @class PasswordGenerationPopupViewCocoa;
17 namespace autofill {
19 class AutofillPopupController;
21 // Mac implementation for PasswordGenerationPopupView interface.
22 // Serves as a bridge to an instance of the Objective-C class which actually
23 // implements the view.
24 class PasswordGenerationPopupViewBridge : public PasswordGenerationPopupView {
25 public:
26 explicit PasswordGenerationPopupViewBridge(
27 PasswordGenerationPopupController* controller);
29 private:
30 virtual ~PasswordGenerationPopupViewBridge();
32 // PasswordGenerationPopupView implementation.
33 void Hide() override;
34 void Show() override;
35 gfx::Size GetPreferredSizeOfPasswordView() override;
36 void UpdateBoundsAndRedrawPopup() override;
37 void PasswordSelectionUpdated() override;
38 bool IsPointInPasswordBounds(const gfx::Point& point) override;
40 // The native Cocoa view.
41 base::scoped_nsobject<PasswordGenerationPopupViewCocoa> view_;
43 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationPopupViewBridge);
46 } // namespace autofill
48 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_BRIDGE_H_