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

Side by Side Diff: chrome/browser/ui/views/create_application_shortcut_view.h

Issue 2785683003: views: implement width snapping for DialogDelegateViews (Closed)
Patch Set: Created 3 years, 8 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 CHROME_BROWSER_UI_VIEWS_CREATE_APPLICATION_SHORTCUT_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_CREATE_APPLICATION_SHORTCUT_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_CREATE_APPLICATION_SHORTCUT_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_CREATE_APPLICATION_SHORTCUT_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // places where it's clear what app they are from. 49 // places where it's clear what app they are from.
50 DIALOG_LAYOUT_APP_SHORTCUT 50 DIALOG_LAYOUT_APP_SHORTCUT
51 }; 51 };
52 52
53 explicit CreateApplicationShortcutView(Profile* profile); 53 explicit CreateApplicationShortcutView(Profile* profile);
54 ~CreateApplicationShortcutView() override; 54 ~CreateApplicationShortcutView() override;
55 55
56 // Initialize the controls on the dialog. 56 // Initialize the controls on the dialog.
57 void InitControls(DialogLayout dialog_layout); 57 void InitControls(DialogLayout dialog_layout);
58 58
59 // Overridden from views::View: 59 // Overridden from views::DialogDelegateView:
60 gfx::Size GetPreferredSize() const override; 60 gfx::Size GetUnsnappedPreferredSize() const override;
61 61
62 // Overridden from views::DialogDelegate: 62 // Overridden from views::DialogDelegate:
63 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; 63 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
64 bool IsDialogButtonEnabled(ui::DialogButton button) const override; 64 bool IsDialogButtonEnabled(ui::DialogButton button) const override;
65 ui::ModalType GetModalType() const override; 65 ui::ModalType GetModalType() const override;
66 base::string16 GetWindowTitle() const override; 66 base::string16 GetWindowTitle() const override;
67 bool Accept() override; 67 bool Accept() override;
68 68
69 // Overridden from views::ButtonListener: 69 // Overridden from views::ButtonListener:
70 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 70 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 void OnAppInfoLoaded(std::unique_ptr<web_app::ShortcutInfo> shortcut_info); 145 void OnAppInfoLoaded(std::unique_ptr<web_app::ShortcutInfo> shortcut_info);
146 146
147 base::Callback<void(bool)> close_callback_; 147 base::Callback<void(bool)> close_callback_;
148 148
149 base::WeakPtrFactory<CreateChromeApplicationShortcutView> weak_ptr_factory_; 149 base::WeakPtrFactory<CreateChromeApplicationShortcutView> weak_ptr_factory_;
150 150
151 DISALLOW_COPY_AND_ASSIGN(CreateChromeApplicationShortcutView); 151 DISALLOW_COPY_AND_ASSIGN(CreateChromeApplicationShortcutView);
152 }; 152 };
153 153
154 #endif // CHROME_BROWSER_UI_VIEWS_CREATE_APPLICATION_SHORTCUT_VIEW_H_ 154 #endif // CHROME_BROWSER_UI_VIEWS_CREATE_APPLICATION_SHORTCUT_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698