| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
| 10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 public: | 34 public: |
| 35 explicit DemoAppListViewDelegate(content::BrowserContext* browser_context) | 35 explicit DemoAppListViewDelegate(content::BrowserContext* browser_context) |
| 36 : view_(NULL), browser_context_(browser_context) {} | 36 : view_(NULL), browser_context_(browser_context) {} |
| 37 virtual ~DemoAppListViewDelegate() {} | 37 virtual ~DemoAppListViewDelegate() {} |
| 38 | 38 |
| 39 app_list::AppListView* InitView(gfx::NativeView window_context); | 39 app_list::AppListView* InitView(gfx::NativeView window_context); |
| 40 | 40 |
| 41 // Overridden from AppListViewDelegate: | 41 // Overridden from AppListViewDelegate: |
| 42 virtual void Dismiss() OVERRIDE; | 42 virtual void Dismiss() OVERRIDE; |
| 43 virtual void ViewClosing() OVERRIDE; | 43 virtual void ViewClosing() OVERRIDE; |
| 44 virtual content::WebContents* GetStartPageContents(); | 44 virtual content::WebContents* GetStartPageContents() OVERRIDE; |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 app_list::PaginationModel pagination_model_; | 47 app_list::PaginationModel pagination_model_; |
| 48 app_list::AppListView* view_; // Weak. Owns this. | 48 app_list::AppListView* view_; // Weak. Owns this. |
| 49 content::BrowserContext* browser_context_; | 49 content::BrowserContext* browser_context_; |
| 50 scoped_ptr<content::WebContents> web_contents_; | 50 scoped_ptr<content::WebContents> web_contents_; |
| 51 | 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(DemoAppListViewDelegate); | 52 DISALLOW_COPY_AND_ASSIGN(DemoAppListViewDelegate); |
| 53 }; | 53 }; |
| 54 | 54 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 content::InitializeSandboxInfo(&sandbox_info); | 111 content::InitializeSandboxInfo(&sandbox_info); |
| 112 ui::ViewsContentClient views_content_client(instance, &sandbox_info); | 112 ui::ViewsContentClient views_content_client(instance, &sandbox_info); |
| 113 #else | 113 #else |
| 114 int main(int argc, const char** argv) { | 114 int main(int argc, const char** argv) { |
| 115 ui::ViewsContentClient views_content_client(argc, argv); | 115 ui::ViewsContentClient views_content_client(argc, argv); |
| 116 #endif | 116 #endif |
| 117 | 117 |
| 118 views_content_client.set_task(base::Bind(&ShowAppList)); | 118 views_content_client.set_task(base::Bind(&ShowAppList)); |
| 119 return views_content_client.RunMain(); | 119 return views_content_client.RunMain(); |
| 120 } | 120 } |
| OLD | NEW |