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

Side by Side Diff: chrome/browser/views/bookmark_manager_view.cc

Issue 10896: Re-do the way browser windows are shown:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include "chrome/browser/views/bookmark_manager_view.h" 5 #include "chrome/browser/views/bookmark_manager_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/gfx/skia_utils.h" 9 #include "base/gfx/skia_utils.h"
10 #include "chrome/app/locales/locale_settings.h" 10 #include "chrome/app/locales/locale_settings.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 gfx::Size BookmarkManagerView::GetPreferredSize() { 297 gfx::Size BookmarkManagerView::GetPreferredSize() {
298 return gfx::Size(views::Window::GetLocalizedContentsSize( 298 return gfx::Size(views::Window::GetLocalizedContentsSize(
299 IDS_BOOKMARK_MANAGER_DIALOG_WIDTH_CHARS, 299 IDS_BOOKMARK_MANAGER_DIALOG_WIDTH_CHARS,
300 IDS_BOOKMARK_MANAGER_DIALOG_HEIGHT_LINES)); 300 IDS_BOOKMARK_MANAGER_DIALOG_HEIGHT_LINES));
301 } 301 }
302 302
303 std::wstring BookmarkManagerView::GetWindowTitle() const { 303 std::wstring BookmarkManagerView::GetWindowTitle() const {
304 return l10n_util::GetString(IDS_BOOKMARK_MANAGER_TITLE); 304 return l10n_util::GetString(IDS_BOOKMARK_MANAGER_TITLE);
305 } 305 }
306 306
307 void BookmarkManagerView::SaveWindowPosition(const CRect& bounds, 307 std::wstring BookmarkManagerView::GetWindowName() const {
308 bool maximized, 308 return prefs::kBookmarkManagerPlacement;
309 bool always_on_top) {
310 window()->SaveWindowPositionToPrefService(g_browser_process->local_state(),
311 prefs::kBookmarkManagerPlacement,
312 bounds, maximized, always_on_top);
313 }
314
315 bool BookmarkManagerView::RestoreWindowPosition(CRect* bounds,
316 bool* maximized,
317 bool* always_on_top) {
318 return window()->RestoreWindowPositionFromPrefService(
319 g_browser_process->local_state(),
320 prefs::kBookmarkManagerPlacement,
321 bounds, maximized, always_on_top);
322 } 309 }
323 310
324 void BookmarkManagerView::WindowClosing() { 311 void BookmarkManagerView::WindowClosing() {
325 g_browser_process->local_state()->SetInteger( 312 g_browser_process->local_state()->SetInteger(
326 prefs::kBookmarkManagerSplitLocation, split_view_->divider_x()); 313 prefs::kBookmarkManagerSplitLocation, split_view_->divider_x());
327 } 314 }
328 315
329 void BookmarkManagerView::OnDoubleClick() { 316 void BookmarkManagerView::OnDoubleClick() {
330 std::vector<BookmarkNode*> nodes = GetSelectedTableNodes(); 317 std::vector<BookmarkNode*> nodes = GetSelectedTableNodes();
331 if (nodes.empty()) 318 if (nodes.empty())
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 if (select_file_dialog_.get()) 692 if (select_file_dialog_.get())
706 select_file_dialog_->ListenerDestroyed(); 693 select_file_dialog_->ListenerDestroyed();
707 694
708 select_file_dialog_ = SelectFileDialog::Create(this); 695 select_file_dialog_ = SelectFileDialog::Create(this);
709 select_file_dialog_->SelectFile( 696 select_file_dialog_->SelectFile(
710 SelectFileDialog::SELECT_SAVEAS_FILE, std::wstring(), L"bookmarks.html", 697 SelectFileDialog::SELECT_SAVEAS_FILE, std::wstring(), L"bookmarks.html",
711 win_util::GetFileFilterFromPath(L"bookmarks.html"), L"html", 698 win_util::GetFileFilterFromPath(L"bookmarks.html"), L"html",
712 GetContainer()->GetHWND(), 699 GetContainer()->GetHWND(),
713 reinterpret_cast<void*>(IDS_BOOKMARK_MANAGER_EXPORT_MENU)); 700 reinterpret_cast<void*>(IDS_BOOKMARK_MANAGER_EXPORT_MENU));
714 } 701 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698