| OLD | NEW |
| 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 #include "chrome/browser/ui/views/wrench_menu.h" | 5 #include "chrome/browser/ui/views/wrench_menu.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 949 return; // Already created the menu. | 949 return; // Already created the menu. |
| 950 | 950 |
| 951 BookmarkModel* model = browser_->profile()->GetBookmarkModel(); | 951 BookmarkModel* model = browser_->profile()->GetBookmarkModel(); |
| 952 if (!model->IsLoaded()) | 952 if (!model->IsLoaded()) |
| 953 return; | 953 return; |
| 954 | 954 |
| 955 model->AddObserver(this); | 955 model->AddObserver(this); |
| 956 | 956 |
| 957 // TODO(oshima): Replace with views only API. | 957 // TODO(oshima): Replace with views only API. |
| 958 views::Widget* parent = views::Widget::GetWidgetForNativeWindow( | 958 views::Widget* parent = views::Widget::GetWidgetForNativeWindow( |
| 959 browser_->window()->GetNativeHandle()); | 959 browser_->window()->GetNativeWindow()); |
| 960 bookmark_menu_delegate_.reset( | 960 bookmark_menu_delegate_.reset( |
| 961 new BookmarkMenuDelegate(browser_->profile(), | 961 new BookmarkMenuDelegate(browser_->profile(), |
| 962 NULL, | 962 NULL, |
| 963 parent, | 963 parent, |
| 964 first_bookmark_command_id_)); | 964 first_bookmark_command_id_)); |
| 965 bookmark_menu_delegate_->Init( | 965 bookmark_menu_delegate_->Init( |
| 966 this, bookmark_menu_, model->bookmark_bar_node(), 0, | 966 this, bookmark_menu_, model->bookmark_bar_node(), 0, |
| 967 BookmarkMenuDelegate::SHOW_PERMANENT_FOLDERS, | 967 BookmarkMenuDelegate::SHOW_PERMANENT_FOLDERS, |
| 968 bookmark_utils::LAUNCH_WRENCH_MENU); | 968 bookmark_utils::LAUNCH_WRENCH_MENU); |
| 969 } | 969 } |
| OLD | NEW |