| Index: chrome/browser/ui/cocoa/share_menu/share_menu_controller.h
|
| diff --git a/chrome/browser/ui/cocoa/share_menu/share_menu_controller.h b/chrome/browser/ui/cocoa/share_menu/share_menu_controller.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1792a2e60c877498206115608051a1ead0b0a51d
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/cocoa/share_menu/share_menu_controller.h
|
| @@ -0,0 +1,56 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_UI_COCOA_RENDERER_CONTEXT_SHARE_MENU_CONTROLLER
|
| +#define CHROME_BROWSER_UI_COCOA_RENDERER_CONTEXT_SHARE_MENU_CONTROLLER
|
| +
|
| +#import <Cocoa/Cocoa.h>
|
| +
|
| +#import "base/mac/scoped_nsobject.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "chrome/browser/ui/browser.h"
|
| +
|
| +static NSString* kPageScreenShot = @"page_screen_shot";
|
| +static NSString* kPageUrl = @"page_url";
|
| +static NSString* kPageHtml = @"page_html";
|
| +
|
| +namespace ShareMenuControllerInternal {
|
| +class Observer;
|
| +}
|
| +
|
| +@interface ShareMenuController : NSObject {
|
| + @private
|
| + __weak NSMenu* mainMenu_;
|
| + scoped_ptr<ShareMenuControllerInternal::Observer> observer_;
|
| + base::scoped_nsobject<NSMutableArray> shareItems_;
|
| + NSMenuItem* shareMenuItem_;
|
| + base::scoped_nsobject<NSMenu> shareSubMenu_;
|
| + NSMenuItem* fileMenuItem_;
|
| + BOOL menuItemsLoaded_;
|
| + NSString* pageUrlForCurrentTab_;
|
| + base::scoped_nsobject<NSImage> contentSnapShot_;
|
| + base::scoped_nsobject<NSDictionary> pageInfo_;
|
| + //base::scoped_nsobject<NSData> pageHtml_;
|
| + base::scoped_nsobject<NSAttributedString> pageHtml_;
|
| + base::scoped_nsobject<NSString> page_;
|
| + base::scoped_nsobject<NSArray> originalSharableItems_;
|
| + content::WebContents* pageContents_;
|
| + Browser* lastActiveBrowser_;
|
| +}
|
| +
|
| +- (id)initWithMainMenu:(NSMenu*)menu;
|
| +- (BOOL)menuItemsLoaded;
|
| +- (void)setPageContents:(content::WebContents*)contents;
|
| +- (void)setActiveBrowser:(Browser*)browser;
|
| +- (void)rebuildShareMenu;
|
| +
|
| +@end
|
| +
|
| +@interface ShareMenuController(PrivateShareMenuControllerTesting)
|
| +- (void)initShareMenuItem;
|
| +- (NSMenu*)shareSubMenu;
|
| +- (NSMenuItem*)shareSubMenuItem;
|
| +@end
|
| +
|
| +#endif // CHROME_BROWSER_UI_COCOA_RENDERER_CONTEXT_SHARE_MENU_CONTROLLER
|
|
|