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/tabs/tab_overview_controller.h" | 5 #include "chrome/browser/views/tabs/tab_overview_controller.h" |
6 | 6 |
7 #include "chrome/browser/browser.h" | 7 #include "chrome/browser/browser.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/gtk/browser_window_gtk.h" | 9 #include "chrome/browser/gtk/browser_window_gtk.h" |
10 #include "chrome/browser/tab_contents/tab_contents.h" | 10 #include "chrome/browser/tab_contents/tab_contents.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // Determine the max size for the overview. | 46 // Determine the max size for the overview. |
47 scoped_ptr<WindowSizer::MonitorInfoProvider> provider( | 47 scoped_ptr<WindowSizer::MonitorInfoProvider> provider( |
48 WindowSizer::CreateDefaultMonitorInfoProvider()); | 48 WindowSizer::CreateDefaultMonitorInfoProvider()); |
49 monitor_bounds_ = provider->GetMonitorWorkAreaMatching( | 49 monitor_bounds_ = provider->GetMonitorWorkAreaMatching( |
50 gfx::Rect(monitor_origin.x(), monitor_origin.y(), 1, 1)); | 50 gfx::Rect(monitor_origin.x(), monitor_origin.y(), 1, 1)); |
51 | 51 |
52 // Create the host. | 52 // Create the host. |
53 views::WidgetGtk* host = new views::WidgetGtk(views::WidgetGtk::TYPE_POPUP); | 53 views::WidgetGtk* host = new views::WidgetGtk(views::WidgetGtk::TYPE_POPUP); |
54 host->set_delete_on_destroy(false); | 54 host->set_delete_on_destroy(false); |
55 host->MakeTransparent(); | 55 host->MakeTransparent(); |
56 host->Init(NULL, CalculateHostBounds(), true); | 56 host->Init(NULL, CalculateHostBounds()); |
57 TabOverviewTypes::instance()->SetWindowType( | 57 TabOverviewTypes::instance()->SetWindowType( |
58 host->GetNativeView(), | 58 host->GetNativeView(), |
59 TabOverviewTypes::WINDOW_TYPE_CHROME_TAB_SUMMARY, | 59 TabOverviewTypes::WINDOW_TYPE_CHROME_TAB_SUMMARY, |
60 NULL); | 60 NULL); |
61 host_ = host; | 61 host_ = host; |
62 | 62 |
63 container_ = new TabOverviewContainer(); | 63 container_ = new TabOverviewContainer(); |
64 container_->AddChildView(grid_); | 64 container_->AddChildView(grid_); |
65 host->GetRootView()->AddChildView(container_); | 65 host->GetRootView()->AddChildView(container_); |
66 | 66 |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 configure_timer_.Stop(); | 356 configure_timer_.Stop(); |
357 } | 357 } |
358 | 358 |
359 void TabOverviewController::StartDelayTimer() { | 359 void TabOverviewController::StartDelayTimer() { |
360 configure_timer_.Stop(); | 360 configure_timer_.Stop(); |
361 delay_timer_.Stop(); | 361 delay_timer_.Stop(); |
362 delay_timer_.Start( | 362 delay_timer_.Start( |
363 base::TimeDelta::FromMilliseconds(350), this, | 363 base::TimeDelta::FromMilliseconds(350), this, |
364 &TabOverviewController::StartConfiguring); | 364 &TabOverviewController::StartConfiguring); |
365 } | 365 } |
OLD | NEW |