summaryrefslogtreecommitdiffstats
path: root/chrome/browser/device_orientation
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/device_orientation')
-rw-r--r--chrome/browser/device_orientation/device_orientation_browsertest.cc2
-rw-r--r--chrome/browser/device_orientation/orientation.h2
-rw-r--r--chrome/browser/device_orientation/provider_impl.cc4
-rw-r--r--chrome/browser/device_orientation/provider_impl.h4
4 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/device_orientation/device_orientation_browsertest.cc b/chrome/browser/device_orientation/device_orientation_browsertest.cc
index d33f5d3..6fe92ea 100644
--- a/chrome/browser/device_orientation/device_orientation_browsertest.cc
+++ b/chrome/browser/device_orientation/device_orientation_browsertest.cc
@@ -49,7 +49,7 @@ class DeviceOrientationBrowserTest : public InProcessBrowserTest {
IN_PROC_BROWSER_TEST_F(DeviceOrientationBrowserTest, BasicTest) {
const Orientation kTestOrientation(true, 1, true, 2, true, 3);
- scoped_refptr<MockProvider> provider = new MockProvider(kTestOrientation);
+ scoped_refptr<MockProvider> provider(new MockProvider(kTestOrientation));
Provider::SetInstanceForTests(provider.get());
// The test page will register an event handler for orientation events,
diff --git a/chrome/browser/device_orientation/orientation.h b/chrome/browser/device_orientation/orientation.h
index 2193170..de876c9 100644
--- a/chrome/browser/device_orientation/orientation.h
+++ b/chrome/browser/device_orientation/orientation.h
@@ -36,7 +36,7 @@ class Orientation {
static Orientation Empty() { return Orientation(); }
- bool IsEmpty() {
+ bool IsEmpty() const {
return !can_provide_alpha_ && !can_provide_beta_ && !can_provide_gamma_;
}
diff --git a/chrome/browser/device_orientation/provider_impl.cc b/chrome/browser/device_orientation/provider_impl.cc
index 81ecfa3..e5e2397 100644
--- a/chrome/browser/device_orientation/provider_impl.cc
+++ b/chrome/browser/device_orientation/provider_impl.cc
@@ -99,7 +99,7 @@ void ProviderImpl::ScheduleInitializePollingThread() {
polling_loop->PostTask(FROM_HERE, task);
}
-void ProviderImpl::DoNotify(Orientation orientation) {
+void ProviderImpl::DoNotify(const Orientation& orientation) {
DCHECK(MessageLoop::current() == creator_loop_);
last_notification_ = orientation;
@@ -115,7 +115,7 @@ void ProviderImpl::DoNotify(Orientation orientation) {
}
}
-void ProviderImpl::ScheduleDoNotify(Orientation orientation) {
+void ProviderImpl::ScheduleDoNotify(const Orientation& orientation) {
DCHECK(MessageLoop::current() == polling_thread_->message_loop());
Task* task = NewRunnableMethod(this, &ProviderImpl::DoNotify, orientation);
diff --git a/chrome/browser/device_orientation/provider_impl.h b/chrome/browser/device_orientation/provider_impl.h
index d984062..7396035 100644
--- a/chrome/browser/device_orientation/provider_impl.h
+++ b/chrome/browser/device_orientation/provider_impl.h
@@ -52,8 +52,8 @@ class ProviderImpl : public Provider {
// Method for notifying observers of an orientation update.
// Runs on the creator_thread_.
- void DoNotify(Orientation orientation);
- void ScheduleDoNotify(Orientation orientation);
+ void DoNotify(const Orientation& orientation);
+ void ScheduleDoNotify(const Orientation& orientation);
static bool SignificantlyDifferent(const Orientation& orientation1,
const Orientation& orientation2);