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

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

Issue 246004: Remove the context menu item 'Remove from list' from download shelf (Closed)
Patch Set: rebased Created 11 years, 2 months 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
« no previous file with comments | « chrome/browser/download/download_shelf.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/download_item_view.h" 5 #include "chrome/browser/views/download_item_view.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "app/gfx/canvas.h" 9 #include "app/gfx/canvas.h"
10 #include "app/gfx/text_elider.h" 10 #include "app/gfx/text_elider.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } else { 93 } else {
94 context_menu->AppendMenuItem(OPEN_WHEN_COMPLETE, L"", 94 context_menu->AppendMenuItem(OPEN_WHEN_COMPLETE, L"",
95 views::Menu::CHECKBOX); 95 views::Menu::CHECKBOX);
96 } 96 }
97 context_menu->AppendMenuItem(ALWAYS_OPEN_TYPE, L"", views::Menu::CHECKBOX); 97 context_menu->AppendMenuItem(ALWAYS_OPEN_TYPE, L"", views::Menu::CHECKBOX);
98 context_menu->AppendSeparator(); 98 context_menu->AppendSeparator();
99 if (download_->state() == DownloadItem::IN_PROGRESS) 99 if (download_->state() == DownloadItem::IN_PROGRESS)
100 context_menu->AppendMenuItem(TOGGLE_PAUSE, L"", views::Menu::NORMAL); 100 context_menu->AppendMenuItem(TOGGLE_PAUSE, L"", views::Menu::NORMAL);
101 context_menu->AppendMenuItem(SHOW_IN_FOLDER, L"", views::Menu::NORMAL); 101 context_menu->AppendMenuItem(SHOW_IN_FOLDER, L"", views::Menu::NORMAL);
102 context_menu->AppendSeparator(); 102 context_menu->AppendSeparator();
103 context_menu->AppendMenuItem(REMOVE_ITEM, L"", views::Menu::NORMAL);
104 context_menu->AppendMenuItem(CANCEL, L"", views::Menu::NORMAL); 103 context_menu->AppendMenuItem(CANCEL, L"", views::Menu::NORMAL);
105 context_menu->RunMenuAt(point.x(), point.y()); 104 context_menu->RunMenuAt(point.x(), point.y());
106 } 105 }
107 106
108 // This method runs when the caller has been deleted and we should not attempt 107 // This method runs when the caller has been deleted and we should not attempt
109 // to access |download_|. 108 // to access |download_|.
110 void Stop() { 109 void Stop() {
111 download_ = NULL; 110 download_ = NULL;
112 model_ = NULL; 111 model_ = NULL;
113 } 112 }
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 void DownloadItemView::Reenable() { 1025 void DownloadItemView::Reenable() {
1027 disabled_while_opening_ = false; 1026 disabled_while_opening_ = false;
1028 SetEnabled(true); // Triggers a repaint. 1027 SetEnabled(true); // Triggers a repaint.
1029 } 1028 }
1030 1029
1031 bool DownloadItemView::InDropDownButtonXCoordinateRange(int x) { 1030 bool DownloadItemView::InDropDownButtonXCoordinateRange(int x) {
1032 if (x > drop_down_x_left_ && x < drop_down_x_right_) 1031 if (x > drop_down_x_left_ && x < drop_down_x_right_)
1033 return true; 1032 return true;
1034 return false; 1033 return false;
1035 } 1034 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_shelf.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698