OLD | NEW |
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 "chrome/app/locales/locale_settings.h" | 9 #include "chrome/app/locales/locale_settings.h" |
10 #include "chrome/browser/bookmarks/bookmark_folder_tree_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_folder_tree_model.h" |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 // TableViews iterator iterates in reverse order. Reverse the nodes so they | 297 // TableViews iterator iterates in reverse order. Reverse the nodes so they |
298 // are opened in visual order. | 298 // are opened in visual order. |
299 std::reverse(nodes.begin(), nodes.end()); | 299 std::reverse(nodes.begin(), nodes.end()); |
300 return nodes; | 300 return nodes; |
301 } | 301 } |
302 | 302 |
303 void BookmarkManagerView::PaintBackground(ChromeCanvas* canvas) { | 303 void BookmarkManagerView::PaintBackground(ChromeCanvas* canvas) { |
304 canvas->drawColor(kBackgroundColorBottom, SkPorterDuff::kSrc_Mode); | 304 canvas->drawColor(kBackgroundColorBottom, SkPorterDuff::kSrc_Mode); |
305 | 305 |
306 SkPaint paint; | 306 SkPaint paint; |
307 paint.setShader(gfx::CreateGradientShader(0, kBackgroundGradientHeight, | 307 paint.setShader(skia::CreateGradientShader(0, kBackgroundGradientHeight, |
308 kBackgroundColorTop, | 308 kBackgroundColorTop, |
309 kBackgroundColorBottom))->safeUnref(); | 309 kBackgroundColorBottom))->safeUnref(); |
310 canvas->FillRectInt(0, 0, width(), kBackgroundGradientHeight, paint); | 310 canvas->FillRectInt(0, 0, width(), kBackgroundGradientHeight, paint); |
311 } | 311 } |
312 | 312 |
313 gfx::Size BookmarkManagerView::GetPreferredSize() { | 313 gfx::Size BookmarkManagerView::GetPreferredSize() { |
314 return gfx::Size(views::Window::GetLocalizedContentsSize( | 314 return gfx::Size(views::Window::GetLocalizedContentsSize( |
315 IDS_BOOKMARK_MANAGER_DIALOG_WIDTH_CHARS, | 315 IDS_BOOKMARK_MANAGER_DIALOG_WIDTH_CHARS, |
316 IDS_BOOKMARK_MANAGER_DIALOG_HEIGHT_LINES)); | 316 IDS_BOOKMARK_MANAGER_DIALOG_HEIGHT_LINES)); |
317 } | 317 } |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 if (select_file_dialog_.get()) | 722 if (select_file_dialog_.get()) |
723 select_file_dialog_->ListenerDestroyed(); | 723 select_file_dialog_->ListenerDestroyed(); |
724 | 724 |
725 select_file_dialog_ = SelectFileDialog::Create(this); | 725 select_file_dialog_ = SelectFileDialog::Create(this); |
726 select_file_dialog_->SelectFile( | 726 select_file_dialog_->SelectFile( |
727 SelectFileDialog::SELECT_SAVEAS_FILE, std::wstring(), L"bookmarks.html", | 727 SelectFileDialog::SELECT_SAVEAS_FILE, std::wstring(), L"bookmarks.html", |
728 win_util::GetFileFilterFromPath(L"bookmarks.html"), L"html", | 728 win_util::GetFileFilterFromPath(L"bookmarks.html"), L"html", |
729 GetWidget()->GetHWND(), | 729 GetWidget()->GetHWND(), |
730 reinterpret_cast<void*>(IDS_BOOKMARK_MANAGER_EXPORT_MENU)); | 730 reinterpret_cast<void*>(IDS_BOOKMARK_MANAGER_EXPORT_MENU)); |
731 } | 731 } |
OLD | NEW |