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

Side by Side Diff: chrome/browser/ui/extensions/shell_window.cc

Issue 12212207: Support panel titles and Icons for v1 apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comment. Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/extensions/shell_window.h" 5 #include "chrome/browser/ui/extensions/shell_window.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/app_window_contents.h" 9 #include "chrome/browser/extensions/app_window_contents.h"
10 #include "chrome/browser/extensions/extension_process_manager.h" 10 #include "chrome/browser/extensions/extension_process_manager.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 bounds.set_height(maximum_size.height()); 157 bounds.set_height(maximum_size.height());
158 if (bounds.height() != INT_MIN && bounds.height() < minimum_size.height()) 158 if (bounds.height() != INT_MIN && bounds.height() < minimum_size.height())
159 bounds.set_height(minimum_size.height()); 159 bounds.set_height(minimum_size.height());
160 160
161 new_params.bounds = bounds; 161 new_params.bounds = bounds;
162 162
163 native_app_window_.reset(NativeAppWindow::Create(this, new_params)); 163 native_app_window_.reset(NativeAppWindow::Create(this, new_params));
164 OnNativeWindowChanged(); 164 OnNativeWindowChanged();
165 165
166 if (!params.hidden) { 166 if (!params.hidden) {
167 if (params.window_type == WINDOW_TYPE_PANEL) 167 if (window_type_is_panel())
168 GetBaseWindow()->ShowInactive(); // Panels are not activated by default. 168 GetBaseWindow()->ShowInactive(); // Panels are not activated by default.
169 else 169 else
170 GetBaseWindow()->Show(); 170 GetBaseWindow()->Show();
171 } 171 }
172 172
173 shell_window_contents_->LoadContents(params.creator_process_id); 173 shell_window_contents_->LoadContents(params.creator_process_id);
174 174
175 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, 175 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
176 content::Source<Profile>(profile_)); 176 content::Source<Profile>(profile_));
177 // Close when the browser is exiting. 177 // Close when the browser is exiting.
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 const extensions::DraggableRegion& region = *iter; 512 const extensions::DraggableRegion& region = *iter;
513 sk_region->op( 513 sk_region->op(
514 region.bounds.x(), 514 region.bounds.x(),
515 region.bounds.y(), 515 region.bounds.y(),
516 region.bounds.right(), 516 region.bounds.right(),
517 region.bounds.bottom(), 517 region.bounds.bottom(),
518 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 518 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
519 } 519 }
520 return sk_region; 520 return sk_region;
521 } 521 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/shell_window.h ('k') | chrome/browser/ui/views/extensions/native_app_window_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698