Hello andreip,
I'd like you to do a code review. Please execute
g4 diff -c 9187940
or point your web browser to
http://mondrian/9187940
to review the following code:
Change 9187940 by [EMAIL PROTECTED] on 2008/11/27 18:24:49 *pending*
Adds OPBrowsingContext. Mailed on behalf of Opera. Note that this
depends on pending CL 9135600.
R=andreip
[EMAIL PROTECTED],[EMAIL PROTECTED]
DELTA=48 (48 added, 0 deleted, 0 changed)
OCL=9187940
Affected files ...
... //depot/googleclient/gears/opensource/gears/base/npapi/browser_utils.cc#6
edit
...
//depot/googleclient/gears/opensource/gears/base/opera/browsing_context_op.h#1
add
48 delta lines: 48 added, 0 deleted, 0 changed
Also consider running:
g4 lint -c 9187940
which verifies that the changelist doesn't introduce new style violations.
If you can't do the review, please let me know as soon as possible. During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately. Visit
http://www/eng/code_review.html for more information.
This is a semiautomated message from "g4 mail". Complaints or suggestions?
Mail [EMAIL PROTECTED]
Change 9187940 by [EMAIL PROTECTED] on 2008/11/27 18:24:49 *pending*
Adds OPBrowsingContext. Mailed on behalf of Opera. Note that this
depends on pending CL 9135600.
OCL=9187940
Affected files ...
... //depot/googleclient/gears/opensource/gears/base/npapi/browser_utils.cc#6
edit
...
//depot/googleclient/gears/opensource/gears/base/opera/browsing_context_op.h#1
add
==== //depot/googleclient/gears/opensource/gears/base/npapi/browser_utils.cc#6
-
c:\MyDocs\Gears3/googleclient/gears/opensource/gears/base/npapi/browser_utils.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/npapi/browser_utils.cc
2008-11-10 14:29:58.000000000 +0000
+++ googleclient/gears/opensource/gears/base/npapi/browser_utils.cc
2008-11-27 18:24:50.000000000 +0000
@@ -30,6 +30,8 @@
#if BROWSER_CHROME
#include "gears/base/chrome/browsing_context_cr.h"
#include "gears/base/chrome/module_cr.h"
+#elif BROWSER_OPERA
+#include "gears/base/opera/browsing_context_op.h"
#else
#include "gears/base/common/browsing_context.h"
#endif
@@ -133,6 +135,8 @@
#if BROWSER_CHROME
CPBrowsingContext cp_context = CP::GetBrowsingContext(context);
browsing_context->reset(new CRBrowsingContext(cp_context));
+#elif BROWSER_OPERA
+ browsing_context->reset(new OperaBrowsingContext(context));
#else
// TODO(mpcomplete): implement me.
browsing_context->reset();
====
//depot/googleclient/gears/opensource/gears/base/opera/browsing_context_op.h#1
-
c:\MyDocs\Gears3/googleclient/gears/opensource/gears/base/opera/browsing_context_op.h
====
# action=add type=text
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ googleclient/gears/opensource/gears/base/opera/browsing_context_op.h
2008-11-28 00:53:10.000000000 +0000
@@ -0,0 +1,44 @@
+// Copyright 2008, Google Inc.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
notice,
+// this list of conditions and the following disclaimer in the
documentation
+// and/or other materials provided with the distribution.
+// 3. Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+
+#ifndef GEARS_BASE_OPERA_BROWSING_CONTEXT_OP_H__
+#define GEARS_BASE_OPERA_BROWSING_CONTEXT_OP_H__
+
+#include "gears/base/common/browsing_context.h"
+#include "gears/base/common/js_types.h"
+
+class OperaBrowsingContext : public BrowsingContext {
+ public:
+ OperaBrowsingContext(JsContextPtr context) : js_context_(context) { }
+
+ JsContextPtr GetJsContext() { return js_context_; }
+ void SetJsContext(JsContextPtr context) { js_context_ =
context; }
+
+ private:
+ JsContextPtr js_context_;
+};
+
+#endif // GEARS_BASE_OPERA_BROWSING_CONTEXT_OP_H__