Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / dev_tools_controller.h
blobb27b70bf69a1c117c328e93da8dc530ea091df8f
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_DEV_TOOLS_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_DEV_TOOLS_CONTROLLER_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/mac/scoped_nsobject.h"
11 #include "chrome/browser/devtools/devtools_window.h"
13 @class FocusTracker;
14 @class DevToolsContainerView;
15 class Profile;
17 namespace content {
18 class WebContents;
21 // A class that handles updates of the devTools view within a browser window.
22 // It swaps in the relevant devTools contents for a given WebContents or removes
23 // the view, if there's no devTools contents to show.
24 @interface DevToolsController : NSObject {
25 @private
26 // A view hosting docked devTools contents.
27 base::scoped_nsobject<DevToolsContainerView> devToolsContainerView_;
29 base::scoped_nsobject<FocusTracker> focusTracker_;
32 - (id)init;
34 // This controller's view.
35 - (NSView*)view;
37 // Depending on |contents|'s state, decides whether the docked web inspector
38 // should be shown or hidden and adjusts inspected page position.
39 // Returns true iff layout has changed.
40 - (BOOL)updateDevToolsForWebContents:(content::WebContents*)contents
41 withProfile:(Profile*)profile;
43 @end
45 #endif // CHROME_BROWSER_UI_COCOA_DEV_TOOLS_CONTROLLER_H_