diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-07 20:59:58 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-07 20:59:58 +0000 |
commit | 550a2f22e6f1c58fcc26749872220d94f6efc69c (patch) | |
tree | 2ba832a75783ed78a81ac1d63e99e44ee00539b1 /chrome_frame | |
parent | a23451e3979d1f5c68d5bf87ec30ae983327620d (diff) | |
download | chromium_src-550a2f22e6f1c58fcc26749872220d94f6efc69c.zip chromium_src-550a2f22e6f1c58fcc26749872220d94f6efc69c.tar.gz chromium_src-550a2f22e6f1c58fcc26749872220d94f6efc69c.tar.bz2 |
Make some Win Aura code use "if (weak_ptr)" style
This is an almost-revert of r204244.
BUG=245942
TBR=darin@chromium.org
Review URL: https://codereview.chromium.org/16268015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204924 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/ready_mode/internal/ready_prompt_content.cc | 12 | ||||
-rw-r--r-- | chrome_frame/ready_mode/ready_mode.cc | 2 | ||||
-rw-r--r-- | chrome_frame/test/ready_mode_unittest.cc | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/chrome_frame/ready_mode/internal/ready_prompt_content.cc b/chrome_frame/ready_mode/internal/ready_prompt_content.cc index bacbd81..52ab70f 100644 --- a/chrome_frame/ready_mode/internal/ready_prompt_content.cc +++ b/chrome_frame/ready_mode/internal/ready_prompt_content.cc @@ -16,7 +16,7 @@ ReadyPromptContent::ReadyPromptContent(ReadyModeState* ready_mode_state, } ReadyPromptContent::~ReadyPromptContent() { - if (window_.get() != NULL && window_->IsWindow()) { + if (window_ != NULL && window_->IsWindow()) { // The window must discard its ContentFrame pointer at this time. window_->DestroyWindow(); window_.reset(); @@ -24,7 +24,7 @@ ReadyPromptContent::~ReadyPromptContent() { } bool ReadyPromptContent::InstallInFrame(Frame* frame) { - DCHECK(window_.get() == NULL); + DCHECK(window_ == NULL); DCHECK(ready_mode_state_ != NULL); DCHECK(url_launcher_ != NULL); @@ -32,11 +32,11 @@ bool ReadyPromptContent::InstallInFrame(Frame* frame) { window_ = ReadyPromptWindow::CreateInstance( frame, ready_mode_state_.release(), url_launcher_.release()); - return window_.get() != NULL; + return window_ != NULL; } void ReadyPromptContent::SetDimensions(const RECT& dimensions) { - if (window_.get() != NULL && window_->IsWindow()) { + if (window_ != NULL && window_->IsWindow()) { window_->SetWindowPos(HWND_TOP, &dimensions, ::IsRectEmpty(&dimensions) ? SWP_HIDEWINDOW : SWP_SHOWWINDOW); @@ -89,9 +89,9 @@ bool GetDialogTemplateDimensions(ReadyPromptWindow* window, RECT* dimensions) { } size_t ReadyPromptContent::GetDesiredSize(size_t width, size_t height) { - DCHECK(window_.get() != NULL && window_->IsWindow()); + DCHECK(window_ != NULL && window_->IsWindow()); - if (window_.get() == NULL || !window_->IsWindow()) { + if (window_ == NULL || !window_->IsWindow()) { return 0; } RECT dialog_dimensions = {0, 0, 0, 0}; diff --git a/chrome_frame/ready_mode/ready_mode.cc b/chrome_frame/ready_mode/ready_mode.cc index 2062811..1285329 100644 --- a/chrome_frame/ready_mode/ready_mode.cc +++ b/chrome_frame/ready_mode/ready_mode.cc @@ -127,7 +127,7 @@ StateObserver::~StateObserver() { } void StateObserver::OnStateChange(ReadyModeStatus status) { - if (ready_mode_ui_.get() == NULL) + if (ready_mode_ui_ == NULL) return; switch (status) { diff --git a/chrome_frame/test/ready_mode_unittest.cc b/chrome_frame/test/ready_mode_unittest.cc index 6cee2b9..6a508a2 100644 --- a/chrome_frame/test/ready_mode_unittest.cc +++ b/chrome_frame/test/ready_mode_unittest.cc @@ -138,7 +138,7 @@ class ReadyPromptWindowTest : public ReadyPromptTest { ready_prompt_window_ = ReadyPromptWindow::CreateInstance( &frame_, state_, url_launcher_); - ASSERT_TRUE(ready_prompt_window_.get() != NULL); + ASSERT_TRUE(ready_prompt_window_ != NULL); RECT position = {0, 0, 800, 39}; ASSERT_TRUE(ready_prompt_window_->SetWindowPos(HWND_TOP, &position, SWP_SHOWWINDOW)); @@ -153,9 +153,9 @@ class ReadyPromptWindowTest : public ReadyPromptTest { class ReadyPromptWindowButtonTest : public ReadyPromptWindowTest { public: void TearDown() { - ASSERT_TRUE(ready_prompt_window_.get() != NULL); + ASSERT_TRUE(ready_prompt_window_ != NULL); ASSERT_TRUE(ready_prompt_window_->DestroyWindow()); - ASSERT_TRUE(ready_prompt_window_.get() == NULL); + ASSERT_TRUE(ready_prompt_window_ == NULL); ASSERT_FALSE(message_loop_.WasTimedOut()); ReadyPromptWindowTest::TearDown(); |