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 #ifndef CHROME_BROWSER_UI_COCOA_DEV_TOOLS_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_DEV_TOOLS_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_DEV_TOOLS_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_DEV_TOOLS_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/memory/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
11 #include "chrome/browser/devtools/devtools_window.h" | 11 #include "chrome/browser/devtools/devtools_window.h" |
12 | 12 |
13 @class GraySplitView; | 13 @class GraySplitView; |
14 class Profile; | 14 class Profile; |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 class WebContents; | 17 class WebContents; |
18 } | 18 } |
19 | 19 |
20 // A class that handles updates of the devTools view within a browser window. | 20 // A class that handles updates of the devTools view within a browser window. |
21 // It swaps in the relevant devTools contents for a given WebContents or removes | 21 // It swaps in the relevant devTools contents for a given WebContents or removes |
22 // the view, if there's no devTools contents to show. | 22 // the view, if there's no devTools contents to show. |
23 @interface DevToolsController : NSObject<NSSplitViewDelegate> { | 23 @interface DevToolsController : NSObject<NSSplitViewDelegate> { |
24 @private | 24 @private |
25 // A view hosting docked devTools contents. | 25 // A view hosting docked devTools contents. |
26 scoped_nsobject<GraySplitView> splitView_; | 26 base::scoped_nsobject<GraySplitView> splitView_; |
27 | 27 |
28 DevToolsDockSide dockSide_; | 28 DevToolsDockSide dockSide_; |
29 | 29 |
30 // Docked devtools window instance. NULL when current tab is not inspected | 30 // Docked devtools window instance. NULL when current tab is not inspected |
31 // or is inspected with undocked version of DevToolsWindow. | 31 // or is inspected with undocked version of DevToolsWindow. |
32 DevToolsWindow* devToolsWindow_; | 32 DevToolsWindow* devToolsWindow_; |
33 } | 33 } |
34 | 34 |
35 - (id)init; | 35 - (id)init; |
36 | 36 |
37 // This controller's view. | 37 // This controller's view. |
38 - (NSView*)view; | 38 - (NSView*)view; |
39 | 39 |
40 // The compiler seems to have trouble handling a function named "view" that | 40 // The compiler seems to have trouble handling a function named "view" that |
41 // returns an NSSplitView, so provide a differently-named method. | 41 // returns an NSSplitView, so provide a differently-named method. |
42 - (NSSplitView*)splitView; | 42 - (NSSplitView*)splitView; |
43 | 43 |
44 // Depending on |contents|'s state, decides whether the docked web inspector | 44 // Depending on |contents|'s state, decides whether the docked web inspector |
45 // should be shown or hidden and adjusts its height (|delegate_| handles | 45 // should be shown or hidden and adjusts its height (|delegate_| handles |
46 // the actual resize). | 46 // the actual resize). |
47 - (void)updateDevToolsForWebContents:(content::WebContents*)contents | 47 - (void)updateDevToolsForWebContents:(content::WebContents*)contents |
48 withProfile:(Profile*)profile; | 48 withProfile:(Profile*)profile; |
49 | 49 |
50 - (CGFloat)topContentOffset; | 50 - (CGFloat)topContentOffset; |
51 - (void)setTopContentOffset:(CGFloat)offset; | 51 - (void)setTopContentOffset:(CGFloat)offset; |
52 | 52 |
53 @end | 53 @end |
54 | 54 |
55 #endif // CHROME_BROWSER_UI_COCOA_DEV_TOOLS_CONTROLLER_H_ | 55 #endif // CHROME_BROWSER_UI_COCOA_DEV_TOOLS_CONTROLLER_H_ |
OLD | NEW |