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

Unified Diff: chrome/browser/ui/browser_window.h

Issue 9428018: Create BaseWindow and ExtensionWindowWrapper for extension API access to Panels (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 8 years, 10 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/fullscreen_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_window.h
diff --git a/chrome/browser/ui/browser_window.h b/chrome/browser/ui/browser_window.h
index 7053e4934e255e286f85eebe71a64d39e469bb18..af7e86c27b9add56684f0eda6b22aaa223e045a4 100644
--- a/chrome/browser/ui/browser_window.h
+++ b/chrome/browser/ui/browser_window.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_BROWSER_WINDOW_H_
#pragma once
+#include "chrome/browser/ui/base_window.h"
#include "chrome/browser/ui/bookmarks/bookmark_bar.h"
#include "chrome/browser/ui/fullscreen_exit_bubble_type.h"
#include "chrome/common/content_settings_types.h"
@@ -48,46 +49,32 @@ enum DevToolsDockSide {
////////////////////////////////////////////////////////////////////////////////
// BrowserWindow interface
// An interface implemented by the "view" of the Browser window.
+// This interface includes BaseWindow methods as well as Browser window
+// specific methods.
//
// NOTE: All getters may return NULL.
-class BrowserWindow {
+//
+class BrowserWindow : public BaseWindow {
public:
virtual ~BrowserWindow() {}
- // Show the window, or activates it if it's already visible.
- // Browser::OnWindowDidShow should be called after showing the window.
- virtual void Show() = 0;
-
- // Show the window, but do not activate it. Does nothing if window
- // is already visible.
- virtual void ShowInactive() = 0;
+ //////////////////////////////////////////////////////////////////////////////
+ // BaseWindow interface notes:
- // Sets the window's size and position to the specified values.
- virtual void SetBounds(const gfx::Rect& bounds) = 0;
-
- // Closes the frame as soon as possible. If the frame is not in a drag
+ // Closes the window as soon as possible. If the window is not in a drag
// session, it will close immediately; otherwise, it will move offscreen (so
// events are still fired) until the drag ends, then close. This assumes
// that the Browser is not immediately destroyed, but will be eventually
// destroyed by other means (eg, the tab strip going to zero elements).
// Bad things happen if the Browser dtor is called directly as a result of
// invoking this method.
- virtual void Close() = 0;
-
- // Activates (brings to front) the window. Restores the window from minimized
- // state if necessary.
- virtual void Activate() = 0;
-
- // Deactivates the window, making the next window in the Z order the active
- // window.
- virtual void Deactivate() = 0;
+ // virtual void Close() = 0;
- // Returns true if the window is currently the active/focused window.
- virtual bool IsActive() const = 0;
+ // Browser::OnWindowDidShow should be called after showing the window.
+ // virtual void Show() = 0;
- // Flashes the taskbar item associated with this frame.
- // Set |flash| to true to initiate flashing, false to stop flashing.
- virtual void FlashFrame(bool flash) = 0;
+ //////////////////////////////////////////////////////////////////////////////
+ // Browser specific methods:
// Return a platform dependent identifier for this frame. On Windows, this
// returns an HWND.
@@ -130,27 +117,6 @@ class BrowserWindow {
// Sets the starred state for the current tab.
virtual void SetStarredState(bool is_starred) = 0;
- // Returns the nonmaximized bounds of the frame (even if the frame is
- // currently maximized or minimized) in terms of the screen coordinates.
- virtual gfx::Rect GetRestoredBounds() const = 0;
-
- // Retrieves the window's current bounds, including its frame.
- // This will only differ from GetRestoredBounds() for maximized
- // and minimized windows.
- virtual gfx::Rect GetBounds() const = 0;
-
- // TODO(beng): REMOVE?
- // Returns true if the frame is maximized (aka zoomed).
- virtual bool IsMaximized() const = 0;
-
- // Returns true if the frame is minimized.
- virtual bool IsMinimized() const = 0;
-
- // Maximizes/minimizes/restores the window.
- virtual void Maximize() = 0;
- virtual void Minimize() = 0;
- virtual void Restore() = 0;
-
// Accessors for fullscreen mode state.
virtual void EnterFullscreen(const GURL& url,
FullscreenExitBubbleType bubble_type) = 0;
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/fullscreen_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698