Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 #include "ui/views/layout/grid_layout.h" | 117 #include "ui/views/layout/grid_layout.h" |
| 118 #include "ui/views/widget/native_widget.h" | 118 #include "ui/views/widget/native_widget.h" |
| 119 #include "ui/views/widget/root_view.h" | 119 #include "ui/views/widget/root_view.h" |
| 120 #include "ui/views/widget/widget.h" | 120 #include "ui/views/widget/widget.h" |
| 121 #include "ui/views/window/dialog_delegate.h" | 121 #include "ui/views/window/dialog_delegate.h" |
| 122 | 122 |
| 123 #if defined(USE_ASH) | 123 #if defined(USE_ASH) |
| 124 #include "ash/launcher/launcher.h" | 124 #include "ash/launcher/launcher.h" |
| 125 #include "ash/launcher/launcher_model.h" | 125 #include "ash/launcher/launcher_model.h" |
| 126 #include "ash/shell.h" | 126 #include "ash/shell.h" |
| 127 #include "ash/wm/property_util.h" | |
| 127 #include "chrome/browser/ui/ash/ash_util.h" | 128 #include "chrome/browser/ui/ash/ash_util.h" |
| 128 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" | 129 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
| 129 #include "chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h" | 130 #include "chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h" |
| 130 #include "chrome/browser/ui/ash/window_positioner.h" | 131 #include "chrome/browser/ui/ash/window_positioner.h" |
| 131 #endif | 132 #endif |
| 132 | 133 |
| 133 #if defined(USE_AURA) | 134 #if defined(USE_AURA) |
| 134 #include "ui/aura/window.h" | 135 #include "ui/aura/window.h" |
| 135 #include "ui/gfx/screen.h" | 136 #include "ui/gfx/screen.h" |
| 136 #elif defined(OS_WIN) // !defined(USE_AURA) | 137 #elif defined(OS_WIN) // !defined(USE_AURA) |
| (...skipping 2361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2498 | 2499 |
| 2499 // static | 2500 // static |
| 2500 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2501 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2501 // Create the view and the frame. The frame will attach itself via the view | 2502 // Create the view and the frame. The frame will attach itself via the view |
| 2502 // so we don't need to do anything with the pointer. | 2503 // so we don't need to do anything with the pointer. |
| 2503 BrowserView* view = new BrowserView(); | 2504 BrowserView* view = new BrowserView(); |
| 2504 view->Init(browser); | 2505 view->Init(browser); |
| 2505 (new BrowserFrame(view))->InitBrowserFrame(); | 2506 (new BrowserFrame(view))->InitBrowserFrame(); |
| 2506 view->GetWidget()->non_client_view()->SetAccessibleName( | 2507 view->GetWidget()->non_client_view()->SetAccessibleName( |
| 2507 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2508 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
| 2509 #if defined(USE_ASH) | |
| 2510 ash::SetPersistsAcrossAllWorkspaces(view->GetNativeWindow(), | |
|
sky
2013/05/01 04:32:04
And nuke this too.
Mr4D (OOO till 08-26)
2013/05/01 17:57:23
Done.
| |
| 2511 ash::WINDOW_PERSISTS_ACROSS_ALL_WORKSPACES_VALUE_NO); | |
| 2512 #endif | |
| 2508 return view; | 2513 return view; |
| 2509 } | 2514 } |
| 2510 | 2515 |
| 2511 void BrowserView::ShowAvatarBubble(WebContents* web_contents, | 2516 void BrowserView::ShowAvatarBubble(WebContents* web_contents, |
| 2512 const gfx::Rect& rect) { | 2517 const gfx::Rect& rect) { |
| 2513 gfx::Point origin(rect.origin()); | 2518 gfx::Point origin(rect.origin()); |
| 2514 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin); | 2519 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin); |
| 2515 gfx::Rect bounds(origin, rect.size()); | 2520 gfx::Rect bounds(origin, rect.size()); |
| 2516 | 2521 |
| 2517 AvatarMenuBubbleView::ShowBubble(this, views::BubbleBorder::TOP_RIGHT, | 2522 AvatarMenuBubbleView::ShowBubble(this, views::BubbleBorder::TOP_RIGHT, |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2618 | 2623 |
| 2619 Browser* modal_browser = | 2624 Browser* modal_browser = |
| 2620 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); | 2625 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); |
| 2621 if (modal_browser && (browser_ != modal_browser)) { | 2626 if (modal_browser && (browser_ != modal_browser)) { |
| 2622 modal_browser->window()->FlashFrame(true); | 2627 modal_browser->window()->FlashFrame(true); |
| 2623 modal_browser->window()->Activate(); | 2628 modal_browser->window()->Activate(); |
| 2624 } | 2629 } |
| 2625 | 2630 |
| 2626 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2631 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
| 2627 } | 2632 } |
| OLD | NEW |