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

Side by Side Diff: chrome/browser/ui/cocoa/sidebar_controller.h

Issue 1152613003: Implement sidebar support for extension action popups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move SidebarManager to ExtensionSystem and remove notifications Created 5 years, 6 months 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
(Empty)
1 // Copyright (c) 2015 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.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_SIDEBAR_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_SIDEBAR_CONTROLLER_H_
7
8 #import "base/mac/cocoa_protocols.h"
9 #include "base/mac/scoped_nsobject.h"
10 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h"
11
12 @class NSSplitView;
13 @class NSView;
14 namespace content {
15 class BrowserContext;
16 class WebContents;
17 }
18
19 // A class that handles updates of the sidebar view within a browser window.
20 // It swaps in the relevant sidebar contents for a given TabContents or removes
21 // the vew, if there's no sidebar contents to show.
22 @interface SidebarController : NSObject<NSSplitViewDelegate> {
23 @private
24 // A view hosting sidebar contents.
25 base::scoped_nsobject<NSSplitView> splitView_;
26
27 // Manages currently displayed sidebar contents.
28 base::scoped_nsobject<TabContentsController> contentsController_;
29 }
30
31 - (id)initWithParentViewController:(id)parentController
32 andContentsController:(id)contentsController;
33
34 // This controller's view.
35 - (NSSplitView*)view;
36
37 // Depending on |contents|'s state, decides whether the sidebar
38 // should be shown or hidden and adjusts its width (|delegate_| handles
39 // the actual resize).
40 - (void)updateSidebarForTabContents:(content::WebContents*)contents
41 withContext:(content::BrowserContext*)context;
42
43 // Call when the sidebar view is properly sized and the render widget host view
44 // should be put into the view hierarchy.
45 - (void)ensureContentsVisible;
46
47 @end
48
49 #endif // CHROME_BROWSER_UI_COCOA_SIDEBAR_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698