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 "athena/extensions/athena_app_delegate_base.h" | 5 #include "athena/extensions/athena_app_delegate_base.h" |
6 | 6 |
7 #include "athena/activity/public/activity_factory.h" | 7 #include "athena/activity/public/activity_factory.h" |
8 #include "athena/activity/public/activity_manager.h" | 8 #include "athena/activity/public/activity_manager.h" |
9 #include "athena/env/public/athena_env.h" | 9 #include "athena/env/public/athena_env.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 bool user_gesture, | 81 bool user_gesture, |
82 bool* was_blocked) { | 82 bool* was_blocked) { |
83 new_contents->SetDelegate(new_window_contents_delegate_.get()); | 83 new_contents->SetDelegate(new_window_contents_delegate_.get()); |
84 } | 84 } |
85 | 85 |
86 int AthenaAppDelegateBase::PreferredIconSize() { | 86 int AthenaAppDelegateBase::PreferredIconSize() { |
87 // TODO(oshima): Find out what to use. | 87 // TODO(oshima): Find out what to use. |
88 return extension_misc::EXTENSION_ICON_SMALL; | 88 return extension_misc::EXTENSION_ICON_SMALL; |
89 } | 89 } |
90 | 90 |
91 gfx::ImageSkia AthenaAppDelegateBase::GetAppDefaultIcon() { | |
92 return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | |
93 IDR_APP_DEFAULT_ICON); | |
94 } | |
95 | |
96 bool AthenaAppDelegateBase::IsWebContentsVisible( | 91 bool AthenaAppDelegateBase::IsWebContentsVisible( |
97 content::WebContents* web_contents) { | 92 content::WebContents* web_contents) { |
98 return web_contents->GetNativeView()->IsVisible(); | 93 return web_contents->GetNativeView()->IsVisible(); |
99 } | 94 } |
100 | 95 |
101 void AthenaAppDelegateBase::SetTerminatingCallback( | 96 void AthenaAppDelegateBase::SetTerminatingCallback( |
102 const base::Closure& callback) { | 97 const base::Closure& callback) { |
103 if (!terminating_callback_.is_null()) | 98 if (!terminating_callback_.is_null()) |
104 AthenaEnv::Get()->RemoveTerminatingCallback(terminating_callback_); | 99 AthenaEnv::Get()->RemoveTerminatingCallback(terminating_callback_); |
105 terminating_callback_ = callback; | 100 terminating_callback_ = callback; |
106 if (!terminating_callback_.is_null()) | 101 if (!terminating_callback_.is_null()) |
107 AthenaEnv::Get()->AddTerminatingCallback(terminating_callback_); | 102 AthenaEnv::Get()->AddTerminatingCallback(terminating_callback_); |
108 } | 103 } |
109 | 104 |
110 } // namespace athena | 105 } // namespace athena |
OLD | NEW |