equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "CachedHandler.h" |
|
20 #include "ChromeWidget.h" |
|
21 //#include "ContentViewDelegate.h" |
|
22 #include "controllableviewimpl.h" |
|
23 |
|
24 namespace GVA { |
|
25 |
|
26 CachedHandler::CachedHandler(const QString & elementId, const QString & script, const QRectF & rect, ChromeWidget * chrome, const QString &targetView) |
|
27 : m_id(elementId), |
|
28 m_script(script), |
|
29 m_rect(rect), //NB: maybe this should be a QRect |
|
30 m_chrome(chrome), |
|
31 m_targetView(targetView) |
|
32 { |
|
33 } |
|
34 //NB: Return a QVariant? |
|
35 void CachedHandler::invoke() const |
|
36 { |
|
37 ControllableViewBase *view = m_chrome->getView(m_targetView.isEmpty() ? "WebView" : m_targetView); |
|
38 if(view) |
|
39 view->triggerAction(m_script); |
|
40 } |
|
41 |
|
42 } // end of namespace GVA |
|
43 |