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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 13934007: Adding experimental maximize mode (behind a flag) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed as requested Created 7 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 | Annotate | Revision Log
OLDNEW
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
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 2415 matching lines...) Expand 10 before | Expand all | Expand 10 after
2552 2553
2553 // static 2554 // static
2554 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2555 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2555 // Create the view and the frame. The frame will attach itself via the view 2556 // Create the view and the frame. The frame will attach itself via the view
2556 // so we don't need to do anything with the pointer. 2557 // so we don't need to do anything with the pointer.
2557 BrowserView* view = new BrowserView(); 2558 BrowserView* view = new BrowserView();
2558 view->Init(browser); 2559 view->Init(browser);
2559 (new BrowserFrame(view))->InitBrowserFrame(); 2560 (new BrowserFrame(view))->InitBrowserFrame();
2560 view->GetWidget()->non_client_view()->SetAccessibleName( 2561 view->GetWidget()->non_client_view()->SetAccessibleName(
2561 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 2562 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
2563 #if defined(USE_ASH)
2564 // All browser windows can be maximized by the workspace manager.
2565 ash::SetCanBeMaximizedByWorkspace(view->GetNativeWindow(), true);
2566 #endif
2562 return view; 2567 return view;
2563 } 2568 }
2564 2569
2565 void BrowserView::ShowAvatarBubble(WebContents* web_contents, 2570 void BrowserView::ShowAvatarBubble(WebContents* web_contents,
2566 const gfx::Rect& rect) { 2571 const gfx::Rect& rect) {
2567 gfx::Point origin(rect.origin()); 2572 gfx::Point origin(rect.origin());
2568 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin); 2573 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin);
2569 gfx::Rect bounds(origin, rect.size()); 2574 gfx::Rect bounds(origin, rect.size());
2570 2575
2571 AvatarMenuBubbleView::ShowBubble(this, views::BubbleBorder::TOP_RIGHT, 2576 AvatarMenuBubbleView::ShowBubble(this, views::BubbleBorder::TOP_RIGHT,
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2672 2677
2673 Browser* modal_browser = 2678 Browser* modal_browser =
2674 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); 2679 chrome::FindBrowserWithWebContents(active_dialog->web_contents());
2675 if (modal_browser && (browser_ != modal_browser)) { 2680 if (modal_browser && (browser_ != modal_browser)) {
2676 modal_browser->window()->FlashFrame(true); 2681 modal_browser->window()->FlashFrame(true);
2677 modal_browser->window()->Activate(); 2682 modal_browser->window()->Activate();
2678 } 2683 }
2679 2684
2680 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); 2685 AppModalDialogQueue::GetInstance()->ActivateModalDialog();
2681 } 2686 }
OLDNEW
« ash/wm/property_util.h ('K') | « chrome/browser/ui/views/frame/app_non_client_frame_view_ash.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698