| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 void Shell::GoBackOrForward(int offset) { | 257 void Shell::GoBackOrForward(int offset) { |
| 258 web_contents_->GetController().GoToOffset(offset); | 258 web_contents_->GetController().GoToOffset(offset); |
| 259 web_contents_->Focus(); | 259 web_contents_->Focus(); |
| 260 } | 260 } |
| 261 | 261 |
| 262 void Shell::Reload() { | 262 void Shell::Reload() { |
| 263 web_contents_->GetController().Reload(false); | 263 web_contents_->GetController().Reload(false); |
| 264 web_contents_->Focus(); | 264 web_contents_->Focus(); |
| 265 } | 265 } |
| 266 | 266 |
| 267 void Shell::ReloadBypassingCache() { |
| 268 web_contents_->GetController().ReloadBypassingCache(false); |
| 269 web_contents_->Focus(); |
| 270 } |
| 271 |
| 267 void Shell::Stop() { | 272 void Shell::Stop() { |
| 268 web_contents_->Stop(); | 273 web_contents_->Stop(); |
| 269 web_contents_->Focus(); | 274 web_contents_->Focus(); |
| 270 } | 275 } |
| 271 | 276 |
| 272 void Shell::UpdateNavigationControls(bool to_different_document) { | 277 void Shell::UpdateNavigationControls(bool to_different_document) { |
| 273 int current_index = web_contents_->GetController().GetCurrentEntryIndex(); | 278 int current_index = web_contents_->GetController().GetCurrentEntryIndex(); |
| 274 int max_index = web_contents_->GetController().GetEntryCount() - 1; | 279 int max_index = web_contents_->GetController().GetEntryCount() - 1; |
| 275 | 280 |
| 276 PlatformEnableUIControl(BACK_BUTTON, current_index > 0); | 281 PlatformEnableUIControl(BACK_BUTTON, current_index > 0); |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 devtools_frontend_->Activate(); | 477 devtools_frontend_->Activate(); |
| 473 devtools_frontend_->Focus(); | 478 devtools_frontend_->Focus(); |
| 474 } | 479 } |
| 475 | 480 |
| 476 void Shell::OnDevToolsWebContentsDestroyed() { | 481 void Shell::OnDevToolsWebContentsDestroyed() { |
| 477 devtools_observer_.reset(); | 482 devtools_observer_.reset(); |
| 478 devtools_frontend_ = NULL; | 483 devtools_frontend_ = NULL; |
| 479 } | 484 } |
| 480 | 485 |
| 481 } // namespace content | 486 } // namespace content |
| OLD | NEW |