Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/shell/browser/shell.h" | 5 #include "content/shell/browser/shell.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 255 if (switches::IsRunLayoutTestSwitchPresent()) | 255 if (switches::IsRunLayoutTestSwitchPresent()) |
| 256 SecondaryTestWindowObserver::CreateForWebContents(new_contents); | 256 SecondaryTestWindowObserver::CreateForWebContents(new_contents); |
| 257 } | 257 } |
| 258 | 258 |
| 259 void Shell::GoBackOrForward(int offset) { | 259 void Shell::GoBackOrForward(int offset) { |
| 260 web_contents_->GetController().GoToOffset(offset); | 260 web_contents_->GetController().GoToOffset(offset); |
| 261 web_contents_->Focus(); | 261 web_contents_->Focus(); |
| 262 } | 262 } |
| 263 | 263 |
| 264 void Shell::Reload() { | 264 void Shell::Reload() { |
| 265 web_contents_->GetController().Reload(false); | 265 web_contents_->GetController().Reload(ReloadType::NORMAL, false); |
|
Takashi Toyoshima
2016/12/15 06:21:52
shell is for testing
| |
| 266 web_contents_->Focus(); | 266 web_contents_->Focus(); |
| 267 } | 267 } |
| 268 | 268 |
| 269 void Shell::ReloadBypassingCache() { | 269 void Shell::ReloadBypassingCache() { |
| 270 web_contents_->GetController().ReloadBypassingCache(false); | 270 web_contents_->GetController().Reload(ReloadType::BYPASSING_CACHE, false); |
|
Takashi Toyoshima
2016/12/15 06:21:52
ditto
| |
| 271 web_contents_->Focus(); | 271 web_contents_->Focus(); |
| 272 } | 272 } |
| 273 | 273 |
| 274 void Shell::Stop() { | 274 void Shell::Stop() { |
| 275 web_contents_->Stop(); | 275 web_contents_->Stop(); |
| 276 web_contents_->Focus(); | 276 web_contents_->Focus(); |
| 277 } | 277 } |
| 278 | 278 |
| 279 void Shell::UpdateNavigationControls(bool to_different_document) { | 279 void Shell::UpdateNavigationControls(bool to_different_document) { |
| 280 int current_index = web_contents_->GetController().GetCurrentEntryIndex(); | 280 int current_index = web_contents_->GetController().GetCurrentEntryIndex(); |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 502 if (entry) | 502 if (entry) |
| 503 PlatformSetTitle(entry->GetTitle()); | 503 PlatformSetTitle(entry->GetTitle()); |
| 504 } | 504 } |
| 505 | 505 |
| 506 void Shell::OnDevToolsWebContentsDestroyed() { | 506 void Shell::OnDevToolsWebContentsDestroyed() { |
| 507 devtools_observer_.reset(); | 507 devtools_observer_.reset(); |
| 508 devtools_frontend_ = NULL; | 508 devtools_frontend_ = NULL; |
| 509 } | 509 } |
| 510 | 510 |
| 511 } // namespace content | 511 } // namespace content |
| OLD | NEW |