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

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

Issue 10967036: views: Packaged app window icon should be system/generic icon, if icon is not set by default. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 63c30a5bd05a2eeda192f9ccdf04b675aed2a450..08a1eb8309c15b775581eb97447a834fe6142664 100644
--- a/chrome/browser/ui/views/extensions/shell_window_views.cc
+++ b/chrome/browser/ui/views/extensions/shell_window_views.cc
@@ -28,6 +28,7 @@
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/webview/webview.h"
#include "ui/views/layout/grid_layout.h"
+#include "ui/views/views_delegate.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/non_client_view.h"
@@ -325,7 +326,17 @@ ShellWindowViews::ShellWindowViews(ShellWindow* shell_window,
params.remove_standard_frame = true;
minimum_size_ = win_params.minimum_size;
maximum_size_ = win_params.maximum_size;
+
+ // Set the views::ViewsDelegate::views_delegate to NULL
+ // when initialize widget for shell window,
+ // which would remove chrome specific setting for widget,
+ // such as default icon.
+ views::ViewsDelegate* original_delegate =
sky 2012/09/21 16:15:51 This feels like a hack and is likely to be problem
+ views::ViewsDelegate::views_delegate;
+ views::ViewsDelegate::views_delegate = NULL;
window_->Init(params);
+ views::ViewsDelegate::views_delegate = original_delegate;
+
gfx::Rect window_bounds =
window_->non_client_view()->GetWindowBoundsForClientBounds(
win_params.bounds);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698