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

Side by Side Diff: chrome/browser/bookmarks/bookmark_input_window_dialog_controller.h

Issue 8438037: Change 'Add Page' to show a simple input dialog with --use-more-webui. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comments Created 9 years, 1 month 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
(Empty)
1 // Copyright (c) 2011 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.
4
5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_INPUT_WINDOW_DIALOG_CONTROLLER_H_
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_INPUT_WINDOW_DIALOG_CONTROLLER_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h"
11 #include "chrome/browser/bookmarks/base_bookmark_model_observer.h"
12 #include "chrome/browser/bookmarks/bookmark_editor.h"
13 #include "chrome/browser/ui/input_window_dialog.h"
14 #include "ui/gfx/native_widget_types.h"
15
16 class Profile;
17
18 // BookmarkInputWindowDialogController manages the editing and/or creation of a
19 // bookmark page or a bookmark folder. If the user presses ok, the name change
20 // is committed to the model.
21 //
22 // BookmarkInputWindowDialogController deletes itself when the window is closed.
23 class BookmarkInputWindowDialogController : public InputWindowDialog::Delegate,
24 public BaseBookmarkModelObserver {
25 public:
26 virtual ~BookmarkInputWindowDialogController();
27
28 static void Show(Profile* profile,
29 gfx::NativeWindow wnd,
30 const BookmarkEditor::EditDetails& details);
31
32 private:
33 BookmarkInputWindowDialogController(
34 Profile* profile,
35 gfx::NativeWindow wnd,
36 const BookmarkEditor::EditDetails& details);
37
38 // InputWindowDialog::Delegate:
39 virtual bool IsValid(const InputWindowDialog::InputTexts& texts) OVERRIDE;
40 virtual void InputAccepted(
41 const InputWindowDialog::InputTexts& texts) OVERRIDE;
42 virtual void InputCanceled() OVERRIDE;
43
44 // BaseBookmarkModelObserver:
45 virtual void BookmarkModelChanged() OVERRIDE;
46 virtual void BookmarkModelBeingDeleted(BookmarkModel* model) OVERRIDE;
47
48 Profile* profile_;
49
50 BookmarkModel* model_;
51
52 BookmarkEditor::EditDetails details_;
53
54 InputWindowDialog* dialog_;
55
56 DISALLOW_COPY_AND_ASSIGN(BookmarkInputWindowDialogController);
57 };
58
59 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_INPUT_WINDOW_DIALOG_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698