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

Unified Diff: chrome/browser/ui/cocoa/extensions/shell_window_cocoa.h

Issue 10825240: Refactor ShellWindow to separate platform-specific code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gtk Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/extensions/shell_window_cocoa.h
diff --git a/chrome/browser/ui/cocoa/extensions/shell_window_cocoa.h b/chrome/browser/ui/cocoa/extensions/shell_window_cocoa.h
index 5823651f9a8ab31853e5ed329ed0b7c5a5c5534b..ef9ae820b3c42f3ce119e95eac8c8ef492af46c7 100644
--- a/chrome/browser/ui/cocoa/extensions/shell_window_cocoa.h
+++ b/chrome/browser/ui/cocoa/extensions/shell_window_cocoa.h
@@ -10,10 +10,11 @@
#include "base/memory/scoped_nsobject.h"
#include "chrome/browser/ui/cocoa/constrained_window_mac.h"
+#include "chrome/browser/ui/extensions/native_shell_window.h"
#include "chrome/browser/ui/extensions/shell_window.h"
#include "chrome/common/extensions/draggable_region.h"
-#include "ui/gfx/rect.h"
#import "third_party/GTM/AppKit/GTMWindowSheetController.h"
+#include "ui/gfx/rect.h"
class Profile;
class ShellWindowCocoa;
@@ -35,12 +36,10 @@ class ShellWindowCocoa;
@end
// Cocoa bridge to ShellWindow.
-class ShellWindowCocoa : public ShellWindow {
+class ShellWindowCocoa : public NativeShellWindow {
public:
- ShellWindowCocoa(Profile* profile,
- const extensions::Extension* extension,
- const GURL& url,
- const CreateParams& params);
+ ShellWindowCocoa(ShellWindow* shell_window,
+ const ShellWindow::CreateParams& params);
// BaseWindow implementation.
virtual bool IsActive() const OVERRIDE;
@@ -72,23 +71,31 @@ class ShellWindowCocoa : public ShellWindow {
void WindowDidResignKey();
protected:
- // ShellWindow implementation.
+ // NativeShellWindow implementation.
virtual void SetFullscreen(bool fullscreen) OVERRIDE;
virtual bool IsFullscreenOrPending() const OVERRIDE;
+ virtual void UpdateWindowTitle() OVERRIDE;
+ virtual void UpdateDraggableRegions(
+ const std::vector<extensions::DraggableRegion>& regions) OVERRIDE;
private:
virtual ~ShellWindowCocoa();
- // ShellWindow implementation.
- virtual void UpdateDraggableRegions(
- const std::vector<extensions::DraggableRegion>& regions) OVERRIDE;
-
NSWindow* window() const;
+ content::WebContents* web_contents() const {
+ return shell_window_->web_contents();
+ }
+ const extensions::Extension* extension() const {
+ return shell_window_->extension();
+ }
+
void InstallView();
void UninstallView();
void InstallDraggableRegionViews();
+ ShellWindow* shell_window_;
+
bool has_frame_;
bool is_fullscreen_;

Powered by Google App Engine
This is Rietveld 408576698