| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_frame_aura.h" | 5 #include "chrome/browser/ui/views/frame/browser_frame_aura.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
| 9 #include "chrome/browser/ui/views/frame/browser_view.h" | 9 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 10 #include "chrome/browser/ui/views/frame/system_menu_model_delegate.h" | 10 #include "chrome/browser/ui/views/frame/system_menu_model_delegate.h" |
| 11 #include "grit/chromium_strings.h" | 11 #include "grit/chromium_strings.h" |
| 12 #include "grit/generated_resources.h" | 12 #include "grit/generated_resources.h" |
| 13 #include "ui/aura/client/aura_constants.h" | 13 #include "ui/aura/client/aura_constants.h" |
| 14 #include "ui/aura/window.h" | 14 #include "ui/aura/window.h" |
| 15 #include "ui/aura/window_observer.h" | 15 #include "ui/aura/window_observer.h" |
| 16 #include "ui/base/hit_test.h" | 16 #include "ui/base/hit_test.h" |
| 17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
| 18 #include "ui/base/models/simple_menu_model.h" | 18 #include "ui/base/models/simple_menu_model.h" |
| 19 #include "ui/gfx/font.h" | 19 #include "ui/gfx/font.h" |
| 20 #include "ui/views/controls/menu/menu_model_adapter.h" | 20 #include "ui/views/controls/menu/menu_model_adapter.h" |
| 21 #include "ui/views/controls/menu/menu_runner.h" | 21 #include "ui/views/controls/menu/menu_runner.h" |
| 22 #include "ui/views/view.h" | 22 #include "ui/views/view.h" |
| 23 #include "ui/views/views_switches.h" | |
| 24 | 23 |
| 25 #if defined(USE_ASH) | 24 #if defined(USE_ASH) |
| 26 #include "ash/wm/property_util.h" | 25 #include "ash/wm/property_util.h" |
| 27 #endif | 26 #endif |
| 28 | 27 |
| 29 #if !defined(OS_CHROMEOS) | 28 #if !defined(OS_CHROMEOS) |
| 30 #include "chrome/browser/ui/views/frame/desktop_browser_frame_aura.h" | 29 #include "chrome/browser/ui/views/frame/desktop_browser_frame_aura.h" |
| 31 #endif | 30 #endif |
| 32 | 31 |
| 33 using aura::Window; | 32 using aura::Window; |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 } | 200 } |
| 202 | 201 |
| 203 //////////////////////////////////////////////////////////////////////////////// | 202 //////////////////////////////////////////////////////////////////////////////// |
| 204 // NativeBrowserFrame, public: | 203 // NativeBrowserFrame, public: |
| 205 | 204 |
| 206 // static | 205 // static |
| 207 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( | 206 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( |
| 208 BrowserFrame* browser_frame, | 207 BrowserFrame* browser_frame, |
| 209 BrowserView* browser_view) { | 208 BrowserView* browser_view) { |
| 210 #if !defined(OS_CHROMEOS) | 209 #if !defined(OS_CHROMEOS) |
| 211 if (CommandLine::ForCurrentProcess()->HasSwitch( | 210 if (chrome::GetHostDesktopTypeForBrowser(browser_view->browser()) == |
| 212 views::switches::kDesktopAura)) | 211 chrome::HOST_DESKTOP_TYPE_NATIVE) |
| 213 return new DesktopBrowserFrameAura(browser_frame, browser_view); | 212 return new DesktopBrowserFrameAura(browser_frame, browser_view); |
| 214 #endif | 213 #endif |
| 215 return new BrowserFrameAura(browser_frame, browser_view); | 214 return new BrowserFrameAura(browser_frame, browser_view); |
| 216 } | 215 } |
| 217 | 216 |
| 218 /////////////////////////////////////////////////////////////////////////////// | 217 /////////////////////////////////////////////////////////////////////////////// |
| 219 // BrowserFrameAura, private: | 218 // BrowserFrameAura, private: |
| 220 | 219 |
| 221 BrowserFrameAura::~BrowserFrameAura() { | 220 BrowserFrameAura::~BrowserFrameAura() { |
| 222 } | 221 } |
| OLD | NEW |