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: content/browser/webui/web_ui_impl.cc

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
« no previous file with comments | « content/browser/webui/web_ui_impl.h ('k') | content/child/request_extra_data.h » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/webui/web_ui_impl.h" 5 #include "content/browser/webui/web_ui_impl.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "content/browser/child_process_security_policy_impl.h" 10 #include "content/browser/child_process_security_policy_impl.h"
(...skipping 26 matching lines...) Expand all
37 parameters += base::char16(','); 37 parameters += base::char16(',');
38 38
39 base::JSONWriter::Write(arg_list[i], &json); 39 base::JSONWriter::Write(arg_list[i], &json);
40 parameters += base::UTF8ToUTF16(json); 40 parameters += base::UTF8ToUTF16(json);
41 } 41 }
42 return base::ASCIIToUTF16(function_name) + 42 return base::ASCIIToUTF16(function_name) +
43 base::char16('(') + parameters + base::char16(')') + base::char16(';'); 43 base::char16('(') + parameters + base::char16(')') + base::char16(';');
44 } 44 }
45 45
46 WebUIImpl::WebUIImpl(WebContents* contents) 46 WebUIImpl::WebUIImpl(WebContents* contents)
47 : link_transition_type_(PAGE_TRANSITION_LINK), 47 : link_transition_type_(ui::PAGE_TRANSITION_LINK),
48 bindings_(BINDINGS_POLICY_WEB_UI), 48 bindings_(BINDINGS_POLICY_WEB_UI),
49 web_contents_(contents) { 49 web_contents_(contents) {
50 DCHECK(contents); 50 DCHECK(contents);
51 } 51 }
52 52
53 WebUIImpl::~WebUIImpl() { 53 WebUIImpl::~WebUIImpl() {
54 // Delete the controller first, since it may also be keeping a pointer to some 54 // Delete the controller first, since it may also be keeping a pointer to some
55 // of the handlers and can call them at destruction. 55 // of the handlers and can call them at destruction.
56 controller_.reset(); 56 controller_.reset();
57 } 57 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 const base::string16& WebUIImpl::GetOverriddenTitle() const { 105 const base::string16& WebUIImpl::GetOverriddenTitle() const {
106 return overridden_title_; 106 return overridden_title_;
107 } 107 }
108 108
109 void WebUIImpl::OverrideTitle(const base::string16& title) { 109 void WebUIImpl::OverrideTitle(const base::string16& title) {
110 overridden_title_ = title; 110 overridden_title_ = title;
111 } 111 }
112 112
113 PageTransition WebUIImpl::GetLinkTransitionType() const { 113 ui::PageTransition WebUIImpl::GetLinkTransitionType() const {
114 return link_transition_type_; 114 return link_transition_type_;
115 } 115 }
116 116
117 void WebUIImpl::SetLinkTransitionType(PageTransition type) { 117 void WebUIImpl::SetLinkTransitionType(ui::PageTransition type) {
118 link_transition_type_ = type; 118 link_transition_type_ = type;
119 } 119 }
120 120
121 int WebUIImpl::GetBindings() const { 121 int WebUIImpl::GetBindings() const {
122 return bindings_; 122 return bindings_;
123 } 123 }
124 124
125 void WebUIImpl::SetBindings(int bindings) { 125 void WebUIImpl::SetBindings(int bindings) {
126 bindings_ = bindings; 126 bindings_ = bindings;
127 } 127 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 } 250 }
251 251
252 void WebUIImpl::AddToSetIfFrameNameMatches( 252 void WebUIImpl::AddToSetIfFrameNameMatches(
253 std::set<RenderFrameHost*>* frame_set, 253 std::set<RenderFrameHost*>* frame_set,
254 RenderFrameHost* host) { 254 RenderFrameHost* host) {
255 if (host->GetFrameName() == frame_name_) 255 if (host->GetFrameName() == frame_name_)
256 frame_set->insert(host); 256 frame_set->insert(host);
257 } 257 }
258 258
259 } // namespace content 259 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/webui/web_ui_impl.h ('k') | content/child/request_extra_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698