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

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: nit 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 b20d24d768b6c3b6ee5d2847f3c3139d85ffbeb8..a97f7122d3c81e32751146aeb95ba05d5a6573a7 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 "third_party/skia/include/core/SkRegion.h"
#include "ui/gfx/rect.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,12 +77,20 @@ class ShellWindowViews : public ShellWindow,
virtual gfx::Size GetMaximumSize() OVERRIDE;
virtual void OnFocus() OVERRIDE;
+ Profile* profile() { return shell_window_->profile(); }
+ content::WebContents* web_contents() {
+ return shell_window_->web_contents();
+ }
+ const extensions::Extension* extension() {
+ return shell_window_->extension();
+ }
+
private:
friend class ShellWindowFrameView;
virtual ~ShellWindowViews();
- // ShellWindow implementation.
+ // NativeShellWindow implementation.
virtual void UpdateWindowTitle() OVERRIDE;
virtual void SetFullscreen(bool fullscreen) OVERRIDE;
virtual bool IsFullscreenOrPending() const OVERRIDE;
@@ -87,6 +99,8 @@ class ShellWindowViews : public ShellWindow,
void OnViewWasResized();
+ ShellWindow* shell_window_; // weak - ShellWindow owns NativeShellWindow.
+
views::WebView* web_view_;
views::Widget* window_;
bool is_fullscreen_;
« no previous file with comments | « chrome/browser/ui/gtk/extensions/shell_window_gtk.cc ('k') | chrome/browser/ui/views/extensions/shell_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698