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

Unified Diff: chrome/browser/ui/extensions/shell_window.cc

Issue 10436015: Remove chrome.windows.* support for platform apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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/extensions/shell_window.h ('k') | chrome/common/extensions/api/_permission_features.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/extensions/shell_window.cc
diff --git a/chrome/browser/ui/extensions/shell_window.cc b/chrome/browser/ui/extensions/shell_window.cc
index ff6633bc2901c5e4ba69ceb0f492609c67d71dc4..b36439044744a675bd76b2b01b2323618e41fe47 100644
--- a/chrome/browser/ui/extensions/shell_window.cc
+++ b/chrome/browser/ui/extensions/shell_window.cc
@@ -7,7 +7,6 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/extensions/extension_tabs_module_constants.h"
-#include "chrome/browser/extensions/extension_window_controller.h"
#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/file_select_helper.h"
#include "chrome/browser/intents/web_intents_util.h"
@@ -41,64 +40,6 @@ static const int kDefaultWidth = 512;
static const int kDefaultHeight = 384;
} // namespace
-namespace internal {
-
-class ShellWindowController : public ExtensionWindowController {
- public:
- ShellWindowController(ShellWindow* shell_window, Profile* profile);
-
- // Overriden from ExtensionWindowController
- virtual int GetWindowId() const OVERRIDE;
- virtual std::string GetWindowTypeText() const OVERRIDE;
- virtual base::DictionaryValue* CreateWindowValueWithTabs() const OVERRIDE;
- virtual bool CanClose(Reason* reason) const OVERRIDE;
- virtual void SetFullscreenMode(bool is_fullscreen,
- const GURL& extension_url) const OVERRIDE;
- virtual bool IsVisibleToExtension(
- const extensions::Extension* extension) const OVERRIDE;
-
- private:
- ShellWindow* shell_window_;
-
- DISALLOW_COPY_AND_ASSIGN(ShellWindowController);
-};
-
-ShellWindowController::ShellWindowController(
- ShellWindow* shell_window,
- Profile* profile)
- : ExtensionWindowController(shell_window, profile),
- shell_window_(shell_window) {
-}
-
-int ShellWindowController::GetWindowId() const {
- return static_cast<int>(shell_window_->session_id().id());
-}
-
-std::string ShellWindowController::GetWindowTypeText() const {
- return extension_tabs_module_constants::kWindowTypeValueShell;
-}
-
-base::DictionaryValue* ShellWindowController::CreateWindowValueWithTabs()
- const {
- return CreateWindowValue();
-}
-
-bool ShellWindowController::CanClose(Reason* reason) const {
- return true;
-}
-
-void ShellWindowController::SetFullscreenMode(bool is_fullscreen,
- const GURL& extension_url) const {
- // TODO(mihaip): implement
-}
-
-bool ShellWindowController::IsVisibleToExtension(
- const extensions::Extension* extension) const {
- return shell_window_->extension() == extension;
-}
-
-} // namespace internal
-
ShellWindow::CreateParams::CreateParams()
: frame(ShellWindow::CreateParams::FRAME_CUSTOM),
bounds(10, 10, kDefaultWidth, kDefaultHeight) {
@@ -144,10 +85,6 @@ ShellWindow::ShellWindow(Profile* profile,
// Prevent the browser process from shutting down while this window is open.
browser::StartKeepAlive();
- // Make this window available to the extension API.
- extension_window_controller_.reset(
- new internal::ShellWindowController(this, profile_));
-
ShellWindowRegistry::Get(profile_)->AddShellWindow(this);
}
@@ -213,7 +150,7 @@ bool ShellWindow::IsPopupOrPanel(const WebContents* source) const {
void ShellWindow::MoveContents(WebContents* source, const gfx::Rect& pos) {
DCHECK(source == web_contents_);
- extension_window_controller_->window()->SetBounds(pos);
+ SetBounds(pos);
}
void ShellWindow::NavigationStateChanged(
@@ -244,7 +181,7 @@ void ShellWindow::Observe(int type,
}
ExtensionWindowController* ShellWindow::GetExtensionWindowController() const {
- return extension_window_controller_.get();
+ return NULL;
}
void ShellWindow::OnRequest(const ExtensionHostMsg_Request_Params& params) {
« no previous file with comments | « chrome/browser/ui/extensions/shell_window.h ('k') | chrome/common/extensions/api/_permission_features.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698