OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_menu_button.h" | 5 #include "chrome/browser/views/bookmark_menu_button.h" |
6 | 6 |
7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
| 8 #include "app/os_exchange_data.h" |
8 #include "chrome/browser/bookmarks/bookmark_model.h" | 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
9 #include "chrome/browser/bookmarks/bookmark_utils.h" | 10 #include "chrome/browser/bookmarks/bookmark_utils.h" |
10 #include "chrome/browser/browser.h" | 11 #include "chrome/browser/browser.h" |
11 #include "chrome/browser/profile.h" | 12 #include "chrome/browser/profile.h" |
12 #include "chrome/browser/view_ids.h" | 13 #include "chrome/browser/view_ids.h" |
13 #include "chrome/common/os_exchange_data.h" | |
14 #include "chrome/views/widget/widget.h" | 14 #include "chrome/views/widget/widget.h" |
15 #include "grit/theme_resources.h" | 15 #include "grit/theme_resources.h" |
16 | 16 |
17 BookmarkMenuButton::BookmarkMenuButton(Browser* browser) | 17 BookmarkMenuButton::BookmarkMenuButton(Browser* browser) |
18 : views::MenuButton(NULL, std::wstring(), NULL, false), | 18 : views::MenuButton(NULL, std::wstring(), NULL, false), |
19 browser_(browser), | 19 browser_(browser), |
20 bookmark_drop_menu_(NULL), | 20 bookmark_drop_menu_(NULL), |
21 drop_operation_(0) { | 21 drop_operation_(0) { |
22 set_menu_delegate(this); | 22 set_menu_delegate(this); |
23 SetID(VIEW_ID_BOOKMARK_MENU); | 23 SetID(VIEW_ID_BOOKMARK_MENU); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 this, &BookmarkMenuButton::ShowDropMenu); | 136 this, &BookmarkMenuButton::ShowDropMenu); |
137 } | 137 } |
138 | 138 |
139 void BookmarkMenuButton::StopShowFolderDropMenuTimer() { | 139 void BookmarkMenuButton::StopShowFolderDropMenuTimer() { |
140 show_drop_menu_timer_.Stop(); | 140 show_drop_menu_timer_.Stop(); |
141 } | 141 } |
142 | 142 |
143 void BookmarkMenuButton::ShowDropMenu() { | 143 void BookmarkMenuButton::ShowDropMenu() { |
144 RunMenu(NULL, CPoint(), GetWidget()->GetNativeView(), true); | 144 RunMenu(NULL, CPoint(), GetWidget()->GetNativeView(), true); |
145 } | 145 } |
OLD | NEW |