Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: chrome/browser/chromeos/login/ui/simple_web_view_dialog.cc

Issue 1846653004: Rename IGNORING_CACHE to BYPASSING_CACHE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/chromeos/login/ui/simple_web_view_dialog.h" 5 #include "chrome/browser/chromeos/login/ui/simple_web_view_dialog.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 forward_(NULL), 130 forward_(NULL),
131 reload_(NULL), 131 reload_(NULL),
132 location_bar_(NULL), 132 location_bar_(NULL),
133 web_view_(NULL), 133 web_view_(NULL),
134 bubble_model_delegate_(new StubBubbleModelDelegate) { 134 bubble_model_delegate_(new StubBubbleModelDelegate) {
135 command_updater_.reset(new CommandUpdater(this)); 135 command_updater_.reset(new CommandUpdater(this));
136 command_updater_->UpdateCommandEnabled(IDC_BACK, true); 136 command_updater_->UpdateCommandEnabled(IDC_BACK, true);
137 command_updater_->UpdateCommandEnabled(IDC_FORWARD, true); 137 command_updater_->UpdateCommandEnabled(IDC_FORWARD, true);
138 command_updater_->UpdateCommandEnabled(IDC_STOP, true); 138 command_updater_->UpdateCommandEnabled(IDC_STOP, true);
139 command_updater_->UpdateCommandEnabled(IDC_RELOAD, true); 139 command_updater_->UpdateCommandEnabled(IDC_RELOAD, true);
140 command_updater_->UpdateCommandEnabled(IDC_RELOAD_IGNORING_CACHE, true); 140 command_updater_->UpdateCommandEnabled(IDC_RELOAD_BYPASSING_CACHE, true);
141 command_updater_->UpdateCommandEnabled(IDC_RELOAD_CLEARING_CACHE, true); 141 command_updater_->UpdateCommandEnabled(IDC_RELOAD_CLEARING_CACHE, true);
142 } 142 }
143 143
144 SimpleWebViewDialog::~SimpleWebViewDialog() { 144 SimpleWebViewDialog::~SimpleWebViewDialog() {
145 if (web_view_ && web_view_->web_contents()) 145 if (web_view_ && web_view_->web_contents())
146 web_view_->web_contents()->SetDelegate(NULL); 146 web_view_->web_contents()->SetDelegate(NULL);
147 } 147 }
148 148
149 void SimpleWebViewDialog::StartLoad(const GURL& url) { 149 void SimpleWebViewDialog::StartLoad(const GURL& url) {
150 if (!web_view_container_.get()) 150 if (!web_view_container_.get())
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 case IDC_FORWARD: 342 case IDC_FORWARD:
343 if (web_contents->GetController().CanGoForward()) { 343 if (web_contents->GetController().CanGoForward()) {
344 location_bar_->Revert(); 344 location_bar_->Revert();
345 web_contents->GetController().GoForward(); 345 web_contents->GetController().GoForward();
346 } 346 }
347 break; 347 break;
348 case IDC_STOP: 348 case IDC_STOP:
349 web_contents->Stop(); 349 web_contents->Stop();
350 break; 350 break;
351 case IDC_RELOAD: 351 case IDC_RELOAD:
352 // Always reload ignoring cache. 352 // Always reload bypassing cache.
353 case IDC_RELOAD_IGNORING_CACHE: 353 case IDC_RELOAD_BYPASSING_CACHE:
354 case IDC_RELOAD_CLEARING_CACHE: 354 case IDC_RELOAD_CLEARING_CACHE:
355 location_bar_->Revert(); 355 location_bar_->Revert();
356 web_contents->GetController().ReloadIgnoringCache(true); 356 web_contents->GetController().ReloadBypassingCache(true);
357 break; 357 break;
358 default: 358 default:
359 NOTREACHED(); 359 NOTREACHED();
360 } 360 }
361 } 361 }
362 362
363 void SimpleWebViewDialog::LoadImages() { 363 void SimpleWebViewDialog::LoadImages() {
364 const ui::ThemeProvider* tp = GetThemeProvider(); 364 const ui::ThemeProvider* tp = GetThemeProvider();
365 365
366 back_->SetImage(views::CustomButton::STATE_NORMAL, 366 back_->SetImage(views::CustomButton::STATE_NORMAL,
(...skipping 26 matching lines...) Expand all
393 393
394 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) { 394 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) {
395 if (reload_) { 395 if (reload_) {
396 reload_->ChangeMode( 396 reload_->ChangeMode(
397 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, 397 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD,
398 force); 398 force);
399 } 399 }
400 } 400 }
401 401
402 } // namespace chromeos 402 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/app_mode/app_mode_utils.cc ('k') | chrome/browser/extensions/api/tabs/tabs_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698