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

Unified Diff: chrome/browser/ui/views/new_task_manager_view.cc

Issue 1722493002: Project Eraser: Kill chrome://memory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chrome_browser_ui.gypi. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/new_task_manager_view.h ('k') | chrome/browser/ui/views/task_manager_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/new_task_manager_view.cc
diff --git a/chrome/browser/ui/views/new_task_manager_view.cc b/chrome/browser/ui/views/new_task_manager_view.cc
index 9b1af69e5532ecd616425a83c71fe38ca8a328b0..f95f800d155508c02ea931aa27ba3bcddf184ba5 100644
--- a/chrome/browser/ui/views/new_task_manager_view.cc
+++ b/chrome/browser/ui/views/new_task_manager_view.cc
@@ -22,7 +22,6 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/table_model_observer.h"
#include "ui/views/controls/label.h"
-#include "ui/views/controls/link.h"
#include "ui/views/controls/table/table_view.h"
#include "ui/views/layout/layout_constants.h"
#include "ui/views/view.h"
@@ -46,25 +45,6 @@ namespace {
NewTaskManagerView* g_task_manager_view = nullptr;
-// Opens the "about:memory" for the "stats for nerds" link.
-void OpenAboutMemory() {
- Profile* profile = ProfileManager::GetLastUsedProfileAllowedByPolicy();
- if (profile->IsGuestSession() &&
- !g_browser_process->local_state()->GetBoolean(
- prefs::kBrowserGuestModeEnabled)) {
- UserManager::Show(base::FilePath(),
- profiles::USER_MANAGER_NO_TUTORIAL,
- profiles::USER_MANAGER_SELECT_PROFILE_CHROME_MEMORY);
- return;
- }
-
- chrome::NavigateParams params(profile,
- GURL(chrome::kChromeUIMemoryURL),
- ui::PAGE_TRANSITION_LINK);
- params.disposition = NEW_FOREGROUND_TAB;
- chrome::Navigate(&params);
-}
-
} // namespace
NewTaskManagerView::~NewTaskManagerView() {
@@ -164,12 +144,6 @@ void NewTaskManagerView::Layout() {
int y_buttons = parent_bounds.bottom() - size.height() - vertical_margin;
kill_button_->SetBounds(x, y_buttons, size.width(), size.height());
- size = about_memory_link_->GetPreferredSize();
- about_memory_link_->SetBounds(
- horizontal_margin,
- y_buttons + (kill_button_->height() - size.height()) / 2,
- size.width(), size.height());
-
gfx::Rect rect = GetLocalBounds();
rect.Inset(horizontal_margin, views::kPanelVertMargin);
rect.Inset(0, 0, 0,
@@ -192,20 +166,17 @@ bool NewTaskManagerView::AcceleratorPressed(
void NewTaskManagerView::ViewHierarchyChanged(
const ViewHierarchyChangedDetails& details) {
views::DialogDelegateView::ViewHierarchyChanged(details);
- // Since we want the Kill button and the Memory Details link to show up in
- // the same visual row as the close button, which is provided by the
- // framework, we must add the buttons to the non-client view, which is the
- // parent of this view. Similarly, when we're removed from the view
- // hierarchy, we must take care to clean up those items as well.
+ // Since we want the Kill button to show up in the same visual row as the
+ // close button, which is provided by the framework, we must add it to the
+ // non-client view, which is the parent of this view. Similarly, when we're
+ // removed from the view hierarchy, we must take care to clean up that item.
if (details.child == this) {
if (details.is_add) {
- details.parent->AddChildView(about_memory_link_);
details.parent->AddChildView(kill_button_);
tab_table_parent_ = tab_table_->CreateParentIfNecessary();
AddChildView(tab_table_parent_);
} else {
details.parent->RemoveChildView(kill_button_);
- details.parent->RemoveChildView(about_memory_link_);
}
}
}
@@ -296,11 +267,6 @@ void NewTaskManagerView::OnKeyDown(ui::KeyboardCode keycode) {
ActivateFocusedTab();
}
-void NewTaskManagerView::LinkClicked(views::Link* source, int event_flags) {
- DCHECK_EQ(about_memory_link_, source);
- OpenAboutMemory();
-}
-
void NewTaskManagerView::ShowContextMenuForView(
views::View* source,
const gfx::Point& point,
@@ -344,7 +310,6 @@ void NewTaskManagerView::ExecuteCommand(int id, int event_flags) {
NewTaskManagerView::NewTaskManagerView()
: kill_button_(nullptr),
- about_memory_link_(nullptr),
tab_table_(nullptr),
tab_table_parent_(nullptr),
is_always_on_top_(false) {
@@ -386,10 +351,6 @@ void NewTaskManagerView::Init() {
l10n_util::GetStringUTF16(IDS_TASK_MANAGER_KILL));
kill_button_->SetStyle(views::Button::STYLE_BUTTON);
- about_memory_link_ = new views::Link(
- l10n_util::GetStringUTF16(IDS_TASK_MANAGER_ABOUT_MEMORY_LINK));
- about_memory_link_->set_listener(this);
-
// Makes sure our state is consistent.
OnSelectionChanged();
« no previous file with comments | « chrome/browser/ui/views/new_task_manager_view.h ('k') | chrome/browser/ui/views/task_manager_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698