| OLD | NEW |
| 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 "ui/views/examples/content_client/examples_main_delegate.h" | 5 #include "ui/views/examples/content_client/examples_main_delegate.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #if defined(OS_WIN) | 26 #if defined(OS_WIN) |
| 27 // {83FAC8EE-7A0E-4dbb-A3F6-6F500D7CAB1A} | 27 // {83FAC8EE-7A0E-4dbb-A3F6-6F500D7CAB1A} |
| 28 const GUID kViewsExamplesProviderName = | 28 const GUID kViewsExamplesProviderName = |
| 29 { 0x83fac8ee, 0x7a0e, 0x4dbb, | 29 { 0x83fac8ee, 0x7a0e, 0x4dbb, |
| 30 { 0xa3, 0xf6, 0x6f, 0x50, 0xd, 0x7c, 0xab, 0x1a } }; | 30 { 0xa3, 0xf6, 0x6f, 0x50, 0xd, 0x7c, 0xab, 0x1a } }; |
| 31 #endif | 31 #endif |
| 32 | 32 |
| 33 } // namespace | 33 } // namespace |
| 34 | 34 |
| 35 ExamplesMainDelegate::ExamplesMainDelegate() { | 35 ExamplesMainDelegate::ExamplesMainDelegate( |
| 36 ExamplesMainParams* examples_params) |
| 37 : examples_params_(examples_params) { |
| 36 } | 38 } |
| 37 | 39 |
| 38 ExamplesMainDelegate::~ExamplesMainDelegate() { | 40 ExamplesMainDelegate::~ExamplesMainDelegate() { |
| 39 } | 41 } |
| 40 | 42 |
| 41 bool ExamplesMainDelegate::BasicStartupComplete(int* exit_code) { | 43 bool ExamplesMainDelegate::BasicStartupComplete(int* exit_code) { |
| 42 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 44 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 43 std::string process_type = | 45 std::string process_type = |
| 44 command_line.GetSwitchValueASCII(switches::kProcessType); | 46 command_line.GetSwitchValueASCII(switches::kProcessType); |
| 45 | 47 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 57 } | 59 } |
| 58 | 60 |
| 59 void ExamplesMainDelegate::PreSandboxStartup() { | 61 void ExamplesMainDelegate::PreSandboxStartup() { |
| 60 base::FilePath ui_test_pak_path; | 62 base::FilePath ui_test_pak_path; |
| 61 DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); | 63 DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); |
| 62 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); | 64 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); |
| 63 } | 65 } |
| 64 | 66 |
| 65 content::ContentBrowserClient* | 67 content::ContentBrowserClient* |
| 66 ExamplesMainDelegate::CreateContentBrowserClient() { | 68 ExamplesMainDelegate::CreateContentBrowserClient() { |
| 67 browser_client_.reset(new ExamplesContentBrowserClient); | 69 browser_client_.reset(new ExamplesContentBrowserClient(examples_params_)); |
| 68 return browser_client_.get(); | 70 return browser_client_.get(); |
| 69 } | 71 } |
| 70 | 72 |
| 71 } // namespace examples | 73 } // namespace examples |
| 72 } // namespace views | 74 } // namespace views |
| OLD | NEW |