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

Unified Diff: chrome/browser/ui/views/extensions/shell_window_views.h

Issue 10825240: Refactor ShellWindow to separate platform-specific code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing file 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/views/extensions/shell_window_views.h
diff --git a/chrome/browser/ui/views/extensions/shell_window_views.h b/chrome/browser/ui/views/extensions/shell_window_views.h
index 16fdaf224d229800a0e637bd8d064e9e9d03a99c..2575857af7bbd0c74bf6a77f5be7fab53a50567c 100644
--- a/chrome/browser/ui/views/extensions/shell_window_views.h
+++ b/chrome/browser/ui/views/extensions/shell_window_views.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_
#define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_
+#include "chrome/browser/ui/base_window.h"
+#include "chrome/browser/ui/extensions/native_shell_window.h"
#include "chrome/browser/ui/extensions/shell_window.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/scoped_sk_region.h"
@@ -12,6 +14,10 @@
class Profile;
+namespace content {
+class WebContents;
+}
+
namespace extensions {
class Extension;
struct DraggableRegion;
@@ -21,13 +27,11 @@ namespace views {
class WebView;
}
-class ShellWindowViews : public ShellWindow,
+class ShellWindowViews : public NativeShellWindow,
public views::WidgetDelegateView {
public:
- ShellWindowViews(Profile* profile,
- const extensions::Extension* extension,
- const GURL& url,
- const CreateParams& params);
+ ShellWindowViews(ShellWindow* shell_window,
+ const ShellWindow::CreateParams& params);
bool frameless() const { return frameless_; }
SkRegion* draggable_region() { return draggable_region_.Get(); }
@@ -73,11 +77,19 @@ class ShellWindowViews : public ShellWindow,
virtual gfx::Size GetMaximumSize() OVERRIDE;
virtual void OnFocus() OVERRIDE;
- // ShellWindow implementation.
+ // NativeShellWindow implementation.
virtual void UpdateWindowTitle() OVERRIDE;
virtual void SetFullscreen(bool fullscreen) OVERRIDE;
virtual bool IsFullscreenOrPending() const OVERRIDE;
+ virtual Profile* profile() { return shell_window_->profile(); }
+ virtual content::WebContents* web_contents() {
tfarina 2012/08/09 16:20:20 Does these needs to be virtual? In any case, virtu
jeremya 2012/08/09 23:59:53 Not really :)
+ return shell_window_->web_contents();
+ }
+ virtual const extensions::Extension* extension() {
+ return shell_window_->extension();
+ }
+
private:
friend class ShellWindowFrameView;
@@ -99,6 +111,8 @@ class ShellWindowViews : public ShellWindow,
gfx::Size minimum_size_;
gfx::Size maximum_size_;
+ ShellWindow* shell_window_;
+
DISALLOW_COPY_AND_ASSIGN(ShellWindowViews);
};

Powered by Google App Engine
This is Rietveld 408576698