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

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

Issue 10080017: Switch platform apps from a declarative launch container to handling an onLaunched event. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: remove debug logging code Created 8 years, 8 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.cc
diff --git a/chrome/browser/ui/views/extensions/shell_window_views.cc b/chrome/browser/ui/views/extensions/shell_window_views.cc
index 04a7bb39f6add336d3f953782c75886543e2c963..9467bd8f6164e8baa2d3ff1545682e759cbd801b 100644
--- a/chrome/browser/ui/views/extensions/shell_window_views.cc
+++ b/chrome/browser/ui/views/extensions/shell_window_views.cc
@@ -39,20 +39,12 @@ class ShellWindowFrameView : public views::NonClientFrameView {
gfx::Path* window_mask) OVERRIDE;
virtual void ResetWindowControls() OVERRIDE {}
virtual void UpdateWindowIcon() OVERRIDE {}
- virtual gfx::Size GetMinimumSize() OVERRIDE;
- virtual gfx::Size GetMaximumSize() OVERRIDE;
-
- void set_min_size(gfx::Size size) { min_size_ = size; }
- void set_max_size(gfx::Size size) { max_size_ = size; }
private:
DISALLOW_COPY_AND_ASSIGN(ShellWindowFrameView);
-
- gfx::Size min_size_;
- gfx::Size max_size_;
};
-ShellWindowFrameView::ShellWindowFrameView(): min_size_() {
+ShellWindowFrameView::ShellWindowFrameView() {
}
ShellWindowFrameView::~ShellWindowFrameView() {
@@ -99,14 +91,6 @@ void ShellWindowFrameView::GetWindowMask(const gfx::Size& size,
// Don't touch it.
}
-gfx::Size ShellWindowFrameView::GetMinimumSize() {
- return min_size_;
-}
-
-gfx::Size ShellWindowFrameView::GetMaximumSize() {
- return max_size_;
-}
-
ShellWindowViews::ShellWindowViews(ExtensionHost* host)
: ShellWindow(host) {
host_->view()->SetContainer(this);
@@ -114,10 +98,7 @@ ShellWindowViews::ShellWindowViews(ExtensionHost* host)
views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
params.delegate = this;
params.remove_standard_frame = true;
- int width = host_->extension()->launch_width();
- int height = host_->extension()->launch_height();
- // TODO(jeremya): we should figure out a better way to position the window.
- gfx::Rect bounds(10, 10, width, height);
+ gfx::Rect bounds(10, 10, kDefaultWidth, kDefaultHeight);
params.bounds = bounds;
window_->Init(params);
#if defined(OS_WIN) && !defined(USE_AURA)
@@ -232,14 +213,7 @@ views::View* ShellWindowViews::GetContentsView() {
views::NonClientFrameView* ShellWindowViews::CreateNonClientFrameView(
views::Widget* widget) {
- ShellWindowFrameView* frame_view = new ShellWindowFrameView();
- gfx::Size min_size(host_->extension()->launch_min_width(),
- host_->extension()->launch_min_height());
- gfx::Size max_size(host_->extension()->launch_max_width(),
- host_->extension()->launch_max_height());
- frame_view->set_min_size(min_size);
- frame_view->set_max_size(max_size);
- return frame_view;
+ return new ShellWindowFrameView();
}
string16 ShellWindowViews::GetWindowTitle() const {
« no previous file with comments | « chrome/browser/ui/gtk/extensions/shell_window_gtk.cc ('k') | chrome/common/extensions/api/experimental.app.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698