summaryrefslogtreecommitdiffstats
path: root/chrome/browser/guest_view/web_view/web_view_constants.h
diff options
context:
space:
mode:
authorhanxi@chromium.org <hanxi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-26 00:11:21 +0000
committerhanxi@chromium.org <hanxi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-26 00:11:21 +0000
commit38541979ff059ef443c0dc1bc4aab0db146cd060 (patch)
treed810a2028ed9d23604a8ab8cdde27edc3315de52 /chrome/browser/guest_view/web_view/web_view_constants.h
parente8e5907818051247a08ddf2fca0528035f3e4c50 (diff)
downloadchromium_src-38541979ff059ef443c0dc1bc4aab0db146cd060.zip
chromium_src-38541979ff059ef443c0dc1bc4aab0db146cd060.tar.gz
chromium_src-38541979ff059ef443c0dc1bc4aab0db146cd060.tar.bz2
1. Handle the case of empty embedder_extension_id in guestview.h.
2. Introduce a template class GuestView<T> to handle the *guestview-specific functions in guestview.h: . Rename GuestView to GuestViewBase, introduce GuestView<T> class, and move *ViewGuest-specific functions to GuestView<T>: -- FromWebContents<T>(...) -- From<T>(...). . Introduce a template member function As() in GuestViewBase to replace all of the As*View functions. 3. In each derived *ViewGuest class , e.g., WebViewGuest & AdViewGuest, define a static variable to show its view type (string). BUG=351824 Review URL: https://codereview.chromium.org/237533008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266297 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/guest_view/web_view/web_view_constants.h')
-rw-r--r--chrome/browser/guest_view/web_view/web_view_constants.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/chrome/browser/guest_view/web_view/web_view_constants.h b/chrome/browser/guest_view/web_view/web_view_constants.h
new file mode 100644
index 0000000..ff50895
--- /dev/null
+++ b/chrome/browser/guest_view/web_view/web_view_constants.h
@@ -0,0 +1,89 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Constants used for the WebView API.
+
+#ifndef CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_CONSTANTS_H_
+#define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_CONSTANTS_H_
+
+namespace webview {
+
+// Events.
+extern const char kEventClose[];
+extern const char kEventConsoleMessage[];
+extern const char kEventContentLoad[];
+extern const char kEventDialog[];
+extern const char kEventExit[];
+extern const char kEventFindReply[];
+extern const char kEventLoadAbort[];
+extern const char kEventLoadCommit[];
+extern const char kEventLoadProgress[];
+extern const char kEventLoadRedirect[];
+extern const char kEventLoadStart[];
+extern const char kEventLoadStop[];
+extern const char kEventNewWindow[];
+extern const char kEventPermissionRequest[];
+extern const char kEventResponsive[];
+extern const char kEventSizeChanged[];
+extern const char kEventUnresponsive[];
+extern const char kEventZoomChange[];
+
+// Parameters/properties on events.
+extern const char kDefaultPromptText[];
+extern const char kFindSearchText[];
+extern const char kFindFinalUpdate[];
+extern const char kLastUnlockedBySelf[];
+extern const char kLevel[];
+extern const char kLine[];
+extern const char kMessage[];
+extern const char kMessageText[];
+extern const char kMessageType[];
+extern const char kNewHeight[];
+extern const char kNewURL[];
+extern const char kNewWidth[];
+extern const char kOldHeight[];
+extern const char kOldURL[];
+extern const char kPermission[];
+extern const char kPermissionTypeDialog[];
+extern const char kPermissionTypeDownload[];
+extern const char kPermissionTypeGeolocation[];
+extern const char kPermissionTypeLoadPlugin[];
+extern const char kPermissionTypeMedia[];
+extern const char kPermissionTypeNewWindow[];
+extern const char kPermissionTypePointerLock[];
+extern const char kOldWidth[];
+extern const char kProcessId[];
+extern const char kProgress[];
+extern const char kReason[];
+extern const char kRequestId[];
+extern const char kSourceId[];
+extern const char kOldZoomFactor[];
+extern const char kNewZoomFactor[];
+
+// Internal parameters/properties on events.
+extern const char kInternalCurrentEntryIndex[];
+extern const char kInternalEntryCount[];
+extern const char kInternalProcessId[];
+
+// Parameters to callback functions.
+extern const char kFindNumberOfMatches[];
+extern const char kFindActiveMatchOrdinal[];
+extern const char kFindSelectionRect[];
+extern const char kFindRectLeft[];
+extern const char kFindRectTop[];
+extern const char kFindRectWidth[];
+extern const char kFindRectHeight[];
+extern const char kFindCanceled[];
+extern const char kFindDone[];
+
+// Initialization parameters.
+extern const char kParameterUserAgentOverride[];
+
+// Miscellaneous.
+extern const unsigned int kMaxOutstandingPermissionRequests;
+extern const int kInvalidPermissionRequestID;
+
+} // namespace webview
+
+#endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_CONSTANTS_H_