| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 if (CommandLine::ForCurrentProcess() | 1059 if (CommandLine::ForCurrentProcess() |
| 1060 ->HasSwitch(switches::kEnableWebUITaskManager)) { | 1060 ->HasSwitch(switches::kEnableWebUITaskManager)) { |
| 1061 TaskManagerDialog::Show(); | 1061 TaskManagerDialog::Show(); |
| 1062 } else { | 1062 } else { |
| 1063 browser::ShowTaskManager(); | 1063 browser::ShowTaskManager(); |
| 1064 } | 1064 } |
| 1065 #endif // defined(WEBUI_TASK_MANAGER) | 1065 #endif // defined(WEBUI_TASK_MANAGER) |
| 1066 } | 1066 } |
| 1067 | 1067 |
| 1068 void BrowserView::ShowBackgroundPages() { | 1068 void BrowserView::ShowBackgroundPages() { |
| 1069 browser::ShowBackgroundPages(); | 1069 #if defined(WEBUI_TASK_MANAGER) |
| 1070 TaskManagerDialog::ShowBackgroundPages(); |
| 1071 #else |
| 1072 // Uses WebUI TaskManager when swiches is set. It is beta feature. |
| 1073 if (CommandLine::ForCurrentProcess() |
| 1074 ->HasSwitch(switches::kEnableWebUITaskManager)) { |
| 1075 TaskManagerDialog::ShowBackgroundPages(); |
| 1076 } else { |
| 1077 browser::ShowBackgroundPages(); |
| 1078 } |
| 1079 #endif // defined(WEBUI_TASK_MANAGER) |
| 1070 } | 1080 } |
| 1071 | 1081 |
| 1072 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { | 1082 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { |
| 1073 GetLocationBarView()->ShowStarBubble(url, !already_bookmarked); | 1083 GetLocationBarView()->ShowStarBubble(url, !already_bookmarked); |
| 1074 } | 1084 } |
| 1075 | 1085 |
| 1076 void BrowserView::SetDownloadShelfVisible(bool visible) { | 1086 void BrowserView::SetDownloadShelfVisible(bool visible) { |
| 1077 // This can be called from the superclass destructor, when it destroys our | 1087 // This can be called from the superclass destructor, when it destroys our |
| 1078 // child views. At that point, browser_ is already gone. | 1088 // child views. At that point, browser_ is already gone. |
| 1079 if (browser_ == NULL) | 1089 if (browser_ == NULL) |
| (...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2654 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2664 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2655 // Create the view and the frame. The frame will attach itself via the view | 2665 // Create the view and the frame. The frame will attach itself via the view |
| 2656 // so we don't need to do anything with the pointer. | 2666 // so we don't need to do anything with the pointer. |
| 2657 BrowserView* view = new BrowserView(browser); | 2667 BrowserView* view = new BrowserView(browser); |
| 2658 (new BrowserFrame(view))->InitBrowserFrame(); | 2668 (new BrowserFrame(view))->InitBrowserFrame(); |
| 2659 view->GetWidget()->non_client_view()->SetAccessibleName( | 2669 view->GetWidget()->non_client_view()->SetAccessibleName( |
| 2660 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2670 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
| 2661 return view; | 2671 return view; |
| 2662 } | 2672 } |
| 2663 #endif | 2673 #endif |
| OLD | NEW |