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

Side by Side Diff: chrome/browser/ui/views/frame/native_browser_frame_factory.h

Issue 58853004: [win8] Force browsers created with Chrome in Metro mode to be on the Ash desktop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move from browser_commands to BrowserWindow Created 7 years, 1 month 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_FACTORY_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_FACTORY_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_FACTORY_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_FACTORY_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "chrome/browser/ui/host_desktop.h"
9 10
10 class BrowserFrame; 11 class BrowserFrame;
11 class BrowserView; 12 class BrowserView;
12 class NativeBrowserFrame; 13 class NativeBrowserFrame;
13 14
14 // Factory for creating a NativeBrowserFrame. 15 // Factory for creating a NativeBrowserFrame.
15 class NativeBrowserFrameFactory { 16 class NativeBrowserFrameFactory {
16 public: 17 public:
17 // Construct a platform-specific implementation of this interface. 18 // Construct a platform-specific implementation of this interface.
18 static NativeBrowserFrame* CreateNativeBrowserFrame( 19 static NativeBrowserFrame* CreateNativeBrowserFrame(
19 BrowserFrame* browser_frame, 20 BrowserFrame* browser_frame,
20 BrowserView* browser_view); 21 BrowserView* browser_view);
21 22
22 // Sets the factory. Takes ownership of |new_factory|, deleting existing 23 // Sets the factory. Takes ownership of |new_factory|, deleting existing
23 // factory. Use NULL to go back to default factory. 24 // factory. Use NULL to go back to default factory.
24 static void Set(NativeBrowserFrameFactory* new_factory); 25 static void Set(NativeBrowserFrameFactory* new_factory);
25 26
27 // Returns HOST_DESKTOP_TYPE_ASH on Windows when configured to allow browser
28 // windows only in Metro mode, otherwise |desktop_type|.
29 static chrome::HostDesktopType AdjustHostDesktopType(
30 chrome::HostDesktopType desktop_type);
31
26 virtual NativeBrowserFrame* Create(BrowserFrame* browser_frame, 32 virtual NativeBrowserFrame* Create(BrowserFrame* browser_frame,
27 BrowserView* browser_view); 33 BrowserView* browser_view);
28 34
29 protected: 35 protected:
30 NativeBrowserFrameFactory() {} 36 NativeBrowserFrameFactory() {}
31 virtual ~NativeBrowserFrameFactory() {} 37 virtual ~NativeBrowserFrameFactory() {}
32 38
39 private:
40 // For Chrome running on desktop platforms, returns true if the factory should
41 // create an ash browser frame for the provided |browser_view|.
42 static bool ShouldCreateForAshDesktop(BrowserView* browser_view);
43
33 DISALLOW_COPY_AND_ASSIGN(NativeBrowserFrameFactory); 44 DISALLOW_COPY_AND_ASSIGN(NativeBrowserFrameFactory);
34 }; 45 };
35 46
36 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_FACTORY_H_ 47 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/frame/native_browser_frame_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698