| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/views/aura/app_list_window.h" | 5 #include "chrome/browser/ui/views/aura/app_list_window.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile_manager.h" | 7 #include "chrome/browser/profiles/profile_manager.h" |
| 8 #include "chrome/browser/ui/views/dom_view.h" | 8 #include "chrome/browser/ui/views/dom_view.h" |
| 9 #include "chrome/browser/ui/webui/aura/app_list_ui.h" | 9 #include "chrome/browser/ui/webui/aura/app_list_ui.h" |
| 10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
| 11 #include "content/browser/renderer_host/render_view_host.h" | 11 #include "content/browser/renderer_host/render_view_host.h" |
| 12 #include "content/browser/renderer_host/render_widget_host_view.h" | 12 #include "content/browser/renderer_host/render_widget_host_view.h" |
| 13 #include "content/browser/tab_contents/tab_contents.h" |
| 13 #include "ui/aura_shell/shell.h" | 14 #include "ui/aura_shell/shell.h" |
| 14 #include "ui/views/widget/widget.h" | 15 #include "ui/views/widget/widget.h" |
| 15 | 16 |
| 16 AppListWindow::AppListWindow(const gfx::Rect& bounds, | 17 AppListWindow::AppListWindow(const gfx::Rect& bounds, |
| 17 const aura_shell::ShellDelegate::SetWidgetCallback& callback) | 18 const aura_shell::ShellDelegate::SetWidgetCallback& callback) |
| 18 : widget_(NULL), | 19 : widget_(NULL), |
| 19 contents_(NULL), | 20 contents_(NULL), |
| 20 callback_(callback), | 21 callback_(callback), |
| 21 content_rendered_(false), | 22 content_rendered_(false), |
| 22 apps_loaded_(false) { | 23 apps_loaded_(false) { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 119 |
| 119 widget_ = new views::Widget; | 120 widget_ = new views::Widget; |
| 120 widget_->Init(widget_params); | 121 widget_->Init(widget_params); |
| 121 widget_->SetContentsView(contents_); | 122 widget_->SetContentsView(contents_); |
| 122 } | 123 } |
| 123 | 124 |
| 124 void AppListWindow::SetWidgetIfReady() { | 125 void AppListWindow::SetWidgetIfReady() { |
| 125 if (content_rendered_ && apps_loaded_) | 126 if (content_rendered_ && apps_loaded_) |
| 126 callback_.Run(widget_); | 127 callback_.Run(widget_); |
| 127 } | 128 } |
| OLD | NEW |