1 // Copyright (c) 2013 Intel Corporation. All rights reserved.
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 #ifndef XWALK_APPLICATION_BROWSER_APPLICATION_TIZEN_H_
6 #define XWALK_APPLICATION_BROWSER_APPLICATION_TIZEN_H_
10 #include "base/event_types.h"
11 #include "xwalk/application/browser/application.h"
12 #include "xwalk/application/common/tizen/cookie_manager.h"
14 #if defined(USE_OZONE)
15 #include "ui/events/platform/platform_event_observer.h"
16 #include "ui/events/platform/platform_event_types.h"
20 namespace application {
22 class ApplicationTizen : // NOLINT
23 #if defined(USE_OZONE)
24 public ui::PlatformEventObserver,
28 virtual ~ApplicationTizen();
34 void RemoveAllCookies();
35 void SetUserAgentString(const std::string& user_agent_string);
38 friend class Application;
39 ApplicationTizen(scoped_refptr<ApplicationData> data,
40 XWalkBrowserContext* context);
41 bool Launch(const LaunchParams& launch_params) override;
43 base::FilePath GetSplashScreenPath() override;
45 // Runtime::Observer implementation.
46 void OnNewRuntimeAdded(Runtime* runtime) override;
47 void OnRuntimeClosed(Runtime* runtime) override;
49 #if defined(USE_OZONE)
50 void WillProcessEvent(const ui::PlatformEvent& event) override;
51 void DidProcessEvent(const ui::PlatformEvent& event) override;
53 bool CanBeSuspended() const;
55 #if defined(OS_TIZEN_MOBILE)
56 NativeAppWindow* root_window_;
58 scoped_ptr<CookieManager> cookie_manager_;
62 inline ApplicationTizen* ToApplicationTizen(Application* app) {
63 return static_cast<ApplicationTizen*>(app);
66 } // namespace application
69 #endif // XWALK_APPLICATION_BROWSER_APPLICATION_TIZEN_H_