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

Side by Side Diff: chrome/browser/ui/views/task_manager_view.cc

Issue 2888563004: Delete panel metrics and define insets in terms of distance metrics. (Closed)
Patch Set: one wrong conversion Created 3 years, 7 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/task_manager_view.h" 5 #include "chrome/browser/ui/views/task_manager_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 tab_table_->SetModel(table_model_.get()); 331 tab_table_->SetModel(table_model_.get());
332 tab_table_->SetGrouper(this); 332 tab_table_->SetGrouper(this);
333 tab_table_->set_observer(this); 333 tab_table_->set_observer(this);
334 tab_table_->set_context_menu_controller(this); 334 tab_table_->set_context_menu_controller(this);
335 set_context_menu_controller(this); 335 set_context_menu_controller(this);
336 336
337 tab_table_parent_ = tab_table_->CreateParentIfNecessary(); 337 tab_table_parent_ = tab_table_->CreateParentIfNecessary();
338 AddChildView(tab_table_parent_); 338 AddChildView(tab_table_parent_);
339 339
340 SetLayoutManager(new views::FillLayout()); 340 SetLayoutManager(new views::FillLayout());
341 SetBorder(views::CreateEmptyBorder( 341 SetBorder(
342 ChromeLayoutProvider::Get()->GetDistanceMetric( 342 views::CreateEmptyBorder(ChromeLayoutProvider::Get()->GetInsetsMetric(
343 DISTANCE_PANEL_CONTENT_MARGIN), 343 views::INSETS_DIALOG_CONTENTS)));
344 views::kButtonHEdgeMarginNew, 0, views::kButtonHEdgeMarginNew));
345 344
346 table_model_->RetrieveSavedColumnsSettingsAndUpdateTable(); 345 table_model_->RetrieveSavedColumnsSettingsAndUpdateTable();
347 346
348 AddAccelerator(ui::Accelerator(ui::VKEY_W, ui::EF_CONTROL_DOWN)); 347 AddAccelerator(ui::Accelerator(ui::VKEY_W, ui::EF_CONTROL_DOWN));
349 } 348 }
350 349
351 void TaskManagerView::InitAlwaysOnTopState() { 350 void TaskManagerView::InitAlwaysOnTopState() {
352 RetrieveSavedAlwaysOnTopState(); 351 RetrieveSavedAlwaysOnTopState();
353 GetWidget()->SetAlwaysOnTop(is_always_on_top_); 352 GetWidget()->SetAlwaysOnTop(is_always_on_top_);
354 } 353 }
(...skipping 17 matching lines...) Expand all
372 if (!g_browser_process->local_state()) 371 if (!g_browser_process->local_state())
373 return; 372 return;
374 373
375 const base::DictionaryValue* dictionary = 374 const base::DictionaryValue* dictionary =
376 g_browser_process->local_state()->GetDictionary(GetWindowName()); 375 g_browser_process->local_state()->GetDictionary(GetWindowName());
377 if (dictionary) 376 if (dictionary)
378 dictionary->GetBoolean("always_on_top", &is_always_on_top_); 377 dictionary->GetBoolean("always_on_top", &is_always_on_top_);
379 } 378 }
380 379
381 } // namespace task_manager 380 } // namespace task_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698