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/chromeos/frame/browser_view.h" | 5 #include "chrome/browser/chromeos/frame/browser_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "ui/gfx/screen.h" | 40 #include "ui/gfx/screen.h" |
41 #include "views/controls/button/button.h" | 41 #include "views/controls/button/button.h" |
42 #include "views/controls/button/image_button.h" | 42 #include "views/controls/button/image_button.h" |
43 #include "views/controls/menu/menu_delegate.h" | 43 #include "views/controls/menu/menu_delegate.h" |
44 #include "views/controls/menu/menu_item_view.h" | 44 #include "views/controls/menu/menu_item_view.h" |
45 #include "views/controls/menu/menu_runner.h" | 45 #include "views/controls/menu/menu_runner.h" |
46 #include "views/widget/root_view.h" | 46 #include "views/widget/root_view.h" |
47 #include "views/widget/widget.h" | 47 #include "views/widget/widget.h" |
48 | 48 |
49 #if defined(TOOLKIT_USES_GTK) | 49 #if defined(TOOLKIT_USES_GTK) |
50 #include "chrome/browser/chromeos/wm_ipc.h" | 50 #include "chrome/browser/chromeos/legacy_window_manager/wm_ipc.h" |
51 #endif | 51 #endif |
52 | 52 |
53 namespace { | 53 namespace { |
54 | 54 |
55 // Amount to tweak the position of the status area to get it to look right. | 55 // Amount to tweak the position of the status area to get it to look right. |
56 const int kStatusAreaVerticalAdjustment = -1; | 56 const int kStatusAreaVerticalAdjustment = -1; |
57 | 57 |
58 // If a popup window is larger than this fraction of the screen, create a tab. | 58 // If a popup window is larger than this fraction of the screen, create a tab. |
59 const float kPopupMaxWidthFactor = 0.5; | 59 const float kPopupMaxWidthFactor = 0.5; |
60 const float kPopupMaxHeightFactor = 0.6; | 60 const float kPopupMaxHeightFactor = 0.6; |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 640 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
641 // Create a browser view for chromeos. | 641 // Create a browser view for chromeos. |
642 BrowserView* view; | 642 BrowserView* view; |
643 if (browser->is_type_popup() || browser->is_type_panel()) | 643 if (browser->is_type_popup() || browser->is_type_panel()) |
644 view = new chromeos::PanelBrowserView(browser); | 644 view = new chromeos::PanelBrowserView(browser); |
645 else | 645 else |
646 view = new chromeos::BrowserView(browser); | 646 view = new chromeos::BrowserView(browser); |
647 (new BrowserFrame(view))->InitBrowserFrame(); | 647 (new BrowserFrame(view))->InitBrowserFrame(); |
648 return view; | 648 return view; |
649 } | 649 } |
OLD | NEW |