diff options
Diffstat (limited to 'chrome/browser/views/bookmark_editor_view.cc')
-rw-r--r-- | chrome/browser/views/bookmark_editor_view.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/chrome/browser/views/bookmark_editor_view.cc b/chrome/browser/views/bookmark_editor_view.cc index e7a834a..da5a92d 100644 --- a/chrome/browser/views/bookmark_editor_view.cc +++ b/chrome/browser/views/bookmark_editor_view.cc @@ -79,7 +79,6 @@ BookmarkEditorView::BookmarkEditorView(Profile* profile, #pragma warning(suppress: 4355) // Okay to pass "this" here. new_group_button_( l10n_util::GetString(IDS_BOOMARK_EDITOR_NEW_FOLDER_BUTTON)), - dialog_(NULL), url_(url), title_(title), running_menu_for_root_(false) { @@ -122,6 +121,10 @@ bool BookmarkEditorView::AreAcceleratorsEnabled(DialogButton button) { return !tree_view_.GetEditingNode(); } +ChromeViews::View* BookmarkEditorView::GetContentsView() { + return this; +} + void BookmarkEditorView::Layout() { // Let the grid layout manager lay out most of the dialog... GetLayoutManager()->Layout(this); @@ -205,12 +208,11 @@ bool BookmarkEditorView::IsCommandEnabled(int id) const { } void BookmarkEditorView::Show(HWND parent_hwnd) { - dialog_ = ChromeViews::Window::CreateChromeWindow(parent_hwnd, gfx::Rect(), - this, this); + ChromeViews::Window::CreateChromeWindow(parent_hwnd, gfx::Rect(), this); UserInputChanged(); if (bb_model_->IsLoaded()) ExpandAndSelect(); - dialog_->Show(); + window()->Show(); // Select all the text in the name textfield. title_tf_.SelectAll(); // Give focus to the name textfield. @@ -218,8 +220,8 @@ void BookmarkEditorView::Show(HWND parent_hwnd) { } void BookmarkEditorView::Close() { - DCHECK(dialog_); - dialog_->Close(); + DCHECK(window()); + window()->Close(); } void BookmarkEditorView::ShowContextMenu(View* source, @@ -389,7 +391,7 @@ void BookmarkEditorView::UserInputChanged() { url_tf_.SetBackgroundColor(kErrorColor); else url_tf_.SetDefaultBackgroundColor(); - dialog_->UpdateDialogButtons(); + window()->UpdateDialogButtons(); } void BookmarkEditorView::NewGroup() { |