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

Side by Side Diff: chrome/browser/ui/webui/html_dialog_tab_contents_delegate.cc

Issue 8343043: Allow off the record dialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build break on Mac Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/html_dialog_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/webui/html_dialog_tab_contents_delegate.h" 5 #include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/tabs/tab_strip_model.h" 8 #include "chrome/browser/tabs/tab_strip_model.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_navigator.h" 10 #include "chrome/browser/ui/browser_navigator.h"
11 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 11 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
12 #include "content/browser/tab_contents/tab_contents.h" 12 #include "content/browser/tab_contents/tab_contents.h"
13 13
14 // Incognito profiles are not long-lived, so we always want to store a 14 // Incognito profiles are not long-lived, so we always want to store a
15 // non-incognito profile. 15 // non-incognito profile.
16 // 16 //
17 // TODO(akalin): Should we make it so that we have a default incognito 17 // TODO(akalin): Should we make it so that we have a default incognito
18 // profile that's long-lived? Of course, we'd still have to clear it out 18 // profile that's long-lived? Of course, we'd still have to clear it out
19 // when all incognito browsers close. 19 // when all incognito browsers close.
20 HtmlDialogTabContentsDelegate::HtmlDialogTabContentsDelegate(Profile* profile) 20 HtmlDialogTabContentsDelegate::HtmlDialogTabContentsDelegate(Profile* profile)
21 : profile_(profile->GetOriginalProfile()) {} 21 : profile_(profile) {}
22 22
23 HtmlDialogTabContentsDelegate::~HtmlDialogTabContentsDelegate() {} 23 HtmlDialogTabContentsDelegate::~HtmlDialogTabContentsDelegate() {}
24 24
25 Profile* HtmlDialogTabContentsDelegate::profile() const { return profile_; } 25 Profile* HtmlDialogTabContentsDelegate::profile() const { return profile_; }
26 26
27 void HtmlDialogTabContentsDelegate::Detach() { 27 void HtmlDialogTabContentsDelegate::Detach() {
28 profile_ = NULL; 28 profile_ = NULL;
29 } 29 }
30 30
31 // TODO(adriansc): Remove this method once refactoring changed all call sites. 31 // TODO(adriansc): Remove this method once refactoring changed all call sites.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // This needs to return true so that we are allowed to be resized by our 87 // This needs to return true so that we are allowed to be resized by our
88 // contents. 88 // contents.
89 return true; 89 return true;
90 } 90 }
91 91
92 bool HtmlDialogTabContentsDelegate::ShouldAddNavigationToHistory( 92 bool HtmlDialogTabContentsDelegate::ShouldAddNavigationToHistory(
93 const history::HistoryAddPageArgs& add_page_args, 93 const history::HistoryAddPageArgs& add_page_args,
94 content::NavigationType navigation_type) { 94 content::NavigationType navigation_type) {
95 return false; 95 return false;
96 } 96 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/html_dialog_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698